org.milyn.edi.unedifact.d05a.HANMOV.SegmentGroup23 Maven / Gradle / Ivy
/**
* This class was generated by Smooks EJC (http://www.smooks.org).
*/
package org.milyn.edi.unedifact.d05a.HANMOV;
import java.io.Serializable;
import org.milyn.smooks.edi.EDIWritable;
import org.milyn.edi.unedifact.d05a.common.EquipmentDetails;
import java.util.List;
import org.milyn.edi.unedifact.d05a.common.NumberOfUnits;
import org.milyn.edi.unedifact.d05a.common.SealNumber;
import org.milyn.edi.unedifact.d05a.common.AttachedEquipment;
import org.milyn.edi.unedifact.d05a.common.Reference;
import java.io.Writer;
import org.milyn.edisax.model.internal.Delimiters;
import java.io.IOException;
public class SegmentGroup23 implements Serializable, EDIWritable {
private static final long serialVersionUID = 1L;
private EquipmentDetails equipmentDetails;
private List numberOfUnits;
private List sealNumber;
private List attachedEquipment;
private List reference;
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 && !numberOfUnits.isEmpty()) {
for(NumberOfUnits numberOfUnitsInst : numberOfUnits) {
nodeWriter.write("EQN");
nodeWriter.write(delimiters.getField());
numberOfUnitsInst.write(nodeWriter, delimiters);
}
}
if(sealNumber != null && !sealNumber.isEmpty()) {
for(SealNumber sealNumberInst : sealNumber) {
nodeWriter.write("SEL");
nodeWriter.write(delimiters.getField());
sealNumberInst.write(nodeWriter, delimiters);
}
}
if(attachedEquipment != null && !attachedEquipment.isEmpty()) {
for(AttachedEquipment attachedEquipmentInst : attachedEquipment) {
nodeWriter.write("EQA");
nodeWriter.write(delimiters.getField());
attachedEquipmentInst.write(nodeWriter, delimiters);
}
}
if(reference != null && !reference.isEmpty()) {
for(Reference referenceInst : reference) {
nodeWriter.write("RFF");
nodeWriter.write(delimiters.getField());
referenceInst.write(nodeWriter, delimiters);
}
}
}
public EquipmentDetails getEquipmentDetails() {
return equipmentDetails;
}
public SegmentGroup23 setEquipmentDetails(EquipmentDetails equipmentDetails) {
this.equipmentDetails = equipmentDetails; return this;
}
public List getNumberOfUnits() {
return numberOfUnits;
}
public SegmentGroup23 setNumberOfUnits(List numberOfUnits) {
this.numberOfUnits = numberOfUnits; return this;
}
public List getSealNumber() {
return sealNumber;
}
public SegmentGroup23 setSealNumber(List sealNumber) {
this.sealNumber = sealNumber; return this;
}
public List getAttachedEquipment() {
return attachedEquipment;
}
public SegmentGroup23 setAttachedEquipment(List attachedEquipment) {
this.attachedEquipment = attachedEquipment; return this;
}
public List getReference() {
return reference;
}
public SegmentGroup23 setReference(List reference) {
this.reference = reference; return this;
}
}