org.milyn.edi.unedifact.d05a.COPAYM.SegmentGroup3 Maven / Gradle / Ivy
/**
* This class was generated by Smooks EJC (http://www.smooks.org).
*/
package org.milyn.edi.unedifact.d05a.COPAYM;
import java.io.Serializable;
import org.milyn.smooks.edi.EDIWritable;
import org.milyn.edi.unedifact.d05a.common.ContributionDetails;
import org.milyn.edi.unedifact.d05a.common.DocumentLineIdentification;
import org.milyn.edi.unedifact.d05a.common.DateTimePeriod;
import java.util.List;
import org.milyn.edi.unedifact.d05a.common.PercentageDetails;
import org.milyn.edi.unedifact.d05a.common.MonetaryAmount;
import org.milyn.edi.unedifact.d05a.common.Quantity;
import org.milyn.edi.unedifact.d05a.common.Reference;
import org.milyn.edi.unedifact.d05a.common.Attribute;
import java.io.Writer;
import org.milyn.edisax.model.internal.Delimiters;
import java.io.IOException;
public class SegmentGroup3 implements Serializable, EDIWritable {
private static final long serialVersionUID = 1L;
private ContributionDetails contributionDetails;
private DocumentLineIdentification documentLineIdentification;
private DateTimePeriod dateTimePeriod;
private List percentageDetails;
private List monetaryAmount;
private List quantity;
private List reference;
private List attribute;
public void write(Writer writer, Delimiters delimiters) throws IOException {
Writer nodeWriter = writer;
if(contributionDetails != null) {
nodeWriter.write("COT");
nodeWriter.write(delimiters.getField());
contributionDetails.write(nodeWriter, delimiters);
}
if(documentLineIdentification != null) {
nodeWriter.write("DLI");
nodeWriter.write(delimiters.getField());
documentLineIdentification.write(nodeWriter, delimiters);
}
if(dateTimePeriod != null) {
nodeWriter.write("DTM");
nodeWriter.write(delimiters.getField());
dateTimePeriod.write(nodeWriter, delimiters);
}
if(percentageDetails != null && !percentageDetails.isEmpty()) {
for(PercentageDetails percentageDetailsInst : percentageDetails) {
nodeWriter.write("PCD");
nodeWriter.write(delimiters.getField());
percentageDetailsInst.write(nodeWriter, delimiters);
}
}
if(monetaryAmount != null && !monetaryAmount.isEmpty()) {
for(MonetaryAmount monetaryAmountInst : monetaryAmount) {
nodeWriter.write("MOA");
nodeWriter.write(delimiters.getField());
monetaryAmountInst.write(nodeWriter, delimiters);
}
}
if(quantity != null && !quantity.isEmpty()) {
for(Quantity quantityInst : quantity) {
nodeWriter.write("QTY");
nodeWriter.write(delimiters.getField());
quantityInst.write(nodeWriter, delimiters);
}
}
if(reference != null && !reference.isEmpty()) {
for(Reference referenceInst : reference) {
nodeWriter.write("RFF");
nodeWriter.write(delimiters.getField());
referenceInst.write(nodeWriter, delimiters);
}
}
if(attribute != null && !attribute.isEmpty()) {
for(Attribute attributeInst : attribute) {
nodeWriter.write("ATT");
nodeWriter.write(delimiters.getField());
attributeInst.write(nodeWriter, delimiters);
}
}
}
public ContributionDetails getContributionDetails() {
return contributionDetails;
}
public SegmentGroup3 setContributionDetails(ContributionDetails contributionDetails) {
this.contributionDetails = contributionDetails; return this;
}
public DocumentLineIdentification getDocumentLineIdentification() {
return documentLineIdentification;
}
public SegmentGroup3 setDocumentLineIdentification(DocumentLineIdentification documentLineIdentification) {
this.documentLineIdentification = documentLineIdentification; return this;
}
public DateTimePeriod getDateTimePeriod() {
return dateTimePeriod;
}
public SegmentGroup3 setDateTimePeriod(DateTimePeriod dateTimePeriod) {
this.dateTimePeriod = dateTimePeriod; return this;
}
public List getPercentageDetails() {
return percentageDetails;
}
public SegmentGroup3 setPercentageDetails(List percentageDetails) {
this.percentageDetails = percentageDetails; return this;
}
public List getMonetaryAmount() {
return monetaryAmount;
}
public SegmentGroup3 setMonetaryAmount(List monetaryAmount) {
this.monetaryAmount = monetaryAmount; return this;
}
public List getQuantity() {
return quantity;
}
public SegmentGroup3 setQuantity(List quantity) {
this.quantity = quantity; return this;
}
public List getReference() {
return reference;
}
public SegmentGroup3 setReference(List reference) {
this.reference = reference; return this;
}
public List getAttribute() {
return attribute;
}
public SegmentGroup3 setAttribute(List attribute) {
this.attribute = attribute; return this;
}
}