org.milyn.edi.unedifact.d99b.HANMOV.SegmentGroup1 Maven / Gradle / Ivy
/**
* This class was generated by Smooks EJC (http://www.smooks.org).
*/
package org.milyn.edi.unedifact.d99b.HANMOV;
import java.io.Serializable;
import org.milyn.smooks.edi.EDIWritable;
import org.milyn.edi.unedifact.d99b.common.TransportChargeRateCalculations;
import java.util.List;
import org.milyn.edi.unedifact.d99b.common.PlaceLocationIdentification;
import org.milyn.edi.unedifact.d99b.common.FreeText;
import org.milyn.edi.unedifact.d99b.common.Currencies;
import java.io.Writer;
import org.milyn.edisax.model.internal.Delimiters;
import java.io.IOException;
public class SegmentGroup1 implements Serializable, EDIWritable {
private static final long serialVersionUID = 1L;
private TransportChargeRateCalculations transportChargeRateCalculations;
private List placeLocationIdentification;
private List freeText;
private List currencies;
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(placeLocationIdentification != null && !placeLocationIdentification.isEmpty()) {
for(PlaceLocationIdentification placeLocationIdentificationInst : placeLocationIdentification) {
nodeWriter.write("LOC");
nodeWriter.write(delimiters.getField());
placeLocationIdentificationInst.write(nodeWriter, delimiters);
}
}
if(freeText != null && !freeText.isEmpty()) {
for(FreeText freeTextInst : freeText) {
nodeWriter.write("FTX");
nodeWriter.write(delimiters.getField());
freeTextInst.write(nodeWriter, delimiters);
}
}
if(currencies != null && !currencies.isEmpty()) {
for(Currencies currenciesInst : currencies) {
nodeWriter.write("CUX");
nodeWriter.write(delimiters.getField());
currenciesInst.write(nodeWriter, delimiters);
}
}
}
public TransportChargeRateCalculations getTransportChargeRateCalculations() {
return transportChargeRateCalculations;
}
public SegmentGroup1 setTransportChargeRateCalculations(TransportChargeRateCalculations transportChargeRateCalculations) {
this.transportChargeRateCalculations = transportChargeRateCalculations; return this;
}
public List getPlaceLocationIdentification() {
return placeLocationIdentification;
}
public SegmentGroup1 setPlaceLocationIdentification(List placeLocationIdentification) {
this.placeLocationIdentification = placeLocationIdentification; return this;
}
public List getFreeText() {
return freeText;
}
public SegmentGroup1 setFreeText(List freeText) {
this.freeText = freeText; return this;
}
public List getCurrencies() {
return currencies;
}
public SegmentGroup1 setCurrencies(List currencies) {
this.currencies = currencies; return this;
}
}