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

org.milyn.edi.unedifact.d13a.common.EDTEditingDetails Maven / Gradle / Ivy

The newest version!
/**
 * This class was generated by Smooks EJC (http://www.smooks.org).
 */
package org.milyn.edi.unedifact.d13a.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 EDTEditingDetails implements Serializable, EDIWritable {

    private static final long serialVersionUID = 1L;

    private BigDecimal e6178EditFieldLengthMeasure;
    private DABigDecimalDecoder e6178EditFieldLengthMeasureEncoder;
    private String e9026EditMaskFormatIdentifier;
    private String e9031EditMaskRepresentationCode;
    private String e4447FreeTextFormatCode;

    public EDTEditingDetails() {
        
        e6178EditFieldLengthMeasureEncoder = new DABigDecimalDecoder();
    }

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

        List nodeTokens = new ArrayList();

        if(e6178EditFieldLengthMeasure != null) {
            nodeWriter.write(delimiters.escape(e6178EditFieldLengthMeasureEncoder.encode(e6178EditFieldLengthMeasure, delimiters)));
            nodeTokens.add(nodeWriter.toString());
            ((StringWriter)nodeWriter).getBuffer().setLength(0);
        }
        nodeWriter.write(delimiters.getField());
        if(e9026EditMaskFormatIdentifier != null) {
            nodeWriter.write(delimiters.escape(e9026EditMaskFormatIdentifier.toString()));
            nodeTokens.add(nodeWriter.toString());
            ((StringWriter)nodeWriter).getBuffer().setLength(0);
        }
        nodeWriter.write(delimiters.getField());
        if(e9031EditMaskRepresentationCode != null) {
            nodeWriter.write(delimiters.escape(e9031EditMaskRepresentationCode.toString()));
            nodeTokens.add(nodeWriter.toString());
            ((StringWriter)nodeWriter).getBuffer().setLength(0);
        }
        nodeWriter.write(delimiters.getField());
        if(e4447FreeTextFormatCode != null) {
            nodeWriter.write(delimiters.escape(e4447FreeTextFormatCode.toString()));
            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 BigDecimal getE6178EditFieldLengthMeasure() {
        return e6178EditFieldLengthMeasure;
    }

    public EDTEditingDetails setE6178EditFieldLengthMeasure(BigDecimal e6178EditFieldLengthMeasure) {
        this.e6178EditFieldLengthMeasure = e6178EditFieldLengthMeasure;  return this;
    }

    public String getE9026EditMaskFormatIdentifier() {
        return e9026EditMaskFormatIdentifier;
    }

    public EDTEditingDetails setE9026EditMaskFormatIdentifier(String e9026EditMaskFormatIdentifier) {
        this.e9026EditMaskFormatIdentifier = e9026EditMaskFormatIdentifier;  return this;
    }

    public String getE9031EditMaskRepresentationCode() {
        return e9031EditMaskRepresentationCode;
    }

    public EDTEditingDetails setE9031EditMaskRepresentationCode(String e9031EditMaskRepresentationCode) {
        this.e9031EditMaskRepresentationCode = e9031EditMaskRepresentationCode;  return this;
    }

    public String getE4447FreeTextFormatCode() {
        return e4447FreeTextFormatCode;
    }

    public EDTEditingDetails setE4447FreeTextFormatCode(String e4447FreeTextFormatCode) {
        this.e4447FreeTextFormatCode = e4447FreeTextFormatCode;  return this;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy