org.milyn.edi.unedifact.d05a.FINSTA.SegmentGroup6 Maven / Gradle / Ivy
/**
* This class was generated by Smooks EJC (http://www.smooks.org).
*/
package org.milyn.edi.unedifact.d05a.FINSTA;
import java.io.Serializable;
import org.milyn.smooks.edi.EDIWritable;
import org.milyn.edi.unedifact.d05a.common.SequenceDetails;
import java.util.List;
import org.milyn.edi.unedifact.d05a.common.Reference;
import org.milyn.edi.unedifact.d05a.common.DateTimePeriod;
import org.milyn.edi.unedifact.d05a.common.BusinessFunction;
import org.milyn.edi.unedifact.d05a.common.MonetaryAmount;
import org.milyn.edi.unedifact.d05a.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 SequenceDetails sequenceDetails;
private List reference;
private List dateTimePeriod;
private BusinessFunction businessFunction;
private MonetaryAmount monetaryAmount;
private FreeText freeText;
public void write(Writer writer, Delimiters delimiters) throws IOException {
Writer nodeWriter = writer;
if(sequenceDetails != null) {
nodeWriter.write("SEQ");
nodeWriter.write(delimiters.getField());
sequenceDetails.write(nodeWriter, delimiters);
}
if(reference != null && !reference.isEmpty()) {
for(Reference referenceInst : reference) {
nodeWriter.write("RFF");
nodeWriter.write(delimiters.getField());
referenceInst.write(nodeWriter, delimiters);
}
}
if(dateTimePeriod != null && !dateTimePeriod.isEmpty()) {
for(DateTimePeriod dateTimePeriodInst : dateTimePeriod) {
nodeWriter.write("DTM");
nodeWriter.write(delimiters.getField());
dateTimePeriodInst.write(nodeWriter, delimiters);
}
}
if(businessFunction != null) {
nodeWriter.write("BUS");
nodeWriter.write(delimiters.getField());
businessFunction.write(nodeWriter, delimiters);
}
if(monetaryAmount != null) {
nodeWriter.write("MOA");
nodeWriter.write(delimiters.getField());
monetaryAmount.write(nodeWriter, delimiters);
}
if(freeText != null) {
nodeWriter.write("FTX");
nodeWriter.write(delimiters.getField());
freeText.write(nodeWriter, delimiters);
}
}
public SequenceDetails getSequenceDetails() {
return sequenceDetails;
}
public SegmentGroup6 setSequenceDetails(SequenceDetails sequenceDetails) {
this.sequenceDetails = sequenceDetails; return this;
}
public List getReference() {
return reference;
}
public SegmentGroup6 setReference(List reference) {
this.reference = reference; return this;
}
public List getDateTimePeriod() {
return dateTimePeriod;
}
public SegmentGroup6 setDateTimePeriod(List dateTimePeriod) {
this.dateTimePeriod = dateTimePeriod; return this;
}
public BusinessFunction getBusinessFunction() {
return businessFunction;
}
public SegmentGroup6 setBusinessFunction(BusinessFunction businessFunction) {
this.businessFunction = businessFunction; return this;
}
public MonetaryAmount getMonetaryAmount() {
return monetaryAmount;
}
public SegmentGroup6 setMonetaryAmount(MonetaryAmount monetaryAmount) {
this.monetaryAmount = monetaryAmount; return this;
}
public FreeText getFreeText() {
return freeText;
}
public SegmentGroup6 setFreeText(FreeText freeText) {
this.freeText = freeText; return this;
}
}