org.milyn.edi.unedifact.d96a.COHAOR.SegmentGroup2 Maven / Gradle / Ivy
/**
* This class was generated by Smooks EJC (http://www.smooks.org).
*/
package org.milyn.edi.unedifact.d96a.COHAOR;
import java.io.Serializable;
import org.milyn.smooks.edi.EDIWritable;
import org.milyn.edi.unedifact.d96a.common.NameAndAddress;
import java.util.List;
import org.milyn.edi.unedifact.d96a.common.ContactInformation;
import java.io.Writer;
import org.milyn.edisax.model.internal.Delimiters;
import java.io.IOException;
public class SegmentGroup2 implements Serializable, EDIWritable {
private static final long serialVersionUID = 1L;
private NameAndAddress nameAndAddress;
private List contactInformation;
public void write(Writer writer, Delimiters delimiters) throws IOException {
Writer nodeWriter = writer;
if(nameAndAddress != null) {
nodeWriter.write("NAD");
nodeWriter.write(delimiters.getField());
nameAndAddress.write(nodeWriter, delimiters);
}
if(contactInformation != null && !contactInformation.isEmpty()) {
for(ContactInformation contactInformationInst : contactInformation) {
nodeWriter.write("CTA");
nodeWriter.write(delimiters.getField());
contactInformationInst.write(nodeWriter, delimiters);
}
}
}
public NameAndAddress getNameAndAddress() {
return nameAndAddress;
}
public SegmentGroup2 setNameAndAddress(NameAndAddress nameAndAddress) {
this.nameAndAddress = nameAndAddress; return this;
}
public List getContactInformation() {
return contactInformation;
}
public SegmentGroup2 setContactInformation(List contactInformation) {
this.contactInformation = contactInformation; return this;
}
}