org.milyn.edi.unedifact.d02a.CREEXT.SegmentGroup8 Maven / Gradle / Ivy
/**
* This class was generated by Smooks EJC (http://www.smooks.org).
*/
package org.milyn.edi.unedifact.d02a.CREEXT;
import java.io.Serializable;
import org.milyn.smooks.edi.EDIWritable;
import org.milyn.edi.unedifact.d02a.common.AllowanceOrCharge;
import org.milyn.edi.unedifact.d02a.common.PercentageDetails;
import java.util.List;
import org.milyn.edi.unedifact.d02a.common.MonetaryAmount;
import org.milyn.edi.unedifact.d02a.common.Currencies;
import org.milyn.edi.unedifact.d02a.common.DateTimePeriod;
import java.io.Writer;
import org.milyn.edisax.model.internal.Delimiters;
import java.io.IOException;
public class SegmentGroup8 implements Serializable, EDIWritable {
private static final long serialVersionUID = 1L;
private AllowanceOrCharge allowanceOrCharge;
private PercentageDetails percentageDetails;
private List monetaryAmount;
private Currencies currencies;
private List dateTimePeriod;
private List segmentGroup9;
public void write(Writer writer, Delimiters delimiters) throws IOException {
Writer nodeWriter = writer;
if(allowanceOrCharge != null) {
nodeWriter.write("ALC");
nodeWriter.write(delimiters.getField());
allowanceOrCharge.write(nodeWriter, delimiters);
}
if(percentageDetails != null) {
nodeWriter.write("PCD");
nodeWriter.write(delimiters.getField());
percentageDetails.write(nodeWriter, delimiters);
}
if(monetaryAmount != null && !monetaryAmount.isEmpty()) {
for(MonetaryAmount monetaryAmountInst : monetaryAmount) {
nodeWriter.write("MOA");
nodeWriter.write(delimiters.getField());
monetaryAmountInst.write(nodeWriter, delimiters);
}
}
if(currencies != null) {
nodeWriter.write("CUX");
nodeWriter.write(delimiters.getField());
currencies.write(nodeWriter, delimiters);
}
if(dateTimePeriod != null && !dateTimePeriod.isEmpty()) {
for(DateTimePeriod dateTimePeriodInst : dateTimePeriod) {
nodeWriter.write("DTM");
nodeWriter.write(delimiters.getField());
dateTimePeriodInst.write(nodeWriter, delimiters);
}
}
if(segmentGroup9 != null && !segmentGroup9.isEmpty()) {
for(SegmentGroup9 segmentGroup9Inst : segmentGroup9) {
segmentGroup9Inst.write(nodeWriter, delimiters);
}
}
}
public AllowanceOrCharge getAllowanceOrCharge() {
return allowanceOrCharge;
}
public SegmentGroup8 setAllowanceOrCharge(AllowanceOrCharge allowanceOrCharge) {
this.allowanceOrCharge = allowanceOrCharge; return this;
}
public PercentageDetails getPercentageDetails() {
return percentageDetails;
}
public SegmentGroup8 setPercentageDetails(PercentageDetails percentageDetails) {
this.percentageDetails = percentageDetails; return this;
}
public List getMonetaryAmount() {
return monetaryAmount;
}
public SegmentGroup8 setMonetaryAmount(List monetaryAmount) {
this.monetaryAmount = monetaryAmount; return this;
}
public Currencies getCurrencies() {
return currencies;
}
public SegmentGroup8 setCurrencies(Currencies currencies) {
this.currencies = currencies; return this;
}
public List getDateTimePeriod() {
return dateTimePeriod;
}
public SegmentGroup8 setDateTimePeriod(List dateTimePeriod) {
this.dateTimePeriod = dateTimePeriod; return this;
}
public List getSegmentGroup9() {
return segmentGroup9;
}
public SegmentGroup8 setSegmentGroup9(List segmentGroup9) {
this.segmentGroup9 = segmentGroup9; return this;
}
}