org.milyn.edi.unedifact.d96a.IFTCCA.SegmentGroup3 Maven / Gradle / Ivy
/**
* This class was generated by Smooks EJC (http://www.smooks.org).
*/
package org.milyn.edi.unedifact.d96a.IFTCCA;
import java.io.Serializable;
import org.milyn.smooks.edi.EDIWritable;
import org.milyn.edi.unedifact.d96a.common.ChargePaymentInstructions;
import java.util.List;
import org.milyn.edi.unedifact.d96a.common.Currencies;
import org.milyn.edi.unedifact.d96a.common.PlaceLocationIdentification;
import org.milyn.edi.unedifact.d96a.common.MonetaryAmount;
import java.io.Writer;
import org.milyn.edisax.model.internal.Delimiters;
import java.io.IOException;
public class SegmentGroup3 implements Serializable, EDIWritable {
private static final long serialVersionUID = 1L;
private ChargePaymentInstructions chargePaymentInstructions;
private List currencies;
private List placeLocationIdentification;
private List monetaryAmount;
public void write(Writer writer, Delimiters delimiters) throws IOException {
Writer nodeWriter = writer;
if(chargePaymentInstructions != null) {
nodeWriter.write("CPI");
nodeWriter.write(delimiters.getField());
chargePaymentInstructions.write(nodeWriter, delimiters);
}
if(currencies != null && !currencies.isEmpty()) {
for(Currencies currenciesInst : currencies) {
nodeWriter.write("CUX");
nodeWriter.write(delimiters.getField());
currenciesInst.write(nodeWriter, delimiters);
}
}
if(placeLocationIdentification != null && !placeLocationIdentification.isEmpty()) {
for(PlaceLocationIdentification placeLocationIdentificationInst : placeLocationIdentification) {
nodeWriter.write("LOC");
nodeWriter.write(delimiters.getField());
placeLocationIdentificationInst.write(nodeWriter, delimiters);
}
}
if(monetaryAmount != null && !monetaryAmount.isEmpty()) {
for(MonetaryAmount monetaryAmountInst : monetaryAmount) {
nodeWriter.write("MOA");
nodeWriter.write(delimiters.getField());
monetaryAmountInst.write(nodeWriter, delimiters);
}
}
}
public ChargePaymentInstructions getChargePaymentInstructions() {
return chargePaymentInstructions;
}
public SegmentGroup3 setChargePaymentInstructions(ChargePaymentInstructions chargePaymentInstructions) {
this.chargePaymentInstructions = chargePaymentInstructions; return this;
}
public List getCurrencies() {
return currencies;
}
public SegmentGroup3 setCurrencies(List currencies) {
this.currencies = currencies; return this;
}
public List getPlaceLocationIdentification() {
return placeLocationIdentification;
}
public SegmentGroup3 setPlaceLocationIdentification(List placeLocationIdentification) {
this.placeLocationIdentification = placeLocationIdentification; return this;
}
public List getMonetaryAmount() {
return monetaryAmount;
}
public SegmentGroup3 setMonetaryAmount(List monetaryAmount) {
this.monetaryAmount = monetaryAmount; return this;
}
}