org.milyn.edi.unedifact.d96a.HANMOV.SegmentGroup16 Maven / Gradle / Ivy
/**
* This class was generated by Smooks EJC (http://www.smooks.org).
*/
package org.milyn.edi.unedifact.d96a.HANMOV;
import java.io.Serializable;
import org.milyn.smooks.edi.EDIWritable;
import org.milyn.edi.unedifact.d96a.common.EquipmentDetails;
import org.milyn.edi.unedifact.d96a.common.NumberOfUnits;
import org.milyn.edi.unedifact.d96a.common.SealNumber;
import java.util.List;
import org.milyn.edi.unedifact.d96a.common.AttachedEquipment;
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 EquipmentDetails equipmentDetails;
private NumberOfUnits numberOfUnits;
private SealNumber sealNumber;
private List attachedEquipment;
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(numberOfUnits != null) {
nodeWriter.write("EQN");
nodeWriter.write(delimiters.getField());
numberOfUnits.write(nodeWriter, delimiters);
}
if(sealNumber != null) {
nodeWriter.write("SEL");
nodeWriter.write(delimiters.getField());
sealNumber.write(nodeWriter, delimiters);
}
if(attachedEquipment != null && !attachedEquipment.isEmpty()) {
for(AttachedEquipment attachedEquipmentInst : attachedEquipment) {
nodeWriter.write("EQA");
nodeWriter.write(delimiters.getField());
attachedEquipmentInst.write(nodeWriter, delimiters);
}
}
}
public EquipmentDetails getEquipmentDetails() {
return equipmentDetails;
}
public SegmentGroup16 setEquipmentDetails(EquipmentDetails equipmentDetails) {
this.equipmentDetails = equipmentDetails; return this;
}
public NumberOfUnits getNumberOfUnits() {
return numberOfUnits;
}
public SegmentGroup16 setNumberOfUnits(NumberOfUnits numberOfUnits) {
this.numberOfUnits = numberOfUnits; return this;
}
public SealNumber getSealNumber() {
return sealNumber;
}
public SegmentGroup16 setSealNumber(SealNumber sealNumber) {
this.sealNumber = sealNumber; return this;
}
public List getAttachedEquipment() {
return attachedEquipment;
}
public SegmentGroup16 setAttachedEquipment(List attachedEquipment) {
this.attachedEquipment = attachedEquipment; return this;
}
}