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

org.virtuslab.edi.unedifact.d96a.common.STSStatus Maven / Gradle / Ivy

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

import java.io.Serializable;    
import org.milyn.smooks.edi.EDIWritable;    
import org.virtuslab.edi.unedifact.d96a.common.field.C601StatusType;    
import org.virtuslab.edi.unedifact.d96a.common.field.C555StatusEvent;    
import org.virtuslab.edi.unedifact.d96a.common.field.C5561StatusReason;    
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 STSStatus implements Serializable, EDIWritable {

    private static final long serialVersionUID = 1L;

    private C601StatusType c601StatusType;
    private C555StatusEvent c555StatusEvent;
    private C5561StatusReason c5561StatusReason;
    private C5561StatusReason c5562StatusReason;
    private C5561StatusReason c5563StatusReason;
    private C5561StatusReason c5564StatusReason;
    private C5561StatusReason c5565StatusReason;

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

        List nodeTokens = new ArrayList();

        if(c601StatusType != null) {
            c601StatusType.write(nodeWriter, delimiters);
            nodeTokens.add(nodeWriter.toString());
            ((StringWriter)nodeWriter).getBuffer().setLength(0);
        }
        nodeWriter.write(delimiters.getField());
        if(c555StatusEvent != null) {
            c555StatusEvent.write(nodeWriter, delimiters);
            nodeTokens.add(nodeWriter.toString());
            ((StringWriter)nodeWriter).getBuffer().setLength(0);
        }
        nodeWriter.write(delimiters.getField());
        if(c5561StatusReason != null) {
            c5561StatusReason.write(nodeWriter, delimiters);
            nodeTokens.add(nodeWriter.toString());
            ((StringWriter)nodeWriter).getBuffer().setLength(0);
        }
        nodeWriter.write(delimiters.getField());
        if(c5562StatusReason != null) {
            c5562StatusReason.write(nodeWriter, delimiters);
            nodeTokens.add(nodeWriter.toString());
            ((StringWriter)nodeWriter).getBuffer().setLength(0);
        }
        nodeWriter.write(delimiters.getField());
        if(c5563StatusReason != null) {
            c5563StatusReason.write(nodeWriter, delimiters);
            nodeTokens.add(nodeWriter.toString());
            ((StringWriter)nodeWriter).getBuffer().setLength(0);
        }
        nodeWriter.write(delimiters.getField());
        if(c5564StatusReason != null) {
            c5564StatusReason.write(nodeWriter, delimiters);
            nodeTokens.add(nodeWriter.toString());
            ((StringWriter)nodeWriter).getBuffer().setLength(0);
        }
        nodeWriter.write(delimiters.getField());
        if(c5565StatusReason != null) {
            c5565StatusReason.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 C601StatusType getC601StatusType() {
        return c601StatusType;
    }

    public STSStatus setC601StatusType(C601StatusType c601StatusType) {
        this.c601StatusType = c601StatusType;  return this;
    }

    public C555StatusEvent getC555StatusEvent() {
        return c555StatusEvent;
    }

    public STSStatus setC555StatusEvent(C555StatusEvent c555StatusEvent) {
        this.c555StatusEvent = c555StatusEvent;  return this;
    }

    public C5561StatusReason getC5561StatusReason() {
        return c5561StatusReason;
    }

    public STSStatus setC5561StatusReason(C5561StatusReason c5561StatusReason) {
        this.c5561StatusReason = c5561StatusReason;  return this;
    }

    public C5561StatusReason getC5562StatusReason() {
        return c5562StatusReason;
    }

    public STSStatus setC5562StatusReason(C5561StatusReason c5562StatusReason) {
        this.c5562StatusReason = c5562StatusReason;  return this;
    }

    public C5561StatusReason getC5563StatusReason() {
        return c5563StatusReason;
    }

    public STSStatus setC5563StatusReason(C5561StatusReason c5563StatusReason) {
        this.c5563StatusReason = c5563StatusReason;  return this;
    }

    public C5561StatusReason getC5564StatusReason() {
        return c5564StatusReason;
    }

    public STSStatus setC5564StatusReason(C5561StatusReason c5564StatusReason) {
        this.c5564StatusReason = c5564StatusReason;  return this;
    }

    public C5561StatusReason getC5565StatusReason() {
        return c5565StatusReason;
    }

    public STSStatus setC5565StatusReason(C5561StatusReason c5565StatusReason) {
        this.c5565StatusReason = c5565StatusReason;  return this;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy