org.milyn.edi.unedifact.d06b.IPPOMO.SegmentGroup6 Maven / Gradle / Ivy
/**
* This class was generated by Smooks EJC (http://www.smooks.org).
*/
package org.milyn.edi.unedifact.d06b.IPPOMO;
import java.io.Serializable;
import org.milyn.smooks.edi.EDIWritable;
import org.milyn.edi.unedifact.d06b.common.Attribute;
import org.milyn.edi.unedifact.d06b.common.PercentageDetails;
import java.util.List;
import org.milyn.edi.unedifact.d06b.common.MonetaryAmount;
import org.milyn.edi.unedifact.d06b.common.FreeText;
import java.io.Writer;
import org.milyn.edisax.model.internal.Delimiters;
import java.io.IOException;
public class SegmentGroup6 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 SegmentGroup6 setAttribute(Attribute attribute) {
this.attribute = attribute; return this;
}
public PercentageDetails getPercentageDetails() {
return percentageDetails;
}
public SegmentGroup6 setPercentageDetails(PercentageDetails percentageDetails) {
this.percentageDetails = percentageDetails; return this;
}
public List getMonetaryAmount() {
return monetaryAmount;
}
public SegmentGroup6 setMonetaryAmount(List monetaryAmount) {
this.monetaryAmount = monetaryAmount; return this;
}
public List getFreeText() {
return freeText;
}
public SegmentGroup6 setFreeText(List freeText) {
this.freeText = freeText; return this;
}
}