org.milyn.edi.unedifact.d02a.BAPLTE.SegmentGroup6 Maven / Gradle / Ivy
/**
* This class was generated by Smooks EJC (http://www.smooks.org).
*/
package org.milyn.edi.unedifact.d02a.BAPLTE;
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.NumberOfUnits;
import java.util.List;
import org.milyn.edi.unedifact.d02a.common.Reference;
import java.io.Writer;
import org.milyn.edisax.model.internal.Delimiters;
import java.io.IOException;
public class SegmentGroup6 implements Serializable, EDIWritable {
private static final long serialVersionUID = 1L;
private EquipmentDetails equipmentDetails;
private NumberOfUnits numberOfUnits;
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) {
nodeWriter.write("EQN");
nodeWriter.write(delimiters.getField());
numberOfUnits.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 SegmentGroup6 setEquipmentDetails(EquipmentDetails equipmentDetails) {
this.equipmentDetails = equipmentDetails; return this;
}
public NumberOfUnits getNumberOfUnits() {
return numberOfUnits;
}
public SegmentGroup6 setNumberOfUnits(NumberOfUnits numberOfUnits) {
this.numberOfUnits = numberOfUnits; return this;
}
public List getReference() {
return reference;
}
public SegmentGroup6 setReference(List reference) {
this.reference = reference; return this;
}
}