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

org.milyn.edi.unedifact.d06b.PROSRV.SegmentGroup12 Maven / Gradle / Ivy

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

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

public class SegmentGroup12 implements Serializable, EDIWritable {

    private static final long serialVersionUID = 1L;

    private AllowanceOrCharge allowanceOrCharge;
    private List quantity;
    private List monetaryAmount;
    private List rateDetails;
    private List segmentGroup13;

    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(quantity != null && !quantity.isEmpty()) {
            for(Quantity quantityInst : quantity) {
                nodeWriter.write("QTY");
                nodeWriter.write(delimiters.getField());
                quantityInst.write(nodeWriter, delimiters);
            }
        }
        if(monetaryAmount != null && !monetaryAmount.isEmpty()) {
            for(MonetaryAmount monetaryAmountInst : monetaryAmount) {
                nodeWriter.write("MOA");
                nodeWriter.write(delimiters.getField());
                monetaryAmountInst.write(nodeWriter, delimiters);
            }
        }
        if(rateDetails != null && !rateDetails.isEmpty()) {
            for(RateDetails rateDetailsInst : rateDetails) {
                nodeWriter.write("RTE");
                nodeWriter.write(delimiters.getField());
                rateDetailsInst.write(nodeWriter, delimiters);
            }
        }
        if(segmentGroup13 != null && !segmentGroup13.isEmpty()) {
            for(SegmentGroup13 segmentGroup13Inst : segmentGroup13) {
                segmentGroup13Inst.write(nodeWriter, delimiters);
            }
        }
    }

    public AllowanceOrCharge getAllowanceOrCharge() {
        return allowanceOrCharge;
    }

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

    public List getQuantity() {
        return quantity;
    }

    public SegmentGroup12 setQuantity(List quantity) {
        this.quantity = quantity;  return this;
    }

    public List getMonetaryAmount() {
        return monetaryAmount;
    }

    public SegmentGroup12 setMonetaryAmount(List monetaryAmount) {
        this.monetaryAmount = monetaryAmount;  return this;
    }

    public List getRateDetails() {
        return rateDetails;
    }

    public SegmentGroup12 setRateDetails(List rateDetails) {
        this.rateDetails = rateDetails;  return this;
    }

    public List getSegmentGroup13() {
        return segmentGroup13;
    }

    public SegmentGroup12 setSegmentGroup13(List segmentGroup13) {
        this.segmentGroup13 = segmentGroup13;  return this;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy