org.milyn.edi.unedifact.d99a.common.CSTCustomsStatusOfGoods Maven / Gradle / Ivy
The newest version!
/**
* This class was generated by Smooks EJC (http://www.smooks.org).
*/
package org.milyn.edi.unedifact.d99a.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.d99a.common.field.C2461CustomsIdentityCodes;
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 CSTCustomsStatusOfGoods implements Serializable, EDIWritable {
private static final long serialVersionUID = 1L;
private BigDecimal e1496GoodsItemNumber;
private DABigDecimalDecoder e1496GoodsItemNumberEncoder;
private C2461CustomsIdentityCodes c2461CustomsIdentityCodes;
private C2461CustomsIdentityCodes c2462CustomsIdentityCodes;
private C2461CustomsIdentityCodes c2463CustomsIdentityCodes;
private C2461CustomsIdentityCodes c2464CustomsIdentityCodes;
private C2461CustomsIdentityCodes c2465CustomsIdentityCodes;
public CSTCustomsStatusOfGoods() {
e1496GoodsItemNumberEncoder = new DABigDecimalDecoder();
}
public void write(Writer writer, Delimiters delimiters) throws IOException {
Writer nodeWriter = new StringWriter();
List nodeTokens = new ArrayList();
if(e1496GoodsItemNumber != null) {
nodeWriter.write(delimiters.escape(e1496GoodsItemNumberEncoder.encode(e1496GoodsItemNumber, delimiters)));
nodeTokens.add(nodeWriter.toString());
((StringWriter)nodeWriter).getBuffer().setLength(0);
}
nodeWriter.write(delimiters.getField());
if(c2461CustomsIdentityCodes != null) {
c2461CustomsIdentityCodes.write(nodeWriter, delimiters);
nodeTokens.add(nodeWriter.toString());
((StringWriter)nodeWriter).getBuffer().setLength(0);
}
nodeWriter.write(delimiters.getField());
if(c2462CustomsIdentityCodes != null) {
c2462CustomsIdentityCodes.write(nodeWriter, delimiters);
nodeTokens.add(nodeWriter.toString());
((StringWriter)nodeWriter).getBuffer().setLength(0);
}
nodeWriter.write(delimiters.getField());
if(c2463CustomsIdentityCodes != null) {
c2463CustomsIdentityCodes.write(nodeWriter, delimiters);
nodeTokens.add(nodeWriter.toString());
((StringWriter)nodeWriter).getBuffer().setLength(0);
}
nodeWriter.write(delimiters.getField());
if(c2464CustomsIdentityCodes != null) {
c2464CustomsIdentityCodes.write(nodeWriter, delimiters);
nodeTokens.add(nodeWriter.toString());
((StringWriter)nodeWriter).getBuffer().setLength(0);
}
nodeWriter.write(delimiters.getField());
if(c2465CustomsIdentityCodes != null) {
c2465CustomsIdentityCodes.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 getE1496GoodsItemNumber() {
return e1496GoodsItemNumber;
}
public CSTCustomsStatusOfGoods setE1496GoodsItemNumber(BigDecimal e1496GoodsItemNumber) {
this.e1496GoodsItemNumber = e1496GoodsItemNumber; return this;
}
public C2461CustomsIdentityCodes getC2461CustomsIdentityCodes() {
return c2461CustomsIdentityCodes;
}
public CSTCustomsStatusOfGoods setC2461CustomsIdentityCodes(C2461CustomsIdentityCodes c2461CustomsIdentityCodes) {
this.c2461CustomsIdentityCodes = c2461CustomsIdentityCodes; return this;
}
public C2461CustomsIdentityCodes getC2462CustomsIdentityCodes() {
return c2462CustomsIdentityCodes;
}
public CSTCustomsStatusOfGoods setC2462CustomsIdentityCodes(C2461CustomsIdentityCodes c2462CustomsIdentityCodes) {
this.c2462CustomsIdentityCodes = c2462CustomsIdentityCodes; return this;
}
public C2461CustomsIdentityCodes getC2463CustomsIdentityCodes() {
return c2463CustomsIdentityCodes;
}
public CSTCustomsStatusOfGoods setC2463CustomsIdentityCodes(C2461CustomsIdentityCodes c2463CustomsIdentityCodes) {
this.c2463CustomsIdentityCodes = c2463CustomsIdentityCodes; return this;
}
public C2461CustomsIdentityCodes getC2464CustomsIdentityCodes() {
return c2464CustomsIdentityCodes;
}
public CSTCustomsStatusOfGoods setC2464CustomsIdentityCodes(C2461CustomsIdentityCodes c2464CustomsIdentityCodes) {
this.c2464CustomsIdentityCodes = c2464CustomsIdentityCodes; return this;
}
public C2461CustomsIdentityCodes getC2465CustomsIdentityCodes() {
return c2465CustomsIdentityCodes;
}
public CSTCustomsStatusOfGoods setC2465CustomsIdentityCodes(C2461CustomsIdentityCodes c2465CustomsIdentityCodes) {
this.c2465CustomsIdentityCodes = c2465CustomsIdentityCodes; return this;
}
}