org.milyn.edi.unedifact.d03b.SLSRPT.SegmentGroup12 Maven / Gradle / Ivy
/**
* This class was generated by Smooks EJC (http://www.smooks.org).
*/
package org.milyn.edi.unedifact.d03b.SLSRPT;
import java.io.Serializable;
import org.milyn.smooks.edi.EDIWritable;
import org.milyn.edi.unedifact.d03b.common.LineItem;
import java.util.List;
import org.milyn.edi.unedifact.d03b.common.AdditionalProductId;
import org.milyn.edi.unedifact.d03b.common.ItemDescription;
import org.milyn.edi.unedifact.d03b.common.Package;
import org.milyn.edi.unedifact.d03b.common.MonetaryAmount;
import java.io.Writer;
import org.milyn.edisax.model.internal.Delimiters;
import java.io.IOException;
public class SegmentGroup12 implements Serializable, EDIWritable {
private static final long serialVersionUID = 1L;
private LineItem lineItem;
private List additionalProductId;
private List itemDescription;
private List _package;
private List monetaryAmount;
private List segmentGroup13;
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(additionalProductId != null && !additionalProductId.isEmpty()) {
for(AdditionalProductId additionalProductIdInst : additionalProductId) {
nodeWriter.write("PIA");
nodeWriter.write(delimiters.getField());
additionalProductIdInst.write(nodeWriter, delimiters);
}
}
if(itemDescription != null && !itemDescription.isEmpty()) {
for(ItemDescription itemDescriptionInst : itemDescription) {
nodeWriter.write("IMD");
nodeWriter.write(delimiters.getField());
itemDescriptionInst.write(nodeWriter, delimiters);
}
}
if(_package != null && !_package.isEmpty()) {
for(Package _packageInst : _package) {
nodeWriter.write("PAC");
nodeWriter.write(delimiters.getField());
_packageInst.write(nodeWriter, delimiters);
}
}
if(monetaryAmount != null && !monetaryAmount.isEmpty()) {
for(MonetaryAmount monetaryAmountInst : monetaryAmount) {
nodeWriter.write("MOA");
nodeWriter.write(delimiters.getField());
monetaryAmountInst.write(nodeWriter, delimiters);
}
}
if(segmentGroup13 != null && !segmentGroup13.isEmpty()) {
for(SegmentGroup13 segmentGroup13Inst : segmentGroup13) {
segmentGroup13Inst.write(nodeWriter, delimiters);
}
}
}
public LineItem getLineItem() {
return lineItem;
}
public SegmentGroup12 setLineItem(LineItem lineItem) {
this.lineItem = lineItem; return this;
}
public List getAdditionalProductId() {
return additionalProductId;
}
public SegmentGroup12 setAdditionalProductId(List additionalProductId) {
this.additionalProductId = additionalProductId; return this;
}
public List getItemDescription() {
return itemDescription;
}
public SegmentGroup12 setItemDescription(List itemDescription) {
this.itemDescription = itemDescription; return this;
}
public List get_package() {
return _package;
}
public SegmentGroup12 set_package(List _package) {
this._package = _package; return this;
}
public List getMonetaryAmount() {
return monetaryAmount;
}
public SegmentGroup12 setMonetaryAmount(List monetaryAmount) {
this.monetaryAmount = monetaryAmount; return this;
}
public List getSegmentGroup13() {
return segmentGroup13;
}
public SegmentGroup12 setSegmentGroup13(List segmentGroup13) {
this.segmentGroup13 = segmentGroup13; return this;
}
}