org.milyn.edi.unedifact.d05a.PROSRV.SegmentGroup16 Maven / Gradle / Ivy
/**
* This class was generated by Smooks EJC (http://www.smooks.org).
*/
package org.milyn.edi.unedifact.d05a.PROSRV;
import java.io.Serializable;
import org.milyn.smooks.edi.EDIWritable;
import org.milyn.edi.unedifact.d05a.common.AllowanceOrCharge;
import java.util.List;
import org.milyn.edi.unedifact.d05a.common.Quantity;
import org.milyn.edi.unedifact.d05a.common.MonetaryAmount;
import org.milyn.edi.unedifact.d05a.common.RateDetails;
import java.io.Writer;
import org.milyn.edisax.model.internal.Delimiters;
import java.io.IOException;
public class SegmentGroup16 implements Serializable, EDIWritable {
private static final long serialVersionUID = 1L;
private AllowanceOrCharge allowanceOrCharge;
private List quantity;
private List monetaryAmount;
private List rateDetails;
private List segmentGroup17;
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(quantity != null && !quantity.isEmpty()) {
for(Quantity quantityInst : quantity) {
nodeWriter.write("QTY");
nodeWriter.write(delimiters.getField());
quantityInst.write(nodeWriter, delimiters);
}
}
if(monetaryAmount != null && !monetaryAmount.isEmpty()) {
for(MonetaryAmount monetaryAmountInst : monetaryAmount) {
nodeWriter.write("MOA");
nodeWriter.write(delimiters.getField());
monetaryAmountInst.write(nodeWriter, delimiters);
}
}
if(rateDetails != null && !rateDetails.isEmpty()) {
for(RateDetails rateDetailsInst : rateDetails) {
nodeWriter.write("RTE");
nodeWriter.write(delimiters.getField());
rateDetailsInst.write(nodeWriter, delimiters);
}
}
if(segmentGroup17 != null && !segmentGroup17.isEmpty()) {
for(SegmentGroup17 segmentGroup17Inst : segmentGroup17) {
segmentGroup17Inst.write(nodeWriter, delimiters);
}
}
}
public AllowanceOrCharge getAllowanceOrCharge() {
return allowanceOrCharge;
}
public SegmentGroup16 setAllowanceOrCharge(AllowanceOrCharge allowanceOrCharge) {
this.allowanceOrCharge = allowanceOrCharge; return this;
}
public List getQuantity() {
return quantity;
}
public SegmentGroup16 setQuantity(List quantity) {
this.quantity = quantity; return this;
}
public List getMonetaryAmount() {
return monetaryAmount;
}
public SegmentGroup16 setMonetaryAmount(List monetaryAmount) {
this.monetaryAmount = monetaryAmount; return this;
}
public List getRateDetails() {
return rateDetails;
}
public SegmentGroup16 setRateDetails(List rateDetails) {
this.rateDetails = rateDetails; return this;
}
public List getSegmentGroup17() {
return segmentGroup17;
}
public SegmentGroup16 setSegmentGroup17(List segmentGroup17) {
this.segmentGroup17 = segmentGroup17; return this;
}
}