org.milyn.edi.unedifact.d96a.DOCADV.SegmentGroup5 Maven / Gradle / Ivy
/**
* This class was generated by Smooks EJC (http://www.smooks.org).
*/
package org.milyn.edi.unedifact.d96a.DOCADV;
import java.io.Serializable;
import org.milyn.smooks.edi.EDIWritable;
import org.milyn.edi.unedifact.d96a.common.AllowanceOrCharge;
import java.util.List;
import org.milyn.edi.unedifact.d96a.common.PercentageDetails;
import java.io.Writer;
import org.milyn.edisax.model.internal.Delimiters;
import java.io.IOException;
public class SegmentGroup5 implements Serializable, EDIWritable {
private static final long serialVersionUID = 1L;
private AllowanceOrCharge allowanceOrCharge;
private List percentageDetails;
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 && !percentageDetails.isEmpty()) {
for(PercentageDetails percentageDetailsInst : percentageDetails) {
nodeWriter.write("PCD");
nodeWriter.write(delimiters.getField());
percentageDetailsInst.write(nodeWriter, delimiters);
}
}
}
public AllowanceOrCharge getAllowanceOrCharge() {
return allowanceOrCharge;
}
public SegmentGroup5 setAllowanceOrCharge(AllowanceOrCharge allowanceOrCharge) {
this.allowanceOrCharge = allowanceOrCharge; return this;
}
public List getPercentageDetails() {
return percentageDetails;
}
public SegmentGroup5 setPercentageDetails(List percentageDetails) {
this.percentageDetails = percentageDetails; return this;
}
}