org.milyn.edi.unedifact.d96a.DESADV.SegmentGroup20 Maven / Gradle / Ivy
/**
* This class was generated by Smooks EJC (http://www.smooks.org).
*/
package org.milyn.edi.unedifact.d96a.DESADV;
import java.io.Serializable;
import org.milyn.smooks.edi.EDIWritable;
import org.milyn.edi.unedifact.d96a.common.PackageIdentification;
import java.util.List;
import org.milyn.edi.unedifact.d96a.common.DateTimePeriod;
import org.milyn.edi.unedifact.d96a.common.Measurements;
import org.milyn.edi.unedifact.d96a.common.Quantity;
import java.io.Writer;
import org.milyn.edisax.model.internal.Delimiters;
import java.io.IOException;
public class SegmentGroup20 implements Serializable, EDIWritable {
private static final long serialVersionUID = 1L;
private PackageIdentification packageIdentification;
private List dateTimePeriod;
private List measurements;
private Quantity quantity;
private List segmentGroup21;
private List segmentGroup22;
public void write(Writer writer, Delimiters delimiters) throws IOException {
Writer nodeWriter = writer;
if(packageIdentification != null) {
nodeWriter.write("PCI");
nodeWriter.write(delimiters.getField());
packageIdentification.write(nodeWriter, delimiters);
}
if(dateTimePeriod != null && !dateTimePeriod.isEmpty()) {
for(DateTimePeriod dateTimePeriodInst : dateTimePeriod) {
nodeWriter.write("DTM");
nodeWriter.write(delimiters.getField());
dateTimePeriodInst.write(nodeWriter, delimiters);
}
}
if(measurements != null && !measurements.isEmpty()) {
for(Measurements measurementsInst : measurements) {
nodeWriter.write("MEA");
nodeWriter.write(delimiters.getField());
measurementsInst.write(nodeWriter, delimiters);
}
}
if(quantity != null) {
nodeWriter.write("QTY");
nodeWriter.write(delimiters.getField());
quantity.write(nodeWriter, delimiters);
}
if(segmentGroup21 != null && !segmentGroup21.isEmpty()) {
for(SegmentGroup21 segmentGroup21Inst : segmentGroup21) {
segmentGroup21Inst.write(nodeWriter, delimiters);
}
}
if(segmentGroup22 != null && !segmentGroup22.isEmpty()) {
for(SegmentGroup22 segmentGroup22Inst : segmentGroup22) {
segmentGroup22Inst.write(nodeWriter, delimiters);
}
}
}
public PackageIdentification getPackageIdentification() {
return packageIdentification;
}
public SegmentGroup20 setPackageIdentification(PackageIdentification packageIdentification) {
this.packageIdentification = packageIdentification; return this;
}
public List getDateTimePeriod() {
return dateTimePeriod;
}
public SegmentGroup20 setDateTimePeriod(List dateTimePeriod) {
this.dateTimePeriod = dateTimePeriod; return this;
}
public List getMeasurements() {
return measurements;
}
public SegmentGroup20 setMeasurements(List measurements) {
this.measurements = measurements; return this;
}
public Quantity getQuantity() {
return quantity;
}
public SegmentGroup20 setQuantity(Quantity quantity) {
this.quantity = quantity; return this;
}
public List getSegmentGroup21() {
return segmentGroup21;
}
public SegmentGroup20 setSegmentGroup21(List segmentGroup21) {
this.segmentGroup21 = segmentGroup21; return this;
}
public List getSegmentGroup22() {
return segmentGroup22;
}
public SegmentGroup20 setSegmentGroup22(List segmentGroup22) {
this.segmentGroup22 = segmentGroup22; return this;
}
}