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

org.milyn.edi.unedifact.d06b.CUSDEC.SegmentGroup19 Maven / Gradle / Ivy

/**
 * This class was generated by Smooks EJC (http://www.smooks.org).
 */
package org.milyn.edi.unedifact.d06b.CUSDEC;

import java.io.Serializable;    
import org.milyn.smooks.edi.EDIWritable;    
import org.milyn.edi.unedifact.d06b.common.AllowanceOrCharge;    
import org.milyn.edi.unedifact.d06b.common.RateDetails;    
import org.milyn.edi.unedifact.d06b.common.MonetaryAmount;    
import org.milyn.edi.unedifact.d06b.common.PercentageDetails;    
import org.milyn.edi.unedifact.d06b.common.Quantity;    
import java.io.Writer;    
import org.milyn.edisax.model.internal.Delimiters;    
import java.io.IOException;    

public class SegmentGroup19 implements Serializable, EDIWritable {

    private static final long serialVersionUID = 1L;

    private AllowanceOrCharge allowanceOrCharge;
    private RateDetails rateDetails;
    private MonetaryAmount monetaryAmount;
    private PercentageDetails percentageDetails;
    private Quantity quantity;
    private SegmentGroup20 segmentGroup20;

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

        if(allowanceOrCharge != null) {
            nodeWriter.write("ALC");
            nodeWriter.write(delimiters.getField());
            allowanceOrCharge.write(nodeWriter, delimiters);
        }
        if(rateDetails != null) {
            nodeWriter.write("RTE");
            nodeWriter.write(delimiters.getField());
            rateDetails.write(nodeWriter, delimiters);
        }
        if(monetaryAmount != null) {
            nodeWriter.write("MOA");
            nodeWriter.write(delimiters.getField());
            monetaryAmount.write(nodeWriter, delimiters);
        }
        if(percentageDetails != null) {
            nodeWriter.write("PCD");
            nodeWriter.write(delimiters.getField());
            percentageDetails.write(nodeWriter, delimiters);
        }
        if(quantity != null) {
            nodeWriter.write("QTY");
            nodeWriter.write(delimiters.getField());
            quantity.write(nodeWriter, delimiters);
        }
        if(segmentGroup20 != null) {
            segmentGroup20.write(nodeWriter, delimiters);
        }
    }

    public AllowanceOrCharge getAllowanceOrCharge() {
        return allowanceOrCharge;
    }

    public SegmentGroup19 setAllowanceOrCharge(AllowanceOrCharge allowanceOrCharge) {
        this.allowanceOrCharge = allowanceOrCharge;  return this;
    }

    public RateDetails getRateDetails() {
        return rateDetails;
    }

    public SegmentGroup19 setRateDetails(RateDetails rateDetails) {
        this.rateDetails = rateDetails;  return this;
    }

    public MonetaryAmount getMonetaryAmount() {
        return monetaryAmount;
    }

    public SegmentGroup19 setMonetaryAmount(MonetaryAmount monetaryAmount) {
        this.monetaryAmount = monetaryAmount;  return this;
    }

    public PercentageDetails getPercentageDetails() {
        return percentageDetails;
    }

    public SegmentGroup19 setPercentageDetails(PercentageDetails percentageDetails) {
        this.percentageDetails = percentageDetails;  return this;
    }

    public Quantity getQuantity() {
        return quantity;
    }

    public SegmentGroup19 setQuantity(Quantity quantity) {
        this.quantity = quantity;  return this;
    }

    public SegmentGroup20 getSegmentGroup20() {
        return segmentGroup20;
    }

    public SegmentGroup19 setSegmentGroup20(SegmentGroup20 segmentGroup20) {
        this.segmentGroup20 = segmentGroup20;  return this;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy