org.milyn.edi.unedifact.d06b.IFTSAI.SegmentGroup12 Maven / Gradle / Ivy
/**
* This class was generated by Smooks EJC (http://www.smooks.org).
*/
package org.milyn.edi.unedifact.d06b.IFTSAI;
import java.io.Serializable;
import org.milyn.smooks.edi.EDIWritable;
import org.milyn.edi.unedifact.d06b.common.Dimensions;
import java.util.List;
import org.milyn.edi.unedifact.d06b.common.NumberOfUnits;
import java.io.Writer;
import org.milyn.edisax.model.internal.Delimiters;
import java.io.IOException;
public class SegmentGroup12 implements Serializable, EDIWritable {
private static final long serialVersionUID = 1L;
private Dimensions dimensions;
private List numberOfUnits;
public void write(Writer writer, Delimiters delimiters) throws IOException {
Writer nodeWriter = writer;
if(dimensions != null) {
nodeWriter.write("DIM");
nodeWriter.write(delimiters.getField());
dimensions.write(nodeWriter, delimiters);
}
if(numberOfUnits != null && !numberOfUnits.isEmpty()) {
for(NumberOfUnits numberOfUnitsInst : numberOfUnits) {
nodeWriter.write("EQN");
nodeWriter.write(delimiters.getField());
numberOfUnitsInst.write(nodeWriter, delimiters);
}
}
}
public Dimensions getDimensions() {
return dimensions;
}
public SegmentGroup12 setDimensions(Dimensions dimensions) {
this.dimensions = dimensions; return this;
}
public List getNumberOfUnits() {
return numberOfUnits;
}
public SegmentGroup12 setNumberOfUnits(List numberOfUnits) {
this.numberOfUnits = numberOfUnits; return this;
}
}