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

org.virtuslab.edi.unedifact.d99a.common.CDIPhysicalOrLogicalState Maven / Gradle / Ivy

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

import java.io.Serializable;    
import org.milyn.smooks.edi.EDIWritable;    
import org.virtuslab.edi.unedifact.d99a.common.field.C564PhysicalOrLogicalStateInformation;    
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 CDIPhysicalOrLogicalState implements Serializable, EDIWritable {

    private static final long serialVersionUID = 1L;

    private String e7001PhysicalOrLogicalStateQualifier;
    private C564PhysicalOrLogicalStateInformation c564PhysicalOrLogicalStateInformation;

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

        List nodeTokens = new ArrayList();

        if(e7001PhysicalOrLogicalStateQualifier != null) {
            nodeWriter.write(delimiters.escape(e7001PhysicalOrLogicalStateQualifier.toString()));
            nodeTokens.add(nodeWriter.toString());
            ((StringWriter)nodeWriter).getBuffer().setLength(0);
        }
        nodeWriter.write(delimiters.getField());
        if(c564PhysicalOrLogicalStateInformation != null) {
            c564PhysicalOrLogicalStateInformation.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 getE7001PhysicalOrLogicalStateQualifier() {
        return e7001PhysicalOrLogicalStateQualifier;
    }

    public CDIPhysicalOrLogicalState setE7001PhysicalOrLogicalStateQualifier(String e7001PhysicalOrLogicalStateQualifier) {
        this.e7001PhysicalOrLogicalStateQualifier = e7001PhysicalOrLogicalStateQualifier;  return this;
    }

    public C564PhysicalOrLogicalStateInformation getC564PhysicalOrLogicalStateInformation() {
        return c564PhysicalOrLogicalStateInformation;
    }

    public CDIPhysicalOrLogicalState setC564PhysicalOrLogicalStateInformation(C564PhysicalOrLogicalStateInformation c564PhysicalOrLogicalStateInformation) {
        this.c564PhysicalOrLogicalStateInformation = c564PhysicalOrLogicalStateInformation;  return this;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy