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

org.milyn.edi.unedifact.d98a.common.ELUDataElementUsageDetails 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.d98a.common;

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 ELUDataElementUsageDetails implements Serializable, EDIWritable {

    private static final long serialVersionUID = 1L;

    private String e9162DataElementTag;
    private String e7299RequirementDesignatorCoded;
    private String e1050SequenceNumber;
    private String e4513MaintenanceOperationCoded;
    private BigDecimal e6176MaximumNumberOfOccurrences;
    private DABigDecimalDecoder e6176MaximumNumberOfOccurrencesEncoder;

    public ELUDataElementUsageDetails() {
        
        e6176MaximumNumberOfOccurrencesEncoder = new DABigDecimalDecoder();
    }

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

        List nodeTokens = new ArrayList();

        if(e9162DataElementTag != null) {
            nodeWriter.write(delimiters.escape(e9162DataElementTag.toString()));
            nodeTokens.add(nodeWriter.toString());
            ((StringWriter)nodeWriter).getBuffer().setLength(0);
        }
        nodeWriter.write(delimiters.getField());
        if(e7299RequirementDesignatorCoded != null) {
            nodeWriter.write(delimiters.escape(e7299RequirementDesignatorCoded.toString()));
            nodeTokens.add(nodeWriter.toString());
            ((StringWriter)nodeWriter).getBuffer().setLength(0);
        }
        nodeWriter.write(delimiters.getField());
        if(e1050SequenceNumber != null) {
            nodeWriter.write(delimiters.escape(e1050SequenceNumber.toString()));
            nodeTokens.add(nodeWriter.toString());
            ((StringWriter)nodeWriter).getBuffer().setLength(0);
        }
        nodeWriter.write(delimiters.getField());
        if(e4513MaintenanceOperationCoded != null) {
            nodeWriter.write(delimiters.escape(e4513MaintenanceOperationCoded.toString()));
            nodeTokens.add(nodeWriter.toString());
            ((StringWriter)nodeWriter).getBuffer().setLength(0);
        }
        nodeWriter.write(delimiters.getField());
        if(e6176MaximumNumberOfOccurrences != null) {
            nodeWriter.write(delimiters.escape(e6176MaximumNumberOfOccurrencesEncoder.encode(e6176MaximumNumberOfOccurrences, 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 getE9162DataElementTag() {
        return e9162DataElementTag;
    }

    public ELUDataElementUsageDetails setE9162DataElementTag(String e9162DataElementTag) {
        this.e9162DataElementTag = e9162DataElementTag;  return this;
    }

    public String getE7299RequirementDesignatorCoded() {
        return e7299RequirementDesignatorCoded;
    }

    public ELUDataElementUsageDetails setE7299RequirementDesignatorCoded(String e7299RequirementDesignatorCoded) {
        this.e7299RequirementDesignatorCoded = e7299RequirementDesignatorCoded;  return this;
    }

    public String getE1050SequenceNumber() {
        return e1050SequenceNumber;
    }

    public ELUDataElementUsageDetails setE1050SequenceNumber(String e1050SequenceNumber) {
        this.e1050SequenceNumber = e1050SequenceNumber;  return this;
    }

    public String getE4513MaintenanceOperationCoded() {
        return e4513MaintenanceOperationCoded;
    }

    public ELUDataElementUsageDetails setE4513MaintenanceOperationCoded(String e4513MaintenanceOperationCoded) {
        this.e4513MaintenanceOperationCoded = e4513MaintenanceOperationCoded;  return this;
    }

    public BigDecimal getE6176MaximumNumberOfOccurrences() {
        return e6176MaximumNumberOfOccurrences;
    }

    public ELUDataElementUsageDetails setE6176MaximumNumberOfOccurrences(BigDecimal e6176MaximumNumberOfOccurrences) {
        this.e6176MaximumNumberOfOccurrences = e6176MaximumNumberOfOccurrences;  return this;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy