org.milyn.edi.unedifact.d02a.DESTIM.SegmentGroup1 Maven / Gradle / Ivy
/**
* This class was generated by Smooks EJC (http://www.smooks.org).
*/
package org.milyn.edi.unedifact.d02a.DESTIM;
import java.io.Serializable;
import org.milyn.smooks.edi.EDIWritable;
import org.milyn.edi.unedifact.d02a.common.EquipmentDetails;
import org.milyn.edi.unedifact.d02a.common.Dimensions;
import java.util.List;
import org.milyn.edi.unedifact.d02a.common.ItemDescription;
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 EquipmentDetails equipmentDetails;
private Dimensions dimensions;
private List itemDescription;
public void write(Writer writer, Delimiters delimiters) throws IOException {
Writer nodeWriter = writer;
if(equipmentDetails != null) {
nodeWriter.write("EQD");
nodeWriter.write(delimiters.getField());
equipmentDetails.write(nodeWriter, delimiters);
}
if(dimensions != null) {
nodeWriter.write("DIM");
nodeWriter.write(delimiters.getField());
dimensions.write(nodeWriter, delimiters);
}
if(itemDescription != null && !itemDescription.isEmpty()) {
for(ItemDescription itemDescriptionInst : itemDescription) {
nodeWriter.write("IMD");
nodeWriter.write(delimiters.getField());
itemDescriptionInst.write(nodeWriter, delimiters);
}
}
}
public EquipmentDetails getEquipmentDetails() {
return equipmentDetails;
}
public SegmentGroup1 setEquipmentDetails(EquipmentDetails equipmentDetails) {
this.equipmentDetails = equipmentDetails; return this;
}
public Dimensions getDimensions() {
return dimensions;
}
public SegmentGroup1 setDimensions(Dimensions dimensions) {
this.dimensions = dimensions; return this;
}
public List getItemDescription() {
return itemDescription;
}
public SegmentGroup1 setItemDescription(List itemDescription) {
this.itemDescription = itemDescription; return this;
}
}