org.milyn.edi.unedifact.d06b.HANMOV.SegmentGroup1 Maven / Gradle / Ivy
/**
* This class was generated by Smooks EJC (http://www.smooks.org).
*/
package org.milyn.edi.unedifact.d06b.HANMOV;
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.PlaceLocationIdentification;
import org.milyn.edi.unedifact.d06b.common.FreeText;
import org.milyn.edi.unedifact.d06b.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 ChargeRateCalculations chargeRateCalculations;
private List placeLocationIdentification;
private List freeText;
private List currencies;
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(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 ChargeRateCalculations getChargeRateCalculations() {
return chargeRateCalculations;
}
public SegmentGroup1 setChargeRateCalculations(ChargeRateCalculations chargeRateCalculations) {
this.chargeRateCalculations = chargeRateCalculations; 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;
}
}