org.milyn.edi.unedifact.d02a.common.PYTPaymentTerms Maven / Gradle / Ivy
The newest version!
/**
* This class was generated by Smooks EJC (http://www.smooks.org).
*/
package org.milyn.edi.unedifact.d02a.common;
import java.io.Serializable;
import org.milyn.smooks.edi.EDIWritable;
import org.milyn.edi.unedifact.d02a.common.field.C019PaymentTerms;
import java.math.BigDecimal;
import org.milyn.javabean.decoders.DABigDecimalDecoder;
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 PYTPaymentTerms implements Serializable, EDIWritable {
private static final long serialVersionUID = 1L;
private String e4279PaymentTermsTypeCodeQualifier;
private C019PaymentTerms c019PaymentTerms;
private String e2475TimeReferenceCode;
private String e2009TermsTimeRelationCode;
private String e2151PeriodTypeCode;
private BigDecimal e2152PeriodCountQuantity;
private DABigDecimalDecoder e2152PeriodCountQuantityEncoder;
public PYTPaymentTerms() {
e2152PeriodCountQuantityEncoder = new DABigDecimalDecoder();
}
public void write(Writer writer, Delimiters delimiters) throws IOException {
Writer nodeWriter = new StringWriter();
List nodeTokens = new ArrayList();
if(e4279PaymentTermsTypeCodeQualifier != null) {
nodeWriter.write(delimiters.escape(e4279PaymentTermsTypeCodeQualifier.toString()));
nodeTokens.add(nodeWriter.toString());
((StringWriter)nodeWriter).getBuffer().setLength(0);
}
nodeWriter.write(delimiters.getField());
if(c019PaymentTerms != null) {
c019PaymentTerms.write(nodeWriter, delimiters);
nodeTokens.add(nodeWriter.toString());
((StringWriter)nodeWriter).getBuffer().setLength(0);
}
nodeWriter.write(delimiters.getField());
if(e2475TimeReferenceCode != null) {
nodeWriter.write(delimiters.escape(e2475TimeReferenceCode.toString()));
nodeTokens.add(nodeWriter.toString());
((StringWriter)nodeWriter).getBuffer().setLength(0);
}
nodeWriter.write(delimiters.getField());
if(e2009TermsTimeRelationCode != null) {
nodeWriter.write(delimiters.escape(e2009TermsTimeRelationCode.toString()));
nodeTokens.add(nodeWriter.toString());
((StringWriter)nodeWriter).getBuffer().setLength(0);
}
nodeWriter.write(delimiters.getField());
if(e2151PeriodTypeCode != null) {
nodeWriter.write(delimiters.escape(e2151PeriodTypeCode.toString()));
nodeTokens.add(nodeWriter.toString());
((StringWriter)nodeWriter).getBuffer().setLength(0);
}
nodeWriter.write(delimiters.getField());
if(e2152PeriodCountQuantity != null) {
nodeWriter.write(delimiters.escape(e2152PeriodCountQuantityEncoder.encode(e2152PeriodCountQuantity, 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 String getE4279PaymentTermsTypeCodeQualifier() {
return e4279PaymentTermsTypeCodeQualifier;
}
public PYTPaymentTerms setE4279PaymentTermsTypeCodeQualifier(String e4279PaymentTermsTypeCodeQualifier) {
this.e4279PaymentTermsTypeCodeQualifier = e4279PaymentTermsTypeCodeQualifier; return this;
}
public C019PaymentTerms getC019PaymentTerms() {
return c019PaymentTerms;
}
public PYTPaymentTerms setC019PaymentTerms(C019PaymentTerms c019PaymentTerms) {
this.c019PaymentTerms = c019PaymentTerms; return this;
}
public String getE2475TimeReferenceCode() {
return e2475TimeReferenceCode;
}
public PYTPaymentTerms setE2475TimeReferenceCode(String e2475TimeReferenceCode) {
this.e2475TimeReferenceCode = e2475TimeReferenceCode; return this;
}
public String getE2009TermsTimeRelationCode() {
return e2009TermsTimeRelationCode;
}
public PYTPaymentTerms setE2009TermsTimeRelationCode(String e2009TermsTimeRelationCode) {
this.e2009TermsTimeRelationCode = e2009TermsTimeRelationCode; return this;
}
public String getE2151PeriodTypeCode() {
return e2151PeriodTypeCode;
}
public PYTPaymentTerms setE2151PeriodTypeCode(String e2151PeriodTypeCode) {
this.e2151PeriodTypeCode = e2151PeriodTypeCode; return this;
}
public BigDecimal getE2152PeriodCountQuantity() {
return e2152PeriodCountQuantity;
}
public PYTPaymentTerms setE2152PeriodCountQuantity(BigDecimal e2152PeriodCountQuantity) {
this.e2152PeriodCountQuantity = e2152PeriodCountQuantity; return this;
}
}