org.milyn.edi.unedifact.d02a.COSTOR.SegmentGroup11 Maven / Gradle / Ivy
/**
* This class was generated by Smooks EJC (http://www.smooks.org).
*/
package org.milyn.edi.unedifact.d02a.COSTOR;
import java.io.Serializable;
import org.milyn.smooks.edi.EDIWritable;
import org.milyn.edi.unedifact.d02a.common.ConsignmentInformation;
import java.util.List;
import org.milyn.edi.unedifact.d02a.common.Reference;
import org.milyn.edi.unedifact.d02a.common.NameAndAddress;
import java.io.Writer;
import org.milyn.edisax.model.internal.Delimiters;
import java.io.IOException;
public class SegmentGroup11 implements Serializable, EDIWritable {
private static final long serialVersionUID = 1L;
private ConsignmentInformation consignmentInformation;
private List reference;
private List nameAndAddress;
private List segmentGroup12;
public void write(Writer writer, Delimiters delimiters) throws IOException {
Writer nodeWriter = writer;
if(consignmentInformation != null) {
nodeWriter.write("CNI");
nodeWriter.write(delimiters.getField());
consignmentInformation.write(nodeWriter, delimiters);
}
if(reference != null && !reference.isEmpty()) {
for(Reference referenceInst : reference) {
nodeWriter.write("RFF");
nodeWriter.write(delimiters.getField());
referenceInst.write(nodeWriter, delimiters);
}
}
if(nameAndAddress != null && !nameAndAddress.isEmpty()) {
for(NameAndAddress nameAndAddressInst : nameAndAddress) {
nodeWriter.write("NAD");
nodeWriter.write(delimiters.getField());
nameAndAddressInst.write(nodeWriter, delimiters);
}
}
if(segmentGroup12 != null && !segmentGroup12.isEmpty()) {
for(SegmentGroup12 segmentGroup12Inst : segmentGroup12) {
segmentGroup12Inst.write(nodeWriter, delimiters);
}
}
}
public ConsignmentInformation getConsignmentInformation() {
return consignmentInformation;
}
public SegmentGroup11 setConsignmentInformation(ConsignmentInformation consignmentInformation) {
this.consignmentInformation = consignmentInformation; return this;
}
public List getReference() {
return reference;
}
public SegmentGroup11 setReference(List reference) {
this.reference = reference; return this;
}
public List getNameAndAddress() {
return nameAndAddress;
}
public SegmentGroup11 setNameAndAddress(List nameAndAddress) {
this.nameAndAddress = nameAndAddress; return this;
}
public List getSegmentGroup12() {
return segmentGroup12;
}
public SegmentGroup11 setSegmentGroup12(List segmentGroup12) {
this.segmentGroup12 = segmentGroup12; return this;
}
}