org.milyn.edi.unedifact.d99b.JUPREQ.SegmentGroup5 Maven / Gradle / Ivy
/**
* This class was generated by Smooks EJC (http://www.smooks.org).
*/
package org.milyn.edi.unedifact.d99b.JUPREQ;
import java.io.Serializable;
import org.milyn.smooks.edi.EDIWritable;
import org.milyn.edi.unedifact.d99b.common.DocumentMessageSummary;
import java.util.List;
import org.milyn.edi.unedifact.d99b.common.Reference;
import org.milyn.edi.unedifact.d99b.common.NameAndAddress;
import java.io.Writer;
import org.milyn.edisax.model.internal.Delimiters;
import java.io.IOException;
public class SegmentGroup5 implements Serializable, EDIWritable {
private static final long serialVersionUID = 1L;
private DocumentMessageSummary documentMessageSummary;
private List reference;
private List nameAndAddress;
public void write(Writer writer, Delimiters delimiters) throws IOException {
Writer nodeWriter = writer;
if(documentMessageSummary != null) {
nodeWriter.write("DMS");
nodeWriter.write(delimiters.getField());
documentMessageSummary.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);
}
}
}
public DocumentMessageSummary getDocumentMessageSummary() {
return documentMessageSummary;
}
public SegmentGroup5 setDocumentMessageSummary(DocumentMessageSummary documentMessageSummary) {
this.documentMessageSummary = documentMessageSummary; return this;
}
public List getReference() {
return reference;
}
public SegmentGroup5 setReference(List reference) {
this.reference = reference; return this;
}
public List getNameAndAddress() {
return nameAndAddress;
}
public SegmentGroup5 setNameAndAddress(List nameAndAddress) {
this.nameAndAddress = nameAndAddress; return this;
}
}