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

org.milyn.edi.unedifact.d09b.common.SCDStructureComponentDefinition 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.C786StructureComponentIdentification;    
import org.milyn.edi.unedifact.d09b.common.field.C082PartyIdentificationDetails;    
import java.math.BigDecimal;    
import org.milyn.javabean.decoders.DABigDecimalDecoder;    
import org.milyn.edi.unedifact.d09b.common.field.C778PositionIdentification;    
import org.milyn.edi.unedifact.d09b.common.field.C240CharacteristicDescription;    
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 SCDStructureComponentDefinition implements Serializable, EDIWritable {

    private static final long serialVersionUID = 1L;

    private String e7497StructureComponentFunctionCodeQualifier;
    private C786StructureComponentIdentification c786StructureComponentIdentification;
    private C082PartyIdentificationDetails c082PartyIdentificationDetails;
    private String e4405StatusDescriptionCode;
    private BigDecimal e1222ConfigurationLevelNumber;
    private DABigDecimalDecoder e1222ConfigurationLevelNumberEncoder;
    private C778PositionIdentification c778PositionIdentification;
    private C240CharacteristicDescription c240CharacteristicDescription;

    public SCDStructureComponentDefinition() {
        
        e1222ConfigurationLevelNumberEncoder = new DABigDecimalDecoder();
    }

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

        List nodeTokens = new ArrayList();

        if(e7497StructureComponentFunctionCodeQualifier != null) {
            nodeWriter.write(delimiters.escape(e7497StructureComponentFunctionCodeQualifier.toString()));
            nodeTokens.add(nodeWriter.toString());
            ((StringWriter)nodeWriter).getBuffer().setLength(0);
        }
        nodeWriter.write(delimiters.getField());
        if(c786StructureComponentIdentification != null) {
            c786StructureComponentIdentification.write(nodeWriter, delimiters);
            nodeTokens.add(nodeWriter.toString());
            ((StringWriter)nodeWriter).getBuffer().setLength(0);
        }
        nodeWriter.write(delimiters.getField());
        if(c082PartyIdentificationDetails != null) {
            c082PartyIdentificationDetails.write(nodeWriter, delimiters);
            nodeTokens.add(nodeWriter.toString());
            ((StringWriter)nodeWriter).getBuffer().setLength(0);
        }
        nodeWriter.write(delimiters.getField());
        if(e4405StatusDescriptionCode != null) {
            nodeWriter.write(delimiters.escape(e4405StatusDescriptionCode.toString()));
            nodeTokens.add(nodeWriter.toString());
            ((StringWriter)nodeWriter).getBuffer().setLength(0);
        }
        nodeWriter.write(delimiters.getField());
        if(e1222ConfigurationLevelNumber != null) {
            nodeWriter.write(delimiters.escape(e1222ConfigurationLevelNumberEncoder.encode(e1222ConfigurationLevelNumber, delimiters)));
            nodeTokens.add(nodeWriter.toString());
            ((StringWriter)nodeWriter).getBuffer().setLength(0);
        }
        nodeWriter.write(delimiters.getField());
        if(c778PositionIdentification != null) {
            c778PositionIdentification.write(nodeWriter, delimiters);
            nodeTokens.add(nodeWriter.toString());
            ((StringWriter)nodeWriter).getBuffer().setLength(0);
        }
        nodeWriter.write(delimiters.getField());
        if(c240CharacteristicDescription != null) {
            c240CharacteristicDescription.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 String getE7497StructureComponentFunctionCodeQualifier() {
        return e7497StructureComponentFunctionCodeQualifier;
    }

    public SCDStructureComponentDefinition setE7497StructureComponentFunctionCodeQualifier(String e7497StructureComponentFunctionCodeQualifier) {
        this.e7497StructureComponentFunctionCodeQualifier = e7497StructureComponentFunctionCodeQualifier;  return this;
    }

    public C786StructureComponentIdentification getC786StructureComponentIdentification() {
        return c786StructureComponentIdentification;
    }

    public SCDStructureComponentDefinition setC786StructureComponentIdentification(C786StructureComponentIdentification c786StructureComponentIdentification) {
        this.c786StructureComponentIdentification = c786StructureComponentIdentification;  return this;
    }

    public C082PartyIdentificationDetails getC082PartyIdentificationDetails() {
        return c082PartyIdentificationDetails;
    }

    public SCDStructureComponentDefinition setC082PartyIdentificationDetails(C082PartyIdentificationDetails c082PartyIdentificationDetails) {
        this.c082PartyIdentificationDetails = c082PartyIdentificationDetails;  return this;
    }

    public String getE4405StatusDescriptionCode() {
        return e4405StatusDescriptionCode;
    }

    public SCDStructureComponentDefinition setE4405StatusDescriptionCode(String e4405StatusDescriptionCode) {
        this.e4405StatusDescriptionCode = e4405StatusDescriptionCode;  return this;
    }

    public BigDecimal getE1222ConfigurationLevelNumber() {
        return e1222ConfigurationLevelNumber;
    }

    public SCDStructureComponentDefinition setE1222ConfigurationLevelNumber(BigDecimal e1222ConfigurationLevelNumber) {
        this.e1222ConfigurationLevelNumber = e1222ConfigurationLevelNumber;  return this;
    }

    public C778PositionIdentification getC778PositionIdentification() {
        return c778PositionIdentification;
    }

    public SCDStructureComponentDefinition setC778PositionIdentification(C778PositionIdentification c778PositionIdentification) {
        this.c778PositionIdentification = c778PositionIdentification;  return this;
    }

    public C240CharacteristicDescription getC240CharacteristicDescription() {
        return c240CharacteristicDescription;
    }

    public SCDStructureComponentDefinition setC240CharacteristicDescription(C240CharacteristicDescription c240CharacteristicDescription) {
        this.c240CharacteristicDescription = c240CharacteristicDescription;  return this;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy