org.milyn.edi.unedifact.d06b.CONPVA.SegmentGroup12 Maven / Gradle / Ivy
/**
* This class was generated by Smooks EJC (http://www.smooks.org).
*/
package org.milyn.edi.unedifact.d06b.CONPVA;
import java.io.Serializable;
import org.milyn.smooks.edi.EDIWritable;
import org.milyn.edi.unedifact.d06b.common.AdditionalPriceInformation;
import java.util.List;
import org.milyn.edi.unedifact.d06b.common.Reference;
import org.milyn.edi.unedifact.d06b.common.DateTimePeriod;
import org.milyn.edi.unedifact.d06b.common.MonetaryAmount;
import org.milyn.edi.unedifact.d06b.common.DutyTaxFeeDetails;
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 AdditionalPriceInformation additionalPriceInformation;
private List reference;
private List dateTimePeriod;
private List monetaryAmount;
private List dutyTaxFeeDetails;
public void write(Writer writer, Delimiters delimiters) throws IOException {
Writer nodeWriter = writer;
if(additionalPriceInformation != null) {
nodeWriter.write("APR");
nodeWriter.write(delimiters.getField());
additionalPriceInformation.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(monetaryAmount != null && !monetaryAmount.isEmpty()) {
for(MonetaryAmount monetaryAmountInst : monetaryAmount) {
nodeWriter.write("MOA");
nodeWriter.write(delimiters.getField());
monetaryAmountInst.write(nodeWriter, delimiters);
}
}
if(dutyTaxFeeDetails != null && !dutyTaxFeeDetails.isEmpty()) {
for(DutyTaxFeeDetails dutyTaxFeeDetailsInst : dutyTaxFeeDetails) {
nodeWriter.write("TAX");
nodeWriter.write(delimiters.getField());
dutyTaxFeeDetailsInst.write(nodeWriter, delimiters);
}
}
}
public AdditionalPriceInformation getAdditionalPriceInformation() {
return additionalPriceInformation;
}
public SegmentGroup12 setAdditionalPriceInformation(AdditionalPriceInformation additionalPriceInformation) {
this.additionalPriceInformation = additionalPriceInformation; return this;
}
public List getReference() {
return reference;
}
public SegmentGroup12 setReference(List reference) {
this.reference = reference; return this;
}
public List getDateTimePeriod() {
return dateTimePeriod;
}
public SegmentGroup12 setDateTimePeriod(List dateTimePeriod) {
this.dateTimePeriod = dateTimePeriod; return this;
}
public List getMonetaryAmount() {
return monetaryAmount;
}
public SegmentGroup12 setMonetaryAmount(List monetaryAmount) {
this.monetaryAmount = monetaryAmount; return this;
}
public List getDutyTaxFeeDetails() {
return dutyTaxFeeDetails;
}
public SegmentGroup12 setDutyTaxFeeDetails(List dutyTaxFeeDetails) {
this.dutyTaxFeeDetails = dutyTaxFeeDetails; return this;
}
}