org.milyn.edi.unedifact.d06b.PAYDUC.SegmentGroup7 Maven / Gradle / Ivy
/**
* This class was generated by Smooks EJC (http://www.smooks.org).
*/
package org.milyn.edi.unedifact.d06b.PAYDUC;
import java.io.Serializable;
import org.milyn.smooks.edi.EDIWritable;
import org.milyn.edi.unedifact.d06b.common.NameAndAddress;
import java.util.List;
import org.milyn.edi.unedifact.d06b.common.Reference;
import org.milyn.edi.unedifact.d06b.common.MonetaryAmount;
import org.milyn.edi.unedifact.d06b.common.AdjustmentDetails;
import org.milyn.edi.unedifact.d06b.common.PaymentTerms;
import org.milyn.edi.unedifact.d06b.common.FreeText;
import org.milyn.edi.unedifact.d06b.common.DateTimePeriod;
import java.io.Writer;
import org.milyn.edisax.model.internal.Delimiters;
import java.io.IOException;
public class SegmentGroup7 implements Serializable, EDIWritable {
private static final long serialVersionUID = 1L;
private NameAndAddress nameAndAddress;
private List reference;
private List monetaryAmount;
private List adjustmentDetails;
private PaymentTerms paymentTerms;
private List freeText;
private List dateTimePeriod;
public void write(Writer writer, Delimiters delimiters) throws IOException {
Writer nodeWriter = writer;
if(nameAndAddress != null) {
nodeWriter.write("NAD");
nodeWriter.write(delimiters.getField());
nameAndAddress.write(nodeWriter, delimiters);
}
if(reference != null && !reference.isEmpty()) {
for(Reference referenceInst : reference) {
nodeWriter.write("RFF");
nodeWriter.write(delimiters.getField());
referenceInst.write(nodeWriter, delimiters);
}
}
if(monetaryAmount != null && !monetaryAmount.isEmpty()) {
for(MonetaryAmount monetaryAmountInst : monetaryAmount) {
nodeWriter.write("MOA");
nodeWriter.write(delimiters.getField());
monetaryAmountInst.write(nodeWriter, delimiters);
}
}
if(adjustmentDetails != null && !adjustmentDetails.isEmpty()) {
for(AdjustmentDetails adjustmentDetailsInst : adjustmentDetails) {
nodeWriter.write("AJT");
nodeWriter.write(delimiters.getField());
adjustmentDetailsInst.write(nodeWriter, delimiters);
}
}
if(paymentTerms != null) {
nodeWriter.write("PYT");
nodeWriter.write(delimiters.getField());
paymentTerms.write(nodeWriter, delimiters);
}
if(freeText != null && !freeText.isEmpty()) {
for(FreeText freeTextInst : freeText) {
nodeWriter.write("FTX");
nodeWriter.write(delimiters.getField());
freeTextInst.write(nodeWriter, delimiters);
}
}
if(dateTimePeriod != null && !dateTimePeriod.isEmpty()) {
for(DateTimePeriod dateTimePeriodInst : dateTimePeriod) {
nodeWriter.write("DTM");
nodeWriter.write(delimiters.getField());
dateTimePeriodInst.write(nodeWriter, delimiters);
}
}
}
public NameAndAddress getNameAndAddress() {
return nameAndAddress;
}
public SegmentGroup7 setNameAndAddress(NameAndAddress nameAndAddress) {
this.nameAndAddress = nameAndAddress; return this;
}
public List getReference() {
return reference;
}
public SegmentGroup7 setReference(List reference) {
this.reference = reference; return this;
}
public List getMonetaryAmount() {
return monetaryAmount;
}
public SegmentGroup7 setMonetaryAmount(List monetaryAmount) {
this.monetaryAmount = monetaryAmount; return this;
}
public List getAdjustmentDetails() {
return adjustmentDetails;
}
public SegmentGroup7 setAdjustmentDetails(List adjustmentDetails) {
this.adjustmentDetails = adjustmentDetails; return this;
}
public PaymentTerms getPaymentTerms() {
return paymentTerms;
}
public SegmentGroup7 setPaymentTerms(PaymentTerms paymentTerms) {
this.paymentTerms = paymentTerms; return this;
}
public List getFreeText() {
return freeText;
}
public SegmentGroup7 setFreeText(List freeText) {
this.freeText = freeText; return this;
}
public List getDateTimePeriod() {
return dateTimePeriod;
}
public SegmentGroup7 setDateTimePeriod(List dateTimePeriod) {
this.dateTimePeriod = dateTimePeriod; return this;
}
}