org.milyn.edi.unedifact.d96a.IFTMIN.SegmentGroup31 Maven / Gradle / Ivy
/**
* This class was generated by Smooks EJC (http://www.smooks.org).
*/
package org.milyn.edi.unedifact.d96a.IFTMIN;
import java.io.Serializable;
import org.milyn.smooks.edi.EDIWritable;
import org.milyn.edi.unedifact.d96a.common.TransportChargeRateCalculations;
import org.milyn.edi.unedifact.d96a.common.Currencies;
import org.milyn.edi.unedifact.d96a.common.PriceDetails;
import org.milyn.edi.unedifact.d96a.common.NumberOfUnits;
import org.milyn.edi.unedifact.d96a.common.PercentageDetails;
import java.util.List;
import org.milyn.edi.unedifact.d96a.common.MonetaryAmount;
import org.milyn.edi.unedifact.d96a.common.Quantity;
import org.milyn.edi.unedifact.d96a.common.PlaceLocationIdentification;
import java.io.Writer;
import org.milyn.edisax.model.internal.Delimiters;
import java.io.IOException;
public class SegmentGroup31 implements Serializable, EDIWritable {
private static final long serialVersionUID = 1L;
private TransportChargeRateCalculations transportChargeRateCalculations;
private Currencies currencies;
private PriceDetails priceDetails;
private NumberOfUnits numberOfUnits;
private PercentageDetails percentageDetails;
private List monetaryAmount;
private List quantity;
private List placeLocationIdentification;
public void write(Writer writer, Delimiters delimiters) throws IOException {
Writer nodeWriter = writer;
if(transportChargeRateCalculations != null) {
nodeWriter.write("TCC");
nodeWriter.write(delimiters.getField());
transportChargeRateCalculations.write(nodeWriter, delimiters);
}
if(currencies != null) {
nodeWriter.write("CUX");
nodeWriter.write(delimiters.getField());
currencies.write(nodeWriter, delimiters);
}
if(priceDetails != null) {
nodeWriter.write("PRI");
nodeWriter.write(delimiters.getField());
priceDetails.write(nodeWriter, delimiters);
}
if(numberOfUnits != null) {
nodeWriter.write("EQN");
nodeWriter.write(delimiters.getField());
numberOfUnits.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(quantity != null && !quantity.isEmpty()) {
for(Quantity quantityInst : quantity) {
nodeWriter.write("QTY");
nodeWriter.write(delimiters.getField());
quantityInst.write(nodeWriter, delimiters);
}
}
if(placeLocationIdentification != null && !placeLocationIdentification.isEmpty()) {
for(PlaceLocationIdentification placeLocationIdentificationInst : placeLocationIdentification) {
nodeWriter.write("LOC");
nodeWriter.write(delimiters.getField());
placeLocationIdentificationInst.write(nodeWriter, delimiters);
}
}
}
public TransportChargeRateCalculations getTransportChargeRateCalculations() {
return transportChargeRateCalculations;
}
public SegmentGroup31 setTransportChargeRateCalculations(TransportChargeRateCalculations transportChargeRateCalculations) {
this.transportChargeRateCalculations = transportChargeRateCalculations; return this;
}
public Currencies getCurrencies() {
return currencies;
}
public SegmentGroup31 setCurrencies(Currencies currencies) {
this.currencies = currencies; return this;
}
public PriceDetails getPriceDetails() {
return priceDetails;
}
public SegmentGroup31 setPriceDetails(PriceDetails priceDetails) {
this.priceDetails = priceDetails; return this;
}
public NumberOfUnits getNumberOfUnits() {
return numberOfUnits;
}
public SegmentGroup31 setNumberOfUnits(NumberOfUnits numberOfUnits) {
this.numberOfUnits = numberOfUnits; return this;
}
public PercentageDetails getPercentageDetails() {
return percentageDetails;
}
public SegmentGroup31 setPercentageDetails(PercentageDetails percentageDetails) {
this.percentageDetails = percentageDetails; return this;
}
public List getMonetaryAmount() {
return monetaryAmount;
}
public SegmentGroup31 setMonetaryAmount(List monetaryAmount) {
this.monetaryAmount = monetaryAmount; return this;
}
public List getQuantity() {
return quantity;
}
public SegmentGroup31 setQuantity(List quantity) {
this.quantity = quantity; return this;
}
public List getPlaceLocationIdentification() {
return placeLocationIdentification;
}
public SegmentGroup31 setPlaceLocationIdentification(List placeLocationIdentification) {
this.placeLocationIdentification = placeLocationIdentification; return this;
}
}