org.milyn.edi.unedifact.d99b.IPPOMO.SegmentGroup29 Maven / Gradle / Ivy
/**
* This class was generated by Smooks EJC (http://www.smooks.org).
*/
package org.milyn.edi.unedifact.d99b.IPPOMO;
import java.io.Serializable;
import org.milyn.smooks.edi.EDIWritable;
import org.milyn.edi.unedifact.d99b.common.Attribute;
import org.milyn.edi.unedifact.d99b.common.PercentageDetails;
import java.util.List;
import org.milyn.edi.unedifact.d99b.common.MonetaryAmount;
import org.milyn.edi.unedifact.d99b.common.FreeText;
import java.io.Writer;
import org.milyn.edisax.model.internal.Delimiters;
import java.io.IOException;
public class SegmentGroup29 implements Serializable, EDIWritable {
private static final long serialVersionUID = 1L;
private Attribute attribute;
private PercentageDetails percentageDetails;
private List monetaryAmount;
private List freeText;
public void write(Writer writer, Delimiters delimiters) throws IOException {
Writer nodeWriter = writer;
if(attribute != null) {
nodeWriter.write("ATT");
nodeWriter.write(delimiters.getField());
attribute.write(nodeWriter, delimiters);
}
if(percentageDetails != null) {
nodeWriter.write("PCD");
nodeWriter.write(delimiters.getField());
percentageDetails.write(nodeWriter, delimiters);
}
if(monetaryAmount != null && !monetaryAmount.isEmpty()) {
for(MonetaryAmount monetaryAmountInst : monetaryAmount) {
nodeWriter.write("MOA");
nodeWriter.write(delimiters.getField());
monetaryAmountInst.write(nodeWriter, delimiters);
}
}
if(freeText != null && !freeText.isEmpty()) {
for(FreeText freeTextInst : freeText) {
nodeWriter.write("FTX");
nodeWriter.write(delimiters.getField());
freeTextInst.write(nodeWriter, delimiters);
}
}
}
public Attribute getAttribute() {
return attribute;
}
public SegmentGroup29 setAttribute(Attribute attribute) {
this.attribute = attribute; return this;
}
public PercentageDetails getPercentageDetails() {
return percentageDetails;
}
public SegmentGroup29 setPercentageDetails(PercentageDetails percentageDetails) {
this.percentageDetails = percentageDetails; return this;
}
public List getMonetaryAmount() {
return monetaryAmount;
}
public SegmentGroup29 setMonetaryAmount(List monetaryAmount) {
this.monetaryAmount = monetaryAmount; return this;
}
public List getFreeText() {
return freeText;
}
public SegmentGroup29 setFreeText(List freeText) {
this.freeText = freeText; return this;
}
}