org.milyn.edi.unedifact.d96a.RESETT.SegmentGroup5 Maven / Gradle / Ivy
/**
* This class was generated by Smooks EJC (http://www.smooks.org).
*/
package org.milyn.edi.unedifact.d96a.RESETT;
import java.io.Serializable;
import org.milyn.smooks.edi.EDIWritable;
import org.milyn.edi.unedifact.d96a.common.NameAndAddress;
import org.milyn.edi.unedifact.d96a.common.ContactInformation;
import java.util.List;
import org.milyn.edi.unedifact.d96a.common.CommunicationContact;
import org.milyn.edi.unedifact.d96a.common.PercentageDetails;
import org.milyn.edi.unedifact.d96a.common.Reference;
import org.milyn.edi.unedifact.d96a.common.GeneralIndicator;
import org.milyn.edi.unedifact.d96a.common.MonetaryAmount;
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 NameAndAddress nameAndAddress;
private ContactInformation contactInformation;
private List communicationContact;
private PercentageDetails percentageDetails;
private List reference;
private GeneralIndicator generalIndicator;
private MonetaryAmount monetaryAmount;
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) {
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(percentageDetails != null) {
nodeWriter.write("PCD");
nodeWriter.write(delimiters.getField());
percentageDetails.write(nodeWriter, delimiters);
}
if(reference != null && !reference.isEmpty()) {
for(Reference referenceInst : reference) {
nodeWriter.write("RFF");
nodeWriter.write(delimiters.getField());
referenceInst.write(nodeWriter, delimiters);
}
}
if(generalIndicator != null) {
nodeWriter.write("GIS");
nodeWriter.write(delimiters.getField());
generalIndicator.write(nodeWriter, delimiters);
}
if(monetaryAmount != null) {
nodeWriter.write("MOA");
nodeWriter.write(delimiters.getField());
monetaryAmount.write(nodeWriter, delimiters);
}
}
public NameAndAddress getNameAndAddress() {
return nameAndAddress;
}
public SegmentGroup5 setNameAndAddress(NameAndAddress nameAndAddress) {
this.nameAndAddress = nameAndAddress; return this;
}
public ContactInformation getContactInformation() {
return contactInformation;
}
public SegmentGroup5 setContactInformation(ContactInformation contactInformation) {
this.contactInformation = contactInformation; return this;
}
public List getCommunicationContact() {
return communicationContact;
}
public SegmentGroup5 setCommunicationContact(List communicationContact) {
this.communicationContact = communicationContact; return this;
}
public PercentageDetails getPercentageDetails() {
return percentageDetails;
}
public SegmentGroup5 setPercentageDetails(PercentageDetails percentageDetails) {
this.percentageDetails = percentageDetails; return this;
}
public List getReference() {
return reference;
}
public SegmentGroup5 setReference(List reference) {
this.reference = reference; return this;
}
public GeneralIndicator getGeneralIndicator() {
return generalIndicator;
}
public SegmentGroup5 setGeneralIndicator(GeneralIndicator generalIndicator) {
this.generalIndicator = generalIndicator; return this;
}
public MonetaryAmount getMonetaryAmount() {
return monetaryAmount;
}
public SegmentGroup5 setMonetaryAmount(MonetaryAmount monetaryAmount) {
this.monetaryAmount = monetaryAmount; return this;
}
}