org.milyn.edi.unedifact.d02a.TAXCON.SegmentGroup4 Maven / Gradle / Ivy
/**
* This class was generated by Smooks EJC (http://www.smooks.org).
*/
package org.milyn.edi.unedifact.d02a.TAXCON;
import java.io.Serializable;
import org.milyn.smooks.edi.EDIWritable;
import org.milyn.edi.unedifact.d02a.common.DocumentMessageDetails;
import java.util.List;
import org.milyn.edi.unedifact.d02a.common.MonetaryAmount;
import org.milyn.edi.unedifact.d02a.common.ControlTotal;
import java.io.Writer;
import org.milyn.edisax.model.internal.Delimiters;
import java.io.IOException;
public class SegmentGroup4 implements Serializable, EDIWritable {
private static final long serialVersionUID = 1L;
private DocumentMessageDetails documentMessageDetails;
private List monetaryAmount;
private ControlTotal controlTotal;
private List segmentGroup5;
public void write(Writer writer, Delimiters delimiters) throws IOException {
Writer nodeWriter = writer;
if(documentMessageDetails != null) {
nodeWriter.write("DOC");
nodeWriter.write(delimiters.getField());
documentMessageDetails.write(nodeWriter, delimiters);
}
if(monetaryAmount != null && !monetaryAmount.isEmpty()) {
for(MonetaryAmount monetaryAmountInst : monetaryAmount) {
nodeWriter.write("MOA");
nodeWriter.write(delimiters.getField());
monetaryAmountInst.write(nodeWriter, delimiters);
}
}
if(controlTotal != null) {
nodeWriter.write("CNT");
nodeWriter.write(delimiters.getField());
controlTotal.write(nodeWriter, delimiters);
}
if(segmentGroup5 != null && !segmentGroup5.isEmpty()) {
for(SegmentGroup5 segmentGroup5Inst : segmentGroup5) {
segmentGroup5Inst.write(nodeWriter, delimiters);
}
}
}
public DocumentMessageDetails getDocumentMessageDetails() {
return documentMessageDetails;
}
public SegmentGroup4 setDocumentMessageDetails(DocumentMessageDetails documentMessageDetails) {
this.documentMessageDetails = documentMessageDetails; return this;
}
public List getMonetaryAmount() {
return monetaryAmount;
}
public SegmentGroup4 setMonetaryAmount(List monetaryAmount) {
this.monetaryAmount = monetaryAmount; return this;
}
public ControlTotal getControlTotal() {
return controlTotal;
}
public SegmentGroup4 setControlTotal(ControlTotal controlTotal) {
this.controlTotal = controlTotal; return this;
}
public List getSegmentGroup5() {
return segmentGroup5;
}
public SegmentGroup4 setSegmentGroup5(List segmentGroup5) {
this.segmentGroup5 = segmentGroup5; return this;
}
}