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

org.virtuslab.edi.unedifact.d96a.common.SCDStructureComponentDefinition Maven / Gradle / Ivy

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

import java.io.Serializable;    
import org.milyn.smooks.edi.EDIWritable;    
import org.virtuslab.edi.unedifact.d96a.common.field.C786StructureComponentIdentification;    
import org.virtuslab.edi.unedifact.d96a.common.field.C082PartyIdentificationDetails;    
import java.math.BigDecimal;    
import org.milyn.javabean.decoders.DABigDecimalDecoder;    
import org.virtuslab.edi.unedifact.d96a.common.field.C778PositionIdentification;    
import org.virtuslab.edi.unedifact.d96a.common.field.C240ProductCharacteristic;    
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 e7497ComponentFunctionQualifier;
    private C786StructureComponentIdentification c786StructureComponentIdentification;
    private C082PartyIdentificationDetails c082PartyIdentificationDetails;
    private String e4405StatusCoded;
    private BigDecimal e1222ConfigurationLevel;
    private DABigDecimalDecoder e1222ConfigurationLevelEncoder;
    private C778PositionIdentification c778PositionIdentification;
    private C240ProductCharacteristic c240ProductCharacteristic;

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

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

        List nodeTokens = new ArrayList();

        if(e7497ComponentFunctionQualifier != null) {
            nodeWriter.write(delimiters.escape(e7497ComponentFunctionQualifier.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(e4405StatusCoded != null) {
            nodeWriter.write(delimiters.escape(e4405StatusCoded.toString()));
            nodeTokens.add(nodeWriter.toString());
            ((StringWriter)nodeWriter).getBuffer().setLength(0);
        }
        nodeWriter.write(delimiters.getField());
        if(e1222ConfigurationLevel != null) {
            nodeWriter.write(delimiters.escape(e1222ConfigurationLevelEncoder.encode(e1222ConfigurationLevel, 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(c240ProductCharacteristic != null) {
            c240ProductCharacteristic.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 getE7497ComponentFunctionQualifier() {
        return e7497ComponentFunctionQualifier;
    }

    public SCDStructureComponentDefinition setE7497ComponentFunctionQualifier(String e7497ComponentFunctionQualifier) {
        this.e7497ComponentFunctionQualifier = e7497ComponentFunctionQualifier;  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 getE4405StatusCoded() {
        return e4405StatusCoded;
    }

    public SCDStructureComponentDefinition setE4405StatusCoded(String e4405StatusCoded) {
        this.e4405StatusCoded = e4405StatusCoded;  return this;
    }

    public BigDecimal getE1222ConfigurationLevel() {
        return e1222ConfigurationLevel;
    }

    public SCDStructureComponentDefinition setE1222ConfigurationLevel(BigDecimal e1222ConfigurationLevel) {
        this.e1222ConfigurationLevel = e1222ConfigurationLevel;  return this;
    }

    public C778PositionIdentification getC778PositionIdentification() {
        return c778PositionIdentification;
    }

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

    public C240ProductCharacteristic getC240ProductCharacteristic() {
        return c240ProductCharacteristic;
    }

    public SCDStructureComponentDefinition setC240ProductCharacteristic(C240ProductCharacteristic c240ProductCharacteristic) {
        this.c240ProductCharacteristic = c240ProductCharacteristic;  return this;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy