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

org.milyn.edi.unedifact.d94a.common.DLMDeliveryLimitations 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.d94a.common;

import java.io.Serializable;    
import org.milyn.smooks.edi.EDIWritable;    
import org.milyn.edi.unedifact.d94a.common.field.C522Instruction;    
import org.milyn.edi.unedifact.d94a.common.field.C214SpecialServicesIdentification;    
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 DLMDeliveryLimitations implements Serializable, EDIWritable {

    private static final long serialVersionUID = 1L;

    private String e4455BackOrderCoded;
    private C522Instruction c522Instruction;
    private C214SpecialServicesIdentification c214SpecialServicesIdentification;
    private String e4457ProductServiceSubstitutionCoded;

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

        List nodeTokens = new ArrayList();

        if(e4455BackOrderCoded != null) {
            nodeWriter.write(delimiters.escape(e4455BackOrderCoded.toString()));
            nodeTokens.add(nodeWriter.toString());
            ((StringWriter)nodeWriter).getBuffer().setLength(0);
        }
        nodeWriter.write(delimiters.getField());
        if(c522Instruction != null) {
            c522Instruction.write(nodeWriter, delimiters);
            nodeTokens.add(nodeWriter.toString());
            ((StringWriter)nodeWriter).getBuffer().setLength(0);
        }
        nodeWriter.write(delimiters.getField());
        if(c214SpecialServicesIdentification != null) {
            c214SpecialServicesIdentification.write(nodeWriter, delimiters);
            nodeTokens.add(nodeWriter.toString());
            ((StringWriter)nodeWriter).getBuffer().setLength(0);
        }
        nodeWriter.write(delimiters.getField());
        if(e4457ProductServiceSubstitutionCoded != null) {
            nodeWriter.write(delimiters.escape(e4457ProductServiceSubstitutionCoded.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 String getE4455BackOrderCoded() {
        return e4455BackOrderCoded;
    }

    public DLMDeliveryLimitations setE4455BackOrderCoded(String e4455BackOrderCoded) {
        this.e4455BackOrderCoded = e4455BackOrderCoded;  return this;
    }

    public C522Instruction getC522Instruction() {
        return c522Instruction;
    }

    public DLMDeliveryLimitations setC522Instruction(C522Instruction c522Instruction) {
        this.c522Instruction = c522Instruction;  return this;
    }

    public C214SpecialServicesIdentification getC214SpecialServicesIdentification() {
        return c214SpecialServicesIdentification;
    }

    public DLMDeliveryLimitations setC214SpecialServicesIdentification(C214SpecialServicesIdentification c214SpecialServicesIdentification) {
        this.c214SpecialServicesIdentification = c214SpecialServicesIdentification;  return this;
    }

    public String getE4457ProductServiceSubstitutionCoded() {
        return e4457ProductServiceSubstitutionCoded;
    }

    public DLMDeliveryLimitations setE4457ProductServiceSubstitutionCoded(String e4457ProductServiceSubstitutionCoded) {
        this.e4457ProductServiceSubstitutionCoded = e4457ProductServiceSubstitutionCoded;  return this;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy