org.milyn.edi.unedifact.d99b.CASRES.SegmentGroup2 Maven / Gradle / Ivy
/**
* This class was generated by Smooks EJC (http://www.smooks.org).
*/
package org.milyn.edi.unedifact.d99b.CASRES;
import java.io.Serializable;
import org.milyn.smooks.edi.EDIWritable;
import org.milyn.edi.unedifact.d99b.common.DocumentMessageDetails;
import java.util.List;
import org.milyn.edi.unedifact.d99b.common.RelatedIdentificationNumbers;
import org.milyn.edi.unedifact.d99b.common.PaymentTermsBasis;
import org.milyn.edi.unedifact.d99b.common.DateTimePeriod;
import org.milyn.edi.unedifact.d99b.common.MonetaryAmount;
import org.milyn.edi.unedifact.d99b.common.FreeText;
import java.io.Writer;
import org.milyn.edisax.model.internal.Delimiters;
import java.io.IOException;
public class SegmentGroup2 implements Serializable, EDIWritable {
private static final long serialVersionUID = 1L;
private DocumentMessageDetails documentMessageDetails;
private List relatedIdentificationNumbers;
private PaymentTermsBasis paymentTermsBasis;
private List dateTimePeriod;
private List monetaryAmount;
private List freeText;
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(relatedIdentificationNumbers != null && !relatedIdentificationNumbers.isEmpty()) {
for(RelatedIdentificationNumbers relatedIdentificationNumbersInst : relatedIdentificationNumbers) {
nodeWriter.write("GIR");
nodeWriter.write(delimiters.getField());
relatedIdentificationNumbersInst.write(nodeWriter, delimiters);
}
}
if(paymentTermsBasis != null) {
nodeWriter.write("PAT");
nodeWriter.write(delimiters.getField());
paymentTermsBasis.write(nodeWriter, delimiters);
}
if(dateTimePeriod != null && !dateTimePeriod.isEmpty()) {
for(DateTimePeriod dateTimePeriodInst : dateTimePeriod) {
nodeWriter.write("DTM");
nodeWriter.write(delimiters.getField());
dateTimePeriodInst.write(nodeWriter, delimiters);
}
}
if(monetaryAmount != null && !monetaryAmount.isEmpty()) {
for(MonetaryAmount monetaryAmountInst : monetaryAmount) {
nodeWriter.write("MOA");
nodeWriter.write(delimiters.getField());
monetaryAmountInst.write(nodeWriter, delimiters);
}
}
if(freeText != null && !freeText.isEmpty()) {
for(FreeText freeTextInst : freeText) {
nodeWriter.write("FTX");
nodeWriter.write(delimiters.getField());
freeTextInst.write(nodeWriter, delimiters);
}
}
}
public DocumentMessageDetails getDocumentMessageDetails() {
return documentMessageDetails;
}
public SegmentGroup2 setDocumentMessageDetails(DocumentMessageDetails documentMessageDetails) {
this.documentMessageDetails = documentMessageDetails; return this;
}
public List getRelatedIdentificationNumbers() {
return relatedIdentificationNumbers;
}
public SegmentGroup2 setRelatedIdentificationNumbers(List relatedIdentificationNumbers) {
this.relatedIdentificationNumbers = relatedIdentificationNumbers; return this;
}
public PaymentTermsBasis getPaymentTermsBasis() {
return paymentTermsBasis;
}
public SegmentGroup2 setPaymentTermsBasis(PaymentTermsBasis paymentTermsBasis) {
this.paymentTermsBasis = paymentTermsBasis; return this;
}
public List getDateTimePeriod() {
return dateTimePeriod;
}
public SegmentGroup2 setDateTimePeriod(List dateTimePeriod) {
this.dateTimePeriod = dateTimePeriod; return this;
}
public List getMonetaryAmount() {
return monetaryAmount;
}
public SegmentGroup2 setMonetaryAmount(List monetaryAmount) {
this.monetaryAmount = monetaryAmount; return this;
}
public List getFreeText() {
return freeText;
}
public SegmentGroup2 setFreeText(List freeText) {
this.freeText = freeText; return this;
}
}