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