org.milyn.edi.unedifact.d05a.DAPLOS.SegmentGroup2 Maven / Gradle / Ivy
/**
* This class was generated by Smooks EJC (http://www.smooks.org).
*/
package org.milyn.edi.unedifact.d05a.DAPLOS;
import java.io.Serializable;
import org.milyn.smooks.edi.EDIWritable;
import org.milyn.edi.unedifact.d05a.common.LineItem;
import java.util.List;
import org.milyn.edi.unedifact.d05a.common.DateTimePeriod;
import org.milyn.edi.unedifact.d05a.common.AdditionalProductId;
import org.milyn.edi.unedifact.d05a.common.Quantity;
import java.io.Writer;
import org.milyn.edisax.model.internal.Delimiters;
import java.io.IOException;
public class SegmentGroup2 implements Serializable, EDIWritable {
private static final long serialVersionUID = 1L;
private LineItem lineItem;
private List dateTimePeriod;
private List additionalProductId;
private Quantity quantity;
private List segmentGroup3;
private List segmentGroup4;
private List segmentGroup6;
private List segmentGroup8;
private List segmentGroup11;
private List segmentGroup12;
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(dateTimePeriod != null && !dateTimePeriod.isEmpty()) {
for(DateTimePeriod dateTimePeriodInst : dateTimePeriod) {
nodeWriter.write("DTM");
nodeWriter.write(delimiters.getField());
dateTimePeriodInst.write(nodeWriter, delimiters);
}
}
if(additionalProductId != null && !additionalProductId.isEmpty()) {
for(AdditionalProductId additionalProductIdInst : additionalProductId) {
nodeWriter.write("PIA");
nodeWriter.write(delimiters.getField());
additionalProductIdInst.write(nodeWriter, delimiters);
}
}
if(quantity != null) {
nodeWriter.write("QTY");
nodeWriter.write(delimiters.getField());
quantity.write(nodeWriter, delimiters);
}
if(segmentGroup3 != null && !segmentGroup3.isEmpty()) {
for(SegmentGroup3 segmentGroup3Inst : segmentGroup3) {
segmentGroup3Inst.write(nodeWriter, delimiters);
}
}
if(segmentGroup4 != null && !segmentGroup4.isEmpty()) {
for(SegmentGroup4 segmentGroup4Inst : segmentGroup4) {
segmentGroup4Inst.write(nodeWriter, delimiters);
}
}
if(segmentGroup6 != null && !segmentGroup6.isEmpty()) {
for(SegmentGroup6 segmentGroup6Inst : segmentGroup6) {
segmentGroup6Inst.write(nodeWriter, delimiters);
}
}
if(segmentGroup8 != null && !segmentGroup8.isEmpty()) {
for(SegmentGroup8 segmentGroup8Inst : segmentGroup8) {
segmentGroup8Inst.write(nodeWriter, delimiters);
}
}
if(segmentGroup11 != null && !segmentGroup11.isEmpty()) {
for(SegmentGroup11 segmentGroup11Inst : segmentGroup11) {
segmentGroup11Inst.write(nodeWriter, delimiters);
}
}
if(segmentGroup12 != null && !segmentGroup12.isEmpty()) {
for(SegmentGroup12 segmentGroup12Inst : segmentGroup12) {
segmentGroup12Inst.write(nodeWriter, delimiters);
}
}
}
public LineItem getLineItem() {
return lineItem;
}
public SegmentGroup2 setLineItem(LineItem lineItem) {
this.lineItem = lineItem; return this;
}
public List getDateTimePeriod() {
return dateTimePeriod;
}
public SegmentGroup2 setDateTimePeriod(List dateTimePeriod) {
this.dateTimePeriod = dateTimePeriod; return this;
}
public List getAdditionalProductId() {
return additionalProductId;
}
public SegmentGroup2 setAdditionalProductId(List additionalProductId) {
this.additionalProductId = additionalProductId; return this;
}
public Quantity getQuantity() {
return quantity;
}
public SegmentGroup2 setQuantity(Quantity quantity) {
this.quantity = quantity; return this;
}
public List getSegmentGroup3() {
return segmentGroup3;
}
public SegmentGroup2 setSegmentGroup3(List segmentGroup3) {
this.segmentGroup3 = segmentGroup3; return this;
}
public List getSegmentGroup4() {
return segmentGroup4;
}
public SegmentGroup2 setSegmentGroup4(List segmentGroup4) {
this.segmentGroup4 = segmentGroup4; return this;
}
public List getSegmentGroup6() {
return segmentGroup6;
}
public SegmentGroup2 setSegmentGroup6(List segmentGroup6) {
this.segmentGroup6 = segmentGroup6; return this;
}
public List getSegmentGroup8() {
return segmentGroup8;
}
public SegmentGroup2 setSegmentGroup8(List segmentGroup8) {
this.segmentGroup8 = segmentGroup8; return this;
}
public List getSegmentGroup11() {
return segmentGroup11;
}
public SegmentGroup2 setSegmentGroup11(List segmentGroup11) {
this.segmentGroup11 = segmentGroup11; return this;
}
public List getSegmentGroup12() {
return segmentGroup12;
}
public SegmentGroup2 setSegmentGroup12(List segmentGroup12) {
this.segmentGroup12 = segmentGroup12; return this;
}
}