org.milyn.edi.unedifact.d02a.JUPREQ.SegmentGroup12 Maven / Gradle / Ivy
/**
* This class was generated by Smooks EJC (http://www.smooks.org).
*/
package org.milyn.edi.unedifact.d02a.JUPREQ;
import java.io.Serializable;
import org.milyn.smooks.edi.EDIWritable;
import org.milyn.edi.unedifact.d02a.common.MonetaryAmount;
import java.util.List;
import org.milyn.edi.unedifact.d02a.common.Currencies;
import org.milyn.edi.unedifact.d02a.common.PaymentInstructions;
import java.io.Writer;
import org.milyn.edisax.model.internal.Delimiters;
import java.io.IOException;
public class SegmentGroup12 implements Serializable, EDIWritable {
private static final long serialVersionUID = 1L;
private MonetaryAmount monetaryAmount;
private List currencies;
private List paymentInstructions;
public void write(Writer writer, Delimiters delimiters) throws IOException {
Writer nodeWriter = writer;
if(monetaryAmount != null) {
nodeWriter.write("MOA");
nodeWriter.write(delimiters.getField());
monetaryAmount.write(nodeWriter, delimiters);
}
if(currencies != null && !currencies.isEmpty()) {
for(Currencies currenciesInst : currencies) {
nodeWriter.write("CUX");
nodeWriter.write(delimiters.getField());
currenciesInst.write(nodeWriter, delimiters);
}
}
if(paymentInstructions != null && !paymentInstructions.isEmpty()) {
for(PaymentInstructions paymentInstructionsInst : paymentInstructions) {
nodeWriter.write("PAI");
nodeWriter.write(delimiters.getField());
paymentInstructionsInst.write(nodeWriter, delimiters);
}
}
}
public MonetaryAmount getMonetaryAmount() {
return monetaryAmount;
}
public SegmentGroup12 setMonetaryAmount(MonetaryAmount monetaryAmount) {
this.monetaryAmount = monetaryAmount; return this;
}
public List getCurrencies() {
return currencies;
}
public SegmentGroup12 setCurrencies(List currencies) {
this.currencies = currencies; return this;
}
public List getPaymentInstructions() {
return paymentInstructions;
}
public SegmentGroup12 setPaymentInstructions(List paymentInstructions) {
this.paymentInstructions = paymentInstructions; return this;
}
}