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

org.milyn.edi.unedifact.d98a.common.PNAPartyIdentification 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 org.milyn.edi.unedifact.d98a.common.field.C2061IdentificationNumber;    
import org.milyn.edi.unedifact.d98a.common.field.C082PartyIdentificationDetails;    
import org.milyn.edi.unedifact.d98a.common.field.C8161NameComponentDetails;    
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 PNAPartyIdentification implements Serializable, EDIWritable {

    private static final long serialVersionUID = 1L;

    private String e3035PartyQualifier;
    private C2061IdentificationNumber c206IdentificationNumber;
    private C082PartyIdentificationDetails c082PartyIdentificationDetails;
    private String e3403NameTypeCoded;
    private String e3397NameStatusCoded;
    private C8161NameComponentDetails c8161NameComponentDetails;
    private C8161NameComponentDetails c8162NameComponentDetails;
    private C8161NameComponentDetails c8163NameComponentDetails;
    private C8161NameComponentDetails c8164NameComponentDetails;
    private C8161NameComponentDetails c8165NameComponentDetails;

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

        List nodeTokens = new ArrayList();

        if(e3035PartyQualifier != null) {
            nodeWriter.write(delimiters.escape(e3035PartyQualifier.toString()));
            nodeTokens.add(nodeWriter.toString());
            ((StringWriter)nodeWriter).getBuffer().setLength(0);
        }
        nodeWriter.write(delimiters.getField());
        if(c206IdentificationNumber != null) {
            c206IdentificationNumber.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(e3403NameTypeCoded != null) {
            nodeWriter.write(delimiters.escape(e3403NameTypeCoded.toString()));
            nodeTokens.add(nodeWriter.toString());
            ((StringWriter)nodeWriter).getBuffer().setLength(0);
        }
        nodeWriter.write(delimiters.getField());
        if(e3397NameStatusCoded != null) {
            nodeWriter.write(delimiters.escape(e3397NameStatusCoded.toString()));
            nodeTokens.add(nodeWriter.toString());
            ((StringWriter)nodeWriter).getBuffer().setLength(0);
        }
        nodeWriter.write(delimiters.getField());
        if(c8161NameComponentDetails != null) {
            c8161NameComponentDetails.write(nodeWriter, delimiters);
            nodeTokens.add(nodeWriter.toString());
            ((StringWriter)nodeWriter).getBuffer().setLength(0);
        }
        nodeWriter.write(delimiters.getField());
        if(c8162NameComponentDetails != null) {
            c8162NameComponentDetails.write(nodeWriter, delimiters);
            nodeTokens.add(nodeWriter.toString());
            ((StringWriter)nodeWriter).getBuffer().setLength(0);
        }
        nodeWriter.write(delimiters.getField());
        if(c8163NameComponentDetails != null) {
            c8163NameComponentDetails.write(nodeWriter, delimiters);
            nodeTokens.add(nodeWriter.toString());
            ((StringWriter)nodeWriter).getBuffer().setLength(0);
        }
        nodeWriter.write(delimiters.getField());
        if(c8164NameComponentDetails != null) {
            c8164NameComponentDetails.write(nodeWriter, delimiters);
            nodeTokens.add(nodeWriter.toString());
            ((StringWriter)nodeWriter).getBuffer().setLength(0);
        }
        nodeWriter.write(delimiters.getField());
        if(c8165NameComponentDetails != null) {
            c8165NameComponentDetails.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 getE3035PartyQualifier() {
        return e3035PartyQualifier;
    }

    public PNAPartyIdentification setE3035PartyQualifier(String e3035PartyQualifier) {
        this.e3035PartyQualifier = e3035PartyQualifier;  return this;
    }

    public C2061IdentificationNumber getC206IdentificationNumber() {
        return c206IdentificationNumber;
    }

    public PNAPartyIdentification setC206IdentificationNumber(C2061IdentificationNumber c206IdentificationNumber) {
        this.c206IdentificationNumber = c206IdentificationNumber;  return this;
    }

    public C082PartyIdentificationDetails getC082PartyIdentificationDetails() {
        return c082PartyIdentificationDetails;
    }

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

    public String getE3403NameTypeCoded() {
        return e3403NameTypeCoded;
    }

    public PNAPartyIdentification setE3403NameTypeCoded(String e3403NameTypeCoded) {
        this.e3403NameTypeCoded = e3403NameTypeCoded;  return this;
    }

    public String getE3397NameStatusCoded() {
        return e3397NameStatusCoded;
    }

    public PNAPartyIdentification setE3397NameStatusCoded(String e3397NameStatusCoded) {
        this.e3397NameStatusCoded = e3397NameStatusCoded;  return this;
    }

    public C8161NameComponentDetails getC8161NameComponentDetails() {
        return c8161NameComponentDetails;
    }

    public PNAPartyIdentification setC8161NameComponentDetails(C8161NameComponentDetails c8161NameComponentDetails) {
        this.c8161NameComponentDetails = c8161NameComponentDetails;  return this;
    }

    public C8161NameComponentDetails getC8162NameComponentDetails() {
        return c8162NameComponentDetails;
    }

    public PNAPartyIdentification setC8162NameComponentDetails(C8161NameComponentDetails c8162NameComponentDetails) {
        this.c8162NameComponentDetails = c8162NameComponentDetails;  return this;
    }

    public C8161NameComponentDetails getC8163NameComponentDetails() {
        return c8163NameComponentDetails;
    }

    public PNAPartyIdentification setC8163NameComponentDetails(C8161NameComponentDetails c8163NameComponentDetails) {
        this.c8163NameComponentDetails = c8163NameComponentDetails;  return this;
    }

    public C8161NameComponentDetails getC8164NameComponentDetails() {
        return c8164NameComponentDetails;
    }

    public PNAPartyIdentification setC8164NameComponentDetails(C8161NameComponentDetails c8164NameComponentDetails) {
        this.c8164NameComponentDetails = c8164NameComponentDetails;  return this;
    }

    public C8161NameComponentDetails getC8165NameComponentDetails() {
        return c8165NameComponentDetails;
    }

    public PNAPartyIdentification setC8165NameComponentDetails(C8161NameComponentDetails c8165NameComponentDetails) {
        this.c8165NameComponentDetails = c8165NameComponentDetails;  return this;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy