org.milyn.edi.unedifact.d98a.common.CustomsStatusOfGoods Maven / Gradle / Ivy
/**
* This class was generated by Smooks EJC (http://www.smooks.org).
*/
package org.milyn.edi.unedifact.d98a.common;
import java.io.Serializable;
import org.milyn.smooks.edi.EDIWritable;
import java.math.BigDecimal;
import org.milyn.javabean.decoders.DABigDecimalDecoder;
import org.milyn.edi.unedifact.d98a.common.field.CustomsIdentityCodesC246;
import java.io.Writer;
import org.milyn.edisax.model.internal.Delimiters;
import java.io.IOException;
import java.io.StringWriter;
import java.util.List;
import java.util.ArrayList;
import org.milyn.edisax.util.EDIUtils;
import org.milyn.edisax.model.internal.DelimiterType;
public class CustomsStatusOfGoods implements Serializable, EDIWritable {
private static final long serialVersionUID = 1L;
private BigDecimal goodsItemNumber;
private DABigDecimalDecoder goodsItemNumberEncoder;
private CustomsIdentityCodesC246 customsIdentityCodes1;
private CustomsIdentityCodesC246 customsIdentityCodes2;
private CustomsIdentityCodesC246 customsIdentityCodes3;
private CustomsIdentityCodesC246 customsIdentityCodes4;
private CustomsIdentityCodesC246 customsIdentityCodes5;
public CustomsStatusOfGoods() {
goodsItemNumberEncoder = new DABigDecimalDecoder();
}
public void write(Writer writer, Delimiters delimiters) throws IOException {
Writer nodeWriter = new StringWriter();
List nodeTokens = new ArrayList();
if(goodsItemNumber != null) {
nodeWriter.write(delimiters.escape(goodsItemNumberEncoder.encode(goodsItemNumber, delimiters)));
nodeTokens.add(nodeWriter.toString());
((StringWriter)nodeWriter).getBuffer().setLength(0);
}
nodeWriter.write(delimiters.getField());
if(customsIdentityCodes1 != null) {
customsIdentityCodes1.write(nodeWriter, delimiters);
nodeTokens.add(nodeWriter.toString());
((StringWriter)nodeWriter).getBuffer().setLength(0);
}
nodeWriter.write(delimiters.getField());
if(customsIdentityCodes2 != null) {
customsIdentityCodes2.write(nodeWriter, delimiters);
nodeTokens.add(nodeWriter.toString());
((StringWriter)nodeWriter).getBuffer().setLength(0);
}
nodeWriter.write(delimiters.getField());
if(customsIdentityCodes3 != null) {
customsIdentityCodes3.write(nodeWriter, delimiters);
nodeTokens.add(nodeWriter.toString());
((StringWriter)nodeWriter).getBuffer().setLength(0);
}
nodeWriter.write(delimiters.getField());
if(customsIdentityCodes4 != null) {
customsIdentityCodes4.write(nodeWriter, delimiters);
nodeTokens.add(nodeWriter.toString());
((StringWriter)nodeWriter).getBuffer().setLength(0);
}
nodeWriter.write(delimiters.getField());
if(customsIdentityCodes5 != null) {
customsIdentityCodes5.write(nodeWriter, delimiters);
nodeTokens.add(nodeWriter.toString());
((StringWriter)nodeWriter).getBuffer().setLength(0);
}
nodeTokens.add(nodeWriter.toString());
writer.write(EDIUtils.concatAndTruncate(nodeTokens, DelimiterType.FIELD, delimiters));
writer.write(delimiters.getSegmentDelimiter());
writer.flush();
}
public BigDecimal getGoodsItemNumber() {
return goodsItemNumber;
}
public CustomsStatusOfGoods setGoodsItemNumber(BigDecimal goodsItemNumber) {
this.goodsItemNumber = goodsItemNumber; return this;
}
public CustomsIdentityCodesC246 getCustomsIdentityCodes1() {
return customsIdentityCodes1;
}
public CustomsStatusOfGoods setCustomsIdentityCodes1(CustomsIdentityCodesC246 customsIdentityCodes1) {
this.customsIdentityCodes1 = customsIdentityCodes1; return this;
}
public CustomsIdentityCodesC246 getCustomsIdentityCodes2() {
return customsIdentityCodes2;
}
public CustomsStatusOfGoods setCustomsIdentityCodes2(CustomsIdentityCodesC246 customsIdentityCodes2) {
this.customsIdentityCodes2 = customsIdentityCodes2; return this;
}
public CustomsIdentityCodesC246 getCustomsIdentityCodes3() {
return customsIdentityCodes3;
}
public CustomsStatusOfGoods setCustomsIdentityCodes3(CustomsIdentityCodesC246 customsIdentityCodes3) {
this.customsIdentityCodes3 = customsIdentityCodes3; return this;
}
public CustomsIdentityCodesC246 getCustomsIdentityCodes4() {
return customsIdentityCodes4;
}
public CustomsStatusOfGoods setCustomsIdentityCodes4(CustomsIdentityCodesC246 customsIdentityCodes4) {
this.customsIdentityCodes4 = customsIdentityCodes4; return this;
}
public CustomsIdentityCodesC246 getCustomsIdentityCodes5() {
return customsIdentityCodes5;
}
public CustomsStatusOfGoods setCustomsIdentityCodes5(CustomsIdentityCodesC246 customsIdentityCodes5) {
this.customsIdentityCodes5 = customsIdentityCodes5; return this;
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy