org.milyn.edi.unedifact.d06b.COACSU.SegmentGroup6 Maven / Gradle / Ivy
/**
* This class was generated by Smooks EJC (http://www.smooks.org).
*/
package org.milyn.edi.unedifact.d06b.COACSU;
import java.io.Serializable;
import org.milyn.smooks.edi.EDIWritable;
import org.milyn.edi.unedifact.d06b.common.PaymentTerms;
import java.util.List;
import org.milyn.edi.unedifact.d06b.common.MonetaryAmount;
import org.milyn.edi.unedifact.d06b.common.PercentageDetails;
import org.milyn.edi.unedifact.d06b.common.DateTimePeriod;
import org.milyn.edi.unedifact.d06b.common.FinancialInstitutionInformation;
import org.milyn.edi.unedifact.d06b.common.PaymentInstructions;
import java.io.Writer;
import org.milyn.edisax.model.internal.Delimiters;
import java.io.IOException;
public class SegmentGroup6 implements Serializable, EDIWritable {
private static final long serialVersionUID = 1L;
private PaymentTerms paymentTerms;
private List monetaryAmount;
private List percentageDetails;
private List dateTimePeriod;
private FinancialInstitutionInformation financialInstitutionInformation;
private List paymentInstructions;
public void write(Writer writer, Delimiters delimiters) throws IOException {
Writer nodeWriter = writer;
if(paymentTerms != null) {
nodeWriter.write("PYT");
nodeWriter.write(delimiters.getField());
paymentTerms.write(nodeWriter, delimiters);
}
if(monetaryAmount != null && !monetaryAmount.isEmpty()) {
for(MonetaryAmount monetaryAmountInst : monetaryAmount) {
nodeWriter.write("MOA");
nodeWriter.write(delimiters.getField());
monetaryAmountInst.write(nodeWriter, delimiters);
}
}
if(percentageDetails != null && !percentageDetails.isEmpty()) {
for(PercentageDetails percentageDetailsInst : percentageDetails) {
nodeWriter.write("PCD");
nodeWriter.write(delimiters.getField());
percentageDetailsInst.write(nodeWriter, delimiters);
}
}
if(dateTimePeriod != null && !dateTimePeriod.isEmpty()) {
for(DateTimePeriod dateTimePeriodInst : dateTimePeriod) {
nodeWriter.write("DTM");
nodeWriter.write(delimiters.getField());
dateTimePeriodInst.write(nodeWriter, delimiters);
}
}
if(financialInstitutionInformation != null) {
nodeWriter.write("FII");
nodeWriter.write(delimiters.getField());
financialInstitutionInformation.write(nodeWriter, delimiters);
}
if(paymentInstructions != null && !paymentInstructions.isEmpty()) {
for(PaymentInstructions paymentInstructionsInst : paymentInstructions) {
nodeWriter.write("PAI");
nodeWriter.write(delimiters.getField());
paymentInstructionsInst.write(nodeWriter, delimiters);
}
}
}
public PaymentTerms getPaymentTerms() {
return paymentTerms;
}
public SegmentGroup6 setPaymentTerms(PaymentTerms paymentTerms) {
this.paymentTerms = paymentTerms; return this;
}
public List getMonetaryAmount() {
return monetaryAmount;
}
public SegmentGroup6 setMonetaryAmount(List monetaryAmount) {
this.monetaryAmount = monetaryAmount; return this;
}
public List getPercentageDetails() {
return percentageDetails;
}
public SegmentGroup6 setPercentageDetails(List percentageDetails) {
this.percentageDetails = percentageDetails; return this;
}
public List getDateTimePeriod() {
return dateTimePeriod;
}
public SegmentGroup6 setDateTimePeriod(List dateTimePeriod) {
this.dateTimePeriod = dateTimePeriod; return this;
}
public FinancialInstitutionInformation getFinancialInstitutionInformation() {
return financialInstitutionInformation;
}
public SegmentGroup6 setFinancialInstitutionInformation(FinancialInstitutionInformation financialInstitutionInformation) {
this.financialInstitutionInformation = financialInstitutionInformation; return this;
}
public List getPaymentInstructions() {
return paymentInstructions;
}
public SegmentGroup6 setPaymentInstructions(List paymentInstructions) {
this.paymentInstructions = paymentInstructions; return this;
}
}