org.milyn.edi.unedifact.d06b.DESADV.SegmentGroup16 Maven / Gradle / Ivy
/**
* This class was generated by Smooks EJC (http://www.smooks.org).
*/
package org.milyn.edi.unedifact.d06b.DESADV;
import java.io.Serializable;
import org.milyn.smooks.edi.EDIWritable;
import org.milyn.edi.unedifact.d06b.common.ComponentDetails;
import java.util.List;
import org.milyn.edi.unedifact.d06b.common.Measurements;
import org.milyn.edi.unedifact.d06b.common.Quantity;
import org.milyn.edi.unedifact.d06b.common.PercentageDetails;
import java.io.Writer;
import org.milyn.edisax.model.internal.Delimiters;
import java.io.IOException;
public class SegmentGroup16 implements Serializable, EDIWritable {
private static final long serialVersionUID = 1L;
private ComponentDetails componentDetails;
private List measurements;
private List quantity;
private List percentageDetails;
public void write(Writer writer, Delimiters delimiters) throws IOException {
Writer nodeWriter = writer;
if(componentDetails != null) {
nodeWriter.write("COD");
nodeWriter.write(delimiters.getField());
componentDetails.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 && !quantity.isEmpty()) {
for(Quantity quantityInst : quantity) {
nodeWriter.write("QTY");
nodeWriter.write(delimiters.getField());
quantityInst.write(nodeWriter, delimiters);
}
}
if(percentageDetails != null && !percentageDetails.isEmpty()) {
for(PercentageDetails percentageDetailsInst : percentageDetails) {
nodeWriter.write("PCD");
nodeWriter.write(delimiters.getField());
percentageDetailsInst.write(nodeWriter, delimiters);
}
}
}
public ComponentDetails getComponentDetails() {
return componentDetails;
}
public SegmentGroup16 setComponentDetails(ComponentDetails componentDetails) {
this.componentDetails = componentDetails; return this;
}
public List getMeasurements() {
return measurements;
}
public SegmentGroup16 setMeasurements(List measurements) {
this.measurements = measurements; return this;
}
public List getQuantity() {
return quantity;
}
public SegmentGroup16 setQuantity(List quantity) {
this.quantity = quantity; return this;
}
public List getPercentageDetails() {
return percentageDetails;
}
public SegmentGroup16 setPercentageDetails(List percentageDetails) {
this.percentageDetails = percentageDetails; return this;
}
}