org.milyn.edi.unedifact.d06b.IFCSUM.SegmentGroup42 Maven / Gradle / Ivy
/**
* This class was generated by Smooks EJC (http://www.smooks.org).
*/
package org.milyn.edi.unedifact.d06b.IFCSUM;
import java.io.Serializable;
import org.milyn.smooks.edi.EDIWritable;
import org.milyn.edi.unedifact.d06b.common.ChargeRateCalculations;
import java.util.List;
import org.milyn.edi.unedifact.d06b.common.MonetaryAmount;
import org.milyn.edi.unedifact.d06b.common.PercentageDetails;
import java.io.Writer;
import org.milyn.edisax.model.internal.Delimiters;
import java.io.IOException;
public class SegmentGroup42 implements Serializable, EDIWritable {
private static final long serialVersionUID = 1L;
private ChargeRateCalculations chargeRateCalculations;
private List monetaryAmount;
private PercentageDetails percentageDetails;
public void write(Writer writer, Delimiters delimiters) throws IOException {
Writer nodeWriter = writer;
if(chargeRateCalculations != null) {
nodeWriter.write("TCC");
nodeWriter.write(delimiters.getField());
chargeRateCalculations.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) {
nodeWriter.write("PCD");
nodeWriter.write(delimiters.getField());
percentageDetails.write(nodeWriter, delimiters);
}
}
public ChargeRateCalculations getChargeRateCalculations() {
return chargeRateCalculations;
}
public SegmentGroup42 setChargeRateCalculations(ChargeRateCalculations chargeRateCalculations) {
this.chargeRateCalculations = chargeRateCalculations; return this;
}
public List getMonetaryAmount() {
return monetaryAmount;
}
public SegmentGroup42 setMonetaryAmount(List monetaryAmount) {
this.monetaryAmount = monetaryAmount; return this;
}
public PercentageDetails getPercentageDetails() {
return percentageDetails;
}
public SegmentGroup42 setPercentageDetails(PercentageDetails percentageDetails) {
this.percentageDetails = percentageDetails; return this;
}
}