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

org.milyn.edi.unedifact.d16a.common.field.C2131NumberAndTypeOfPackages Maven / Gradle / Ivy

The newest version!
/**
 * This class was generated by Smooks EJC (http://www.smooks.org).
 */
package org.milyn.edi.unedifact.d16a.common.field;

import java.io.Serializable;    
import org.milyn.smooks.edi.EDIWritable;    
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 C2131NumberAndTypeOfPackages implements Serializable, EDIWritable {

    private static final long serialVersionUID = 1L;

    private BigDecimal e7224PackageQuantity;
    private DABigDecimalDecoder e7224PackageQuantityEncoder;
    private String e7065PackageTypeDescriptionCode;
    private String e1131CodeListIdentificationCode;
    private String e3055CodeListResponsibleAgencyCode;
    private String e7064TypeOfPackages;
    private String e7233PackagingRelatedDescriptionCode;

    public C2131NumberAndTypeOfPackages() {
        
        e7224PackageQuantityEncoder = new DABigDecimalDecoder();
    }

    public void write(Writer writer, Delimiters delimiters) throws IOException {
        
        Writer nodeWriter = new StringWriter();

        List nodeTokens = new ArrayList();

        if(e7224PackageQuantity != null) {
            nodeWriter.write(delimiters.escape(e7224PackageQuantityEncoder.encode(e7224PackageQuantity, delimiters)));
            nodeTokens.add(nodeWriter.toString());
            ((StringWriter)nodeWriter).getBuffer().setLength(0);
        }
        nodeWriter.write(delimiters.getComponent());
        if(e7065PackageTypeDescriptionCode != null) {
            nodeWriter.write(delimiters.escape(e7065PackageTypeDescriptionCode.toString()));
            nodeTokens.add(nodeWriter.toString());
            ((StringWriter)nodeWriter).getBuffer().setLength(0);
        }
        nodeWriter.write(delimiters.getComponent());
        if(e1131CodeListIdentificationCode != null) {
            nodeWriter.write(delimiters.escape(e1131CodeListIdentificationCode.toString()));
            nodeTokens.add(nodeWriter.toString());
            ((StringWriter)nodeWriter).getBuffer().setLength(0);
        }
        nodeWriter.write(delimiters.getComponent());
        if(e3055CodeListResponsibleAgencyCode != null) {
            nodeWriter.write(delimiters.escape(e3055CodeListResponsibleAgencyCode.toString()));
            nodeTokens.add(nodeWriter.toString());
            ((StringWriter)nodeWriter).getBuffer().setLength(0);
        }
        nodeWriter.write(delimiters.getComponent());
        if(e7064TypeOfPackages != null) {
            nodeWriter.write(delimiters.escape(e7064TypeOfPackages.toString()));
            nodeTokens.add(nodeWriter.toString());
            ((StringWriter)nodeWriter).getBuffer().setLength(0);
        }
        nodeWriter.write(delimiters.getComponent());
        if(e7233PackagingRelatedDescriptionCode != null) {
            nodeWriter.write(delimiters.escape(e7233PackagingRelatedDescriptionCode.toString()));
            nodeTokens.add(nodeWriter.toString());
            ((StringWriter)nodeWriter).getBuffer().setLength(0);
        }
        nodeTokens.add(nodeWriter.toString());
        writer.write(EDIUtils.concatAndTruncate(nodeTokens, DelimiterType.COMPONENT, delimiters));
    }

    public BigDecimal getE7224PackageQuantity() {
        return e7224PackageQuantity;
    }

    public C2131NumberAndTypeOfPackages setE7224PackageQuantity(BigDecimal e7224PackageQuantity) {
        this.e7224PackageQuantity = e7224PackageQuantity;  return this;
    }

    public String getE7065PackageTypeDescriptionCode() {
        return e7065PackageTypeDescriptionCode;
    }

    public C2131NumberAndTypeOfPackages setE7065PackageTypeDescriptionCode(String e7065PackageTypeDescriptionCode) {
        this.e7065PackageTypeDescriptionCode = e7065PackageTypeDescriptionCode;  return this;
    }

    public String getE1131CodeListIdentificationCode() {
        return e1131CodeListIdentificationCode;
    }

    public C2131NumberAndTypeOfPackages setE1131CodeListIdentificationCode(String e1131CodeListIdentificationCode) {
        this.e1131CodeListIdentificationCode = e1131CodeListIdentificationCode;  return this;
    }

    public String getE3055CodeListResponsibleAgencyCode() {
        return e3055CodeListResponsibleAgencyCode;
    }

    public C2131NumberAndTypeOfPackages setE3055CodeListResponsibleAgencyCode(String e3055CodeListResponsibleAgencyCode) {
        this.e3055CodeListResponsibleAgencyCode = e3055CodeListResponsibleAgencyCode;  return this;
    }

    public String getE7064TypeOfPackages() {
        return e7064TypeOfPackages;
    }

    public C2131NumberAndTypeOfPackages setE7064TypeOfPackages(String e7064TypeOfPackages) {
        this.e7064TypeOfPackages = e7064TypeOfPackages;  return this;
    }

    public String getE7233PackagingRelatedDescriptionCode() {
        return e7233PackagingRelatedDescriptionCode;
    }

    public C2131NumberAndTypeOfPackages setE7233PackagingRelatedDescriptionCode(String e7233PackagingRelatedDescriptionCode) {
        this.e7233PackagingRelatedDescriptionCode = e7233PackagingRelatedDescriptionCode;  return this;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy