All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.milyn.edi.unedifact.d09b.common.PYTPaymentTerms Maven / Gradle / Ivy

There is a newer version: 1.7.1.0
Show newest version
/**
 * This class was generated by Smooks EJC (http://www.smooks.org).
 */
package org.milyn.edi.unedifact.d09b.common;

import java.io.Serializable;    
import org.milyn.smooks.edi.EDIWritable;    
import org.milyn.edi.unedifact.d09b.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 e2475EventTimeReferenceCode;
    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(e2475EventTimeReferenceCode != null) {
            nodeWriter.write(delimiters.escape(e2475EventTimeReferenceCode.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 getE2475EventTimeReferenceCode() {
        return e2475EventTimeReferenceCode;
    }

    public PYTPaymentTerms setE2475EventTimeReferenceCode(String e2475EventTimeReferenceCode) {
        this.e2475EventTimeReferenceCode = e2475EventTimeReferenceCode;  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;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy