org.milyn.edi.unedifact.d06b.DEBMUL.SegmentGroup18 Maven / Gradle / Ivy
/**
* This class was generated by Smooks EJC (http://www.smooks.org).
*/
package org.milyn.edi.unedifact.d06b.DEBMUL;
import java.io.Serializable;
import org.milyn.smooks.edi.EDIWritable;
import org.milyn.edi.unedifact.d06b.common.AllowanceOrCharge;
import org.milyn.edi.unedifact.d06b.common.PercentageDetails;
import java.util.List;
import org.milyn.edi.unedifact.d06b.common.MonetaryAmount;
import org.milyn.edi.unedifact.d06b.common.Currencies;
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 SegmentGroup18 implements Serializable, EDIWritable {
private static final long serialVersionUID = 1L;
private AllowanceOrCharge allowanceOrCharge;
private PercentageDetails percentageDetails;
private List monetaryAmount;
private Currencies currencies;
private DateTimePeriod dateTimePeriod;
private List segmentGroup19;
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) {
nodeWriter.write("DTM");
nodeWriter.write(delimiters.getField());
dateTimePeriod.write(nodeWriter, delimiters);
}
if(segmentGroup19 != null && !segmentGroup19.isEmpty()) {
for(SegmentGroup19 segmentGroup19Inst : segmentGroup19) {
segmentGroup19Inst.write(nodeWriter, delimiters);
}
}
}
public AllowanceOrCharge getAllowanceOrCharge() {
return allowanceOrCharge;
}
public SegmentGroup18 setAllowanceOrCharge(AllowanceOrCharge allowanceOrCharge) {
this.allowanceOrCharge = allowanceOrCharge; return this;
}
public PercentageDetails getPercentageDetails() {
return percentageDetails;
}
public SegmentGroup18 setPercentageDetails(PercentageDetails percentageDetails) {
this.percentageDetails = percentageDetails; return this;
}
public List getMonetaryAmount() {
return monetaryAmount;
}
public SegmentGroup18 setMonetaryAmount(List monetaryAmount) {
this.monetaryAmount = monetaryAmount; return this;
}
public Currencies getCurrencies() {
return currencies;
}
public SegmentGroup18 setCurrencies(Currencies currencies) {
this.currencies = currencies; return this;
}
public DateTimePeriod getDateTimePeriod() {
return dateTimePeriod;
}
public SegmentGroup18 setDateTimePeriod(DateTimePeriod dateTimePeriod) {
this.dateTimePeriod = dateTimePeriod; return this;
}
public List getSegmentGroup19() {
return segmentGroup19;
}
public SegmentGroup18 setSegmentGroup19(List segmentGroup19) {
this.segmentGroup19 = segmentGroup19; return this;
}
}