org.milyn.edi.unedifact.d96a.RECLAM.SegmentGroup9 Maven / Gradle / Ivy
/**
* This class was generated by Smooks EJC (http://www.smooks.org).
*/
package org.milyn.edi.unedifact.d96a.RECLAM;
import java.io.Serializable;
import org.milyn.smooks.edi.EDIWritable;
import org.milyn.edi.unedifact.d96a.common.MonetaryAmount;
import java.util.List;
import org.milyn.edi.unedifact.d96a.common.PercentageDetails;
import org.milyn.edi.unedifact.d96a.common.Currencies;
import org.milyn.edi.unedifact.d96a.common.FreeText;
import org.milyn.edi.unedifact.d96a.common.GeneralIndicator;
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 generalIndicator;
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(generalIndicator != null && !generalIndicator.isEmpty()) {
for(GeneralIndicator generalIndicatorInst : generalIndicator) {
nodeWriter.write("GIS");
nodeWriter.write(delimiters.getField());
generalIndicatorInst.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 getGeneralIndicator() {
return generalIndicator;
}
public SegmentGroup9 setGeneralIndicator(List generalIndicator) {
this.generalIndicator = generalIndicator; return this;
}
}