org.milyn.edi.unedifact.d05a.RECLAM.SegmentGroup9 Maven / Gradle / Ivy
/**
* This class was generated by Smooks EJC (http://www.smooks.org).
*/
package org.milyn.edi.unedifact.d05a.RECLAM;
import java.io.Serializable;
import org.milyn.smooks.edi.EDIWritable;
import org.milyn.edi.unedifact.d05a.common.MonetaryAmount;
import java.util.List;
import org.milyn.edi.unedifact.d05a.common.PercentageDetails;
import org.milyn.edi.unedifact.d05a.common.Currencies;
import org.milyn.edi.unedifact.d05a.common.FreeText;
import org.milyn.edi.unedifact.d05a.common.ProcessingInformation;
import java.io.Writer;
import org.milyn.edisax.model.internal.Delimiters;
import java.io.IOException;
public class SegmentGroup9 implements Serializable, EDIWritable {
private static final long serialVersionUID = 1L;
private MonetaryAmount monetaryAmount;
private List percentageDetails;
private Currencies currencies;
private List freeText;
private List segmentGroup10;
private List processingInformation;
public void write(Writer writer, Delimiters delimiters) throws IOException {
Writer nodeWriter = writer;
if(monetaryAmount != null) {
nodeWriter.write("MOA");
nodeWriter.write(delimiters.getField());
monetaryAmount.write(nodeWriter, delimiters);
}
if(percentageDetails != null && !percentageDetails.isEmpty()) {
for(PercentageDetails percentageDetailsInst : percentageDetails) {
nodeWriter.write("PCD");
nodeWriter.write(delimiters.getField());
percentageDetailsInst.write(nodeWriter, delimiters);
}
}
if(currencies != null) {
nodeWriter.write("CUX");
nodeWriter.write(delimiters.getField());
currencies.write(nodeWriter, delimiters);
}
if(freeText != null && !freeText.isEmpty()) {
for(FreeText freeTextInst : freeText) {
nodeWriter.write("FTX");
nodeWriter.write(delimiters.getField());
freeTextInst.write(nodeWriter, delimiters);
}
}
if(segmentGroup10 != null && !segmentGroup10.isEmpty()) {
for(SegmentGroup10 segmentGroup10Inst : segmentGroup10) {
segmentGroup10Inst.write(nodeWriter, delimiters);
}
}
if(processingInformation != null && !processingInformation.isEmpty()) {
for(ProcessingInformation processingInformationInst : processingInformation) {
nodeWriter.write("GEI");
nodeWriter.write(delimiters.getField());
processingInformationInst.write(nodeWriter, delimiters);
}
}
}
public MonetaryAmount getMonetaryAmount() {
return monetaryAmount;
}
public SegmentGroup9 setMonetaryAmount(MonetaryAmount monetaryAmount) {
this.monetaryAmount = monetaryAmount; return this;
}
public List getPercentageDetails() {
return percentageDetails;
}
public SegmentGroup9 setPercentageDetails(List percentageDetails) {
this.percentageDetails = percentageDetails; return this;
}
public Currencies getCurrencies() {
return currencies;
}
public SegmentGroup9 setCurrencies(Currencies currencies) {
this.currencies = currencies; return this;
}
public List getFreeText() {
return freeText;
}
public SegmentGroup9 setFreeText(List freeText) {
this.freeText = freeText; return this;
}
public List getSegmentGroup10() {
return segmentGroup10;
}
public SegmentGroup9 setSegmentGroup10(List segmentGroup10) {
this.segmentGroup10 = segmentGroup10; return this;
}
public List getProcessingInformation() {
return processingInformation;
}
public SegmentGroup9 setProcessingInformation(List processingInformation) {
this.processingInformation = processingInformation; return this;
}
}