org.milyn.edi.unedifact.d06b.RECLAM.SegmentGroup2 Maven / Gradle / Ivy
/**
* This class was generated by Smooks EJC (http://www.smooks.org).
*/
package org.milyn.edi.unedifact.d06b.RECLAM;
import java.io.Serializable;
import org.milyn.smooks.edi.EDIWritable;
import org.milyn.edi.unedifact.d06b.common.NameAndAddress;
import org.milyn.edi.unedifact.d06b.common.PercentageDetails;
import org.milyn.edi.unedifact.d06b.common.ContactInformation;
import java.util.List;
import org.milyn.edi.unedifact.d06b.common.CommunicationContact;
import org.milyn.edi.unedifact.d06b.common.Reference;
import org.milyn.edi.unedifact.d06b.common.ProcessingInformation;
import org.milyn.edi.unedifact.d06b.common.FreeText;
import org.milyn.edi.unedifact.d06b.common.DateTimePeriod;
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 PercentageDetails percentageDetails;
private ContactInformation contactInformation;
private List communicationContact;
private List reference;
private List processingInformation;
private List freeText;
private List dateTimePeriod;
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(percentageDetails != null) {
nodeWriter.write("PCD");
nodeWriter.write(delimiters.getField());
percentageDetails.write(nodeWriter, delimiters);
}
if(contactInformation != null) {
nodeWriter.write("CTA");
nodeWriter.write(delimiters.getField());
contactInformation.write(nodeWriter, delimiters);
}
if(communicationContact != null && !communicationContact.isEmpty()) {
for(CommunicationContact communicationContactInst : communicationContact) {
nodeWriter.write("COM");
nodeWriter.write(delimiters.getField());
communicationContactInst.write(nodeWriter, delimiters);
}
}
if(reference != null && !reference.isEmpty()) {
for(Reference referenceInst : reference) {
nodeWriter.write("RFF");
nodeWriter.write(delimiters.getField());
referenceInst.write(nodeWriter, delimiters);
}
}
if(processingInformation != null && !processingInformation.isEmpty()) {
for(ProcessingInformation processingInformationInst : processingInformation) {
nodeWriter.write("GEI");
nodeWriter.write(delimiters.getField());
processingInformationInst.write(nodeWriter, delimiters);
}
}
if(freeText != null && !freeText.isEmpty()) {
for(FreeText freeTextInst : freeText) {
nodeWriter.write("FTX");
nodeWriter.write(delimiters.getField());
freeTextInst.write(nodeWriter, delimiters);
}
}
if(dateTimePeriod != null && !dateTimePeriod.isEmpty()) {
for(DateTimePeriod dateTimePeriodInst : dateTimePeriod) {
nodeWriter.write("DTM");
nodeWriter.write(delimiters.getField());
dateTimePeriodInst.write(nodeWriter, delimiters);
}
}
}
public NameAndAddress getNameAndAddress() {
return nameAndAddress;
}
public SegmentGroup2 setNameAndAddress(NameAndAddress nameAndAddress) {
this.nameAndAddress = nameAndAddress; return this;
}
public PercentageDetails getPercentageDetails() {
return percentageDetails;
}
public SegmentGroup2 setPercentageDetails(PercentageDetails percentageDetails) {
this.percentageDetails = percentageDetails; return this;
}
public ContactInformation getContactInformation() {
return contactInformation;
}
public SegmentGroup2 setContactInformation(ContactInformation contactInformation) {
this.contactInformation = contactInformation; return this;
}
public List getCommunicationContact() {
return communicationContact;
}
public SegmentGroup2 setCommunicationContact(List communicationContact) {
this.communicationContact = communicationContact; return this;
}
public List getReference() {
return reference;
}
public SegmentGroup2 setReference(List reference) {
this.reference = reference; return this;
}
public List getProcessingInformation() {
return processingInformation;
}
public SegmentGroup2 setProcessingInformation(List processingInformation) {
this.processingInformation = processingInformation; return this;
}
public List getFreeText() {
return freeText;
}
public SegmentGroup2 setFreeText(List freeText) {
this.freeText = freeText; return this;
}
public List getDateTimePeriod() {
return dateTimePeriod;
}
public SegmentGroup2 setDateTimePeriod(List dateTimePeriod) {
this.dateTimePeriod = dateTimePeriod; return this;
}
}