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

org.virtuslab.edi.unedifact.d96a.common.ALCAllowanceOrCharge 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.C552AllowanceChargeInformation;    
import org.virtuslab.edi.unedifact.d96a.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 e5463AllowanceOrChargeQualifier;
    private C552AllowanceChargeInformation c552AllowanceChargeInformation;
    private String e4471SettlementCoded;
    private String e1227CalculationSequenceIndicatorCoded;
    private C214SpecialServicesIdentification c214SpecialServicesIdentification;

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

        List nodeTokens = new ArrayList();

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

    public ALCAllowanceOrCharge setE5463AllowanceOrChargeQualifier(String e5463AllowanceOrChargeQualifier) {
        this.e5463AllowanceOrChargeQualifier = e5463AllowanceOrChargeQualifier;  return this;
    }

    public C552AllowanceChargeInformation getC552AllowanceChargeInformation() {
        return c552AllowanceChargeInformation;
    }

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

    public String getE4471SettlementCoded() {
        return e4471SettlementCoded;
    }

    public ALCAllowanceOrCharge setE4471SettlementCoded(String e4471SettlementCoded) {
        this.e4471SettlementCoded = e4471SettlementCoded;  return this;
    }

    public String getE1227CalculationSequenceIndicatorCoded() {
        return e1227CalculationSequenceIndicatorCoded;
    }

    public ALCAllowanceOrCharge setE1227CalculationSequenceIndicatorCoded(String e1227CalculationSequenceIndicatorCoded) {
        this.e1227CalculationSequenceIndicatorCoded = e1227CalculationSequenceIndicatorCoded;  return this;
    }

    public C214SpecialServicesIdentification getC214SpecialServicesIdentification() {
        return c214SpecialServicesIdentification;
    }

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy