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

org.milyn.edi.unedifact.d05a.common.GINGoodsIdentityNumber 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.d05a.common;

import java.io.Serializable;    
import org.milyn.smooks.edi.EDIWritable;    
import org.milyn.edi.unedifact.d05a.common.field.C2081IdentityNumberRange;    
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 GINGoodsIdentityNumber implements Serializable, EDIWritable {

    private static final long serialVersionUID = 1L;

    private String e7405ObjectIdentificationCodeQualifier;
    private C2081IdentityNumberRange c2081IdentityNumberRange;
    private C2081IdentityNumberRange c2082IdentityNumberRange;
    private C2081IdentityNumberRange c2083IdentityNumberRange;
    private C2081IdentityNumberRange c2084IdentityNumberRange;
    private C2081IdentityNumberRange c2085IdentityNumberRange;

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

        List nodeTokens = new ArrayList();

        if(e7405ObjectIdentificationCodeQualifier != null) {
            nodeWriter.write(delimiters.escape(e7405ObjectIdentificationCodeQualifier.toString()));
            nodeTokens.add(nodeWriter.toString());
            ((StringWriter)nodeWriter).getBuffer().setLength(0);
        }
        nodeWriter.write(delimiters.getField());
        if(c2081IdentityNumberRange != null) {
            c2081IdentityNumberRange.write(nodeWriter, delimiters);
            nodeTokens.add(nodeWriter.toString());
            ((StringWriter)nodeWriter).getBuffer().setLength(0);
        }
        nodeWriter.write(delimiters.getField());
        if(c2082IdentityNumberRange != null) {
            c2082IdentityNumberRange.write(nodeWriter, delimiters);
            nodeTokens.add(nodeWriter.toString());
            ((StringWriter)nodeWriter).getBuffer().setLength(0);
        }
        nodeWriter.write(delimiters.getField());
        if(c2083IdentityNumberRange != null) {
            c2083IdentityNumberRange.write(nodeWriter, delimiters);
            nodeTokens.add(nodeWriter.toString());
            ((StringWriter)nodeWriter).getBuffer().setLength(0);
        }
        nodeWriter.write(delimiters.getField());
        if(c2084IdentityNumberRange != null) {
            c2084IdentityNumberRange.write(nodeWriter, delimiters);
            nodeTokens.add(nodeWriter.toString());
            ((StringWriter)nodeWriter).getBuffer().setLength(0);
        }
        nodeWriter.write(delimiters.getField());
        if(c2085IdentityNumberRange != null) {
            c2085IdentityNumberRange.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 getE7405ObjectIdentificationCodeQualifier() {
        return e7405ObjectIdentificationCodeQualifier;
    }

    public GINGoodsIdentityNumber setE7405ObjectIdentificationCodeQualifier(String e7405ObjectIdentificationCodeQualifier) {
        this.e7405ObjectIdentificationCodeQualifier = e7405ObjectIdentificationCodeQualifier;  return this;
    }

    public C2081IdentityNumberRange getC2081IdentityNumberRange() {
        return c2081IdentityNumberRange;
    }

    public GINGoodsIdentityNumber setC2081IdentityNumberRange(C2081IdentityNumberRange c2081IdentityNumberRange) {
        this.c2081IdentityNumberRange = c2081IdentityNumberRange;  return this;
    }

    public C2081IdentityNumberRange getC2082IdentityNumberRange() {
        return c2082IdentityNumberRange;
    }

    public GINGoodsIdentityNumber setC2082IdentityNumberRange(C2081IdentityNumberRange c2082IdentityNumberRange) {
        this.c2082IdentityNumberRange = c2082IdentityNumberRange;  return this;
    }

    public C2081IdentityNumberRange getC2083IdentityNumberRange() {
        return c2083IdentityNumberRange;
    }

    public GINGoodsIdentityNumber setC2083IdentityNumberRange(C2081IdentityNumberRange c2083IdentityNumberRange) {
        this.c2083IdentityNumberRange = c2083IdentityNumberRange;  return this;
    }

    public C2081IdentityNumberRange getC2084IdentityNumberRange() {
        return c2084IdentityNumberRange;
    }

    public GINGoodsIdentityNumber setC2084IdentityNumberRange(C2081IdentityNumberRange c2084IdentityNumberRange) {
        this.c2084IdentityNumberRange = c2084IdentityNumberRange;  return this;
    }

    public C2081IdentityNumberRange getC2085IdentityNumberRange() {
        return c2085IdentityNumberRange;
    }

    public GINGoodsIdentityNumber setC2085IdentityNumberRange(C2081IdentityNumberRange c2085IdentityNumberRange) {
        this.c2085IdentityNumberRange = c2085IdentityNumberRange;  return this;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy