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

org.milyn.edi.unedifact.d99b.FINPAY.SegmentGroup21 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.d99b.FINPAY;

import java.io.Serializable;    
import org.milyn.smooks.edi.EDIWritable;    
import org.milyn.edi.unedifact.d99b.common.AllowanceOrCharge;    
import org.milyn.edi.unedifact.d99b.common.PercentageDetails;    
import java.util.List;    
import org.milyn.edi.unedifact.d99b.common.MonetaryAmount;    
import org.milyn.edi.unedifact.d99b.common.Currencies;    
import org.milyn.edi.unedifact.d99b.common.DateTimePeriod;    
import java.io.Writer;    
import org.milyn.edisax.model.internal.Delimiters;    
import java.io.IOException;    

public class SegmentGroup21 implements Serializable, EDIWritable {

    private static final long serialVersionUID = 1L;

    private AllowanceOrCharge allowanceOrCharge;
    private PercentageDetails percentageDetails;
    private List monetaryAmount;
    private Currencies currencies;
    private List dateTimePeriod;
    private List segmentGroup22;

    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(percentageDetails != null) {
            nodeWriter.write("PCD");
            nodeWriter.write(delimiters.getField());
            percentageDetails.write(nodeWriter, delimiters);
        }
        if(monetaryAmount != null && !monetaryAmount.isEmpty()) {
            for(MonetaryAmount monetaryAmountInst : monetaryAmount) {
                nodeWriter.write("MOA");
                nodeWriter.write(delimiters.getField());
                monetaryAmountInst.write(nodeWriter, delimiters);
            }
        }
        if(currencies != null) {
            nodeWriter.write("CUX");
            nodeWriter.write(delimiters.getField());
            currencies.write(nodeWriter, delimiters);
        }
        if(dateTimePeriod != null && !dateTimePeriod.isEmpty()) {
            for(DateTimePeriod dateTimePeriodInst : dateTimePeriod) {
                nodeWriter.write("DTM");
                nodeWriter.write(delimiters.getField());
                dateTimePeriodInst.write(nodeWriter, delimiters);
            }
        }
        if(segmentGroup22 != null && !segmentGroup22.isEmpty()) {
            for(SegmentGroup22 segmentGroup22Inst : segmentGroup22) {
                segmentGroup22Inst.write(nodeWriter, delimiters);
            }
        }
    }

    public AllowanceOrCharge getAllowanceOrCharge() {
        return allowanceOrCharge;
    }

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

    public PercentageDetails getPercentageDetails() {
        return percentageDetails;
    }

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

    public List getMonetaryAmount() {
        return monetaryAmount;
    }

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

    public Currencies getCurrencies() {
        return currencies;
    }

    public SegmentGroup21 setCurrencies(Currencies currencies) {
        this.currencies = currencies;  return this;
    }

    public List getDateTimePeriod() {
        return dateTimePeriod;
    }

    public SegmentGroup21 setDateTimePeriod(List dateTimePeriod) {
        this.dateTimePeriod = dateTimePeriod;  return this;
    }

    public List getSegmentGroup22() {
        return segmentGroup22;
    }

    public SegmentGroup21 setSegmentGroup22(List segmentGroup22) {
        this.segmentGroup22 = segmentGroup22;  return this;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy