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

org.milyn.edi.unedifact.d02a.common.ALCAllowanceOrCharge Maven / Gradle / Ivy

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

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

    private static final long serialVersionUID = 1L;

    private String e5463AllowanceOrChargeCodeQualifier;
    private C552AllowanceChargeInformation c552AllowanceChargeInformation;
    private String e4471SettlementMeansCode;
    private String e1227CalculationSequenceCode;
    private C214SpecialServicesIdentification c214SpecialServicesIdentification;

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

        List nodeTokens = new ArrayList();

        if(e5463AllowanceOrChargeCodeQualifier != null) {
            nodeWriter.write(delimiters.escape(e5463AllowanceOrChargeCodeQualifier.toString()));
            nodeTokens.add(nodeWriter.toString());
            ((StringWriter)nodeWriter).getBuffer().setLength(0);
        }
        nodeWriter.write(delimiters.getField());
        if(c552AllowanceChargeInformation != null) {
            c552AllowanceChargeInformation.write(nodeWriter, delimiters);
            nodeTokens.add(nodeWriter.toString());
            ((StringWriter)nodeWriter).getBuffer().setLength(0);
        }
        nodeWriter.write(delimiters.getField());
        if(e4471SettlementMeansCode != null) {
            nodeWriter.write(delimiters.escape(e4471SettlementMeansCode.toString()));
            nodeTokens.add(nodeWriter.toString());
            ((StringWriter)nodeWriter).getBuffer().setLength(0);
        }
        nodeWriter.write(delimiters.getField());
        if(e1227CalculationSequenceCode != null) {
            nodeWriter.write(delimiters.escape(e1227CalculationSequenceCode.toString()));
            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);
        }
        nodeTokens.add(nodeWriter.toString());
        writer.write(EDIUtils.concatAndTruncate(nodeTokens, DelimiterType.FIELD, delimiters));
        writer.write(delimiters.getSegmentDelimiter());
        writer.flush();
    }

    public String getE5463AllowanceOrChargeCodeQualifier() {
        return e5463AllowanceOrChargeCodeQualifier;
    }

    public ALCAllowanceOrCharge setE5463AllowanceOrChargeCodeQualifier(String e5463AllowanceOrChargeCodeQualifier) {
        this.e5463AllowanceOrChargeCodeQualifier = e5463AllowanceOrChargeCodeQualifier;  return this;
    }

    public C552AllowanceChargeInformation getC552AllowanceChargeInformation() {
        return c552AllowanceChargeInformation;
    }

    public ALCAllowanceOrCharge setC552AllowanceChargeInformation(C552AllowanceChargeInformation c552AllowanceChargeInformation) {
        this.c552AllowanceChargeInformation = c552AllowanceChargeInformation;  return this;
    }

    public String getE4471SettlementMeansCode() {
        return e4471SettlementMeansCode;
    }

    public ALCAllowanceOrCharge setE4471SettlementMeansCode(String e4471SettlementMeansCode) {
        this.e4471SettlementMeansCode = e4471SettlementMeansCode;  return this;
    }

    public String getE1227CalculationSequenceCode() {
        return e1227CalculationSequenceCode;
    }

    public ALCAllowanceOrCharge setE1227CalculationSequenceCode(String e1227CalculationSequenceCode) {
        this.e1227CalculationSequenceCode = e1227CalculationSequenceCode;  return this;
    }

    public C214SpecialServicesIdentification getC214SpecialServicesIdentification() {
        return c214SpecialServicesIdentification;
    }

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy