org.milyn.edi.unedifact.d02a.BUSCRD.SegmentGroup22 Maven / Gradle / Ivy
/**
* This class was generated by Smooks EJC (http://www.smooks.org).
*/
package org.milyn.edi.unedifact.d02a.BUSCRD;
import java.io.Serializable;
import org.milyn.smooks.edi.EDIWritable;
import org.milyn.edi.unedifact.d02a.common.AdditionalPriceInformation;
import java.util.List;
import org.milyn.edi.unedifact.d02a.common.PlaceLocationIdentification;
import org.milyn.edi.unedifact.d02a.common.PercentageDetails;
import org.milyn.edi.unedifact.d02a.common.FreeText;
import java.io.Writer;
import org.milyn.edisax.model.internal.Delimiters;
import java.io.IOException;
public class SegmentGroup22 implements Serializable, EDIWritable {
private static final long serialVersionUID = 1L;
private AdditionalPriceInformation additionalPriceInformation;
private List placeLocationIdentification;
private PercentageDetails percentageDetails;
private List freeText;
public void write(Writer writer, Delimiters delimiters) throws IOException {
Writer nodeWriter = writer;
if(additionalPriceInformation != null) {
nodeWriter.write("APR");
nodeWriter.write(delimiters.getField());
additionalPriceInformation.write(nodeWriter, delimiters);
}
if(placeLocationIdentification != null && !placeLocationIdentification.isEmpty()) {
for(PlaceLocationIdentification placeLocationIdentificationInst : placeLocationIdentification) {
nodeWriter.write("LOC");
nodeWriter.write(delimiters.getField());
placeLocationIdentificationInst.write(nodeWriter, delimiters);
}
}
if(percentageDetails != null) {
nodeWriter.write("PCD");
nodeWriter.write(delimiters.getField());
percentageDetails.write(nodeWriter, delimiters);
}
if(freeText != null && !freeText.isEmpty()) {
for(FreeText freeTextInst : freeText) {
nodeWriter.write("FTX");
nodeWriter.write(delimiters.getField());
freeTextInst.write(nodeWriter, delimiters);
}
}
}
public AdditionalPriceInformation getAdditionalPriceInformation() {
return additionalPriceInformation;
}
public SegmentGroup22 setAdditionalPriceInformation(AdditionalPriceInformation additionalPriceInformation) {
this.additionalPriceInformation = additionalPriceInformation; return this;
}
public List getPlaceLocationIdentification() {
return placeLocationIdentification;
}
public SegmentGroup22 setPlaceLocationIdentification(List placeLocationIdentification) {
this.placeLocationIdentification = placeLocationIdentification; return this;
}
public PercentageDetails getPercentageDetails() {
return percentageDetails;
}
public SegmentGroup22 setPercentageDetails(PercentageDetails percentageDetails) {
this.percentageDetails = percentageDetails; return this;
}
public List getFreeText() {
return freeText;
}
public SegmentGroup22 setFreeText(List freeText) {
this.freeText = freeText; return this;
}
}