org.milyn.edi.unedifact.d06b.IFTRIN.SegmentGroup6 Maven / Gradle / Ivy
/**
* This class was generated by Smooks EJC (http://www.smooks.org).
*/
package org.milyn.edi.unedifact.d06b.IFTRIN;
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.NumberOfUnits;
import org.milyn.edi.unedifact.d06b.common.PercentageDetails;
import org.milyn.edi.unedifact.d06b.common.Quantity;
import org.milyn.edi.unedifact.d06b.common.PriceDetails;
import org.milyn.edi.unedifact.d06b.common.MonetaryAmount;
import java.io.Writer;
import org.milyn.edisax.model.internal.Delimiters;
import java.io.IOException;
public class SegmentGroup6 implements Serializable, EDIWritable {
private static final long serialVersionUID = 1L;
private ChargeRateCalculations chargeRateCalculations;
private List numberOfUnits;
private List percentageDetails;
private List quantity;
private List priceDetails;
private List monetaryAmount;
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(numberOfUnits != null && !numberOfUnits.isEmpty()) {
for(NumberOfUnits numberOfUnitsInst : numberOfUnits) {
nodeWriter.write("EQN");
nodeWriter.write(delimiters.getField());
numberOfUnitsInst.write(nodeWriter, delimiters);
}
}
if(percentageDetails != null && !percentageDetails.isEmpty()) {
for(PercentageDetails percentageDetailsInst : percentageDetails) {
nodeWriter.write("PCD");
nodeWriter.write(delimiters.getField());
percentageDetailsInst.write(nodeWriter, delimiters);
}
}
if(quantity != null && !quantity.isEmpty()) {
for(Quantity quantityInst : quantity) {
nodeWriter.write("QTY");
nodeWriter.write(delimiters.getField());
quantityInst.write(nodeWriter, delimiters);
}
}
if(priceDetails != null && !priceDetails.isEmpty()) {
for(PriceDetails priceDetailsInst : priceDetails) {
nodeWriter.write("PRI");
nodeWriter.write(delimiters.getField());
priceDetailsInst.write(nodeWriter, delimiters);
}
}
if(monetaryAmount != null && !monetaryAmount.isEmpty()) {
for(MonetaryAmount monetaryAmountInst : monetaryAmount) {
nodeWriter.write("MOA");
nodeWriter.write(delimiters.getField());
monetaryAmountInst.write(nodeWriter, delimiters);
}
}
}
public ChargeRateCalculations getChargeRateCalculations() {
return chargeRateCalculations;
}
public SegmentGroup6 setChargeRateCalculations(ChargeRateCalculations chargeRateCalculations) {
this.chargeRateCalculations = chargeRateCalculations; return this;
}
public List getNumberOfUnits() {
return numberOfUnits;
}
public SegmentGroup6 setNumberOfUnits(List numberOfUnits) {
this.numberOfUnits = numberOfUnits; return this;
}
public List getPercentageDetails() {
return percentageDetails;
}
public SegmentGroup6 setPercentageDetails(List percentageDetails) {
this.percentageDetails = percentageDetails; return this;
}
public List getQuantity() {
return quantity;
}
public SegmentGroup6 setQuantity(List quantity) {
this.quantity = quantity; return this;
}
public List getPriceDetails() {
return priceDetails;
}
public SegmentGroup6 setPriceDetails(List priceDetails) {
this.priceDetails = priceDetails; return this;
}
public List getMonetaryAmount() {
return monetaryAmount;
}
public SegmentGroup6 setMonetaryAmount(List monetaryAmount) {
this.monetaryAmount = monetaryAmount; return this;
}
}