org.milyn.edi.unedifact.d06b.BALANC.SegmentGroup4 Maven / Gradle / Ivy
/**
* This class was generated by Smooks EJC (http://www.smooks.org).
*/
package org.milyn.edi.unedifact.d06b.BALANC;
import java.io.Serializable;
import org.milyn.smooks.edi.EDIWritable;
import org.milyn.edi.unedifact.d06b.common.LineItem;
import java.util.List;
import org.milyn.edi.unedifact.d06b.common.MonetaryAmount;
import org.milyn.edi.unedifact.d06b.common.DateTimePeriod;
import org.milyn.edi.unedifact.d06b.common.Reference;
import org.milyn.edi.unedifact.d06b.common.Quantity;
import java.io.Writer;
import org.milyn.edisax.model.internal.Delimiters;
import java.io.IOException;
public class SegmentGroup4 implements Serializable, EDIWritable {
private static final long serialVersionUID = 1L;
private LineItem lineItem;
private List monetaryAmount;
private DateTimePeriod dateTimePeriod;
private Reference reference;
private List quantity;
private List segmentGroup5;
public void write(Writer writer, Delimiters delimiters) throws IOException {
Writer nodeWriter = writer;
if(lineItem != null) {
nodeWriter.write("LIN");
nodeWriter.write(delimiters.getField());
lineItem.write(nodeWriter, delimiters);
}
if(monetaryAmount != null && !monetaryAmount.isEmpty()) {
for(MonetaryAmount monetaryAmountInst : monetaryAmount) {
nodeWriter.write("MOA");
nodeWriter.write(delimiters.getField());
monetaryAmountInst.write(nodeWriter, delimiters);
}
}
if(dateTimePeriod != null) {
nodeWriter.write("DTM");
nodeWriter.write(delimiters.getField());
dateTimePeriod.write(nodeWriter, delimiters);
}
if(reference != null) {
nodeWriter.write("RFF");
nodeWriter.write(delimiters.getField());
reference.write(nodeWriter, delimiters);
}
if(quantity != null && !quantity.isEmpty()) {
for(Quantity quantityInst : quantity) {
nodeWriter.write("QTY");
nodeWriter.write(delimiters.getField());
quantityInst.write(nodeWriter, delimiters);
}
}
if(segmentGroup5 != null && !segmentGroup5.isEmpty()) {
for(SegmentGroup5 segmentGroup5Inst : segmentGroup5) {
segmentGroup5Inst.write(nodeWriter, delimiters);
}
}
}
public LineItem getLineItem() {
return lineItem;
}
public SegmentGroup4 setLineItem(LineItem lineItem) {
this.lineItem = lineItem; return this;
}
public List getMonetaryAmount() {
return monetaryAmount;
}
public SegmentGroup4 setMonetaryAmount(List monetaryAmount) {
this.monetaryAmount = monetaryAmount; return this;
}
public DateTimePeriod getDateTimePeriod() {
return dateTimePeriod;
}
public SegmentGroup4 setDateTimePeriod(DateTimePeriod dateTimePeriod) {
this.dateTimePeriod = dateTimePeriod; return this;
}
public Reference getReference() {
return reference;
}
public SegmentGroup4 setReference(Reference reference) {
this.reference = reference; return this;
}
public List getQuantity() {
return quantity;
}
public SegmentGroup4 setQuantity(List quantity) {
this.quantity = quantity; return this;
}
public List getSegmentGroup5() {
return segmentGroup5;
}
public SegmentGroup4 setSegmentGroup5(List segmentGroup5) {
this.segmentGroup5 = segmentGroup5; return this;
}
}