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

org.milyn.edi.unedifact.d96a.DEBMUL.SegmentGroup8 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.d96a.DEBMUL;

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

public class SegmentGroup8 implements Serializable, EDIWritable {

    private static final long serialVersionUID = 1L;

    private AllowanceOrCharge allowanceOrCharge;
    private PercentageDetails percentageDetails;
    private List monetaryAmount;
    private Currencies currencies;
    private DateTimePeriod dateTimePeriod;
    private List segmentGroup9;

    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) {
            nodeWriter.write("DTM");
            nodeWriter.write(delimiters.getField());
            dateTimePeriod.write(nodeWriter, delimiters);
        }
        if(segmentGroup9 != null && !segmentGroup9.isEmpty()) {
            for(SegmentGroup9 segmentGroup9Inst : segmentGroup9) {
                segmentGroup9Inst.write(nodeWriter, delimiters);
            }
        }
    }

    public AllowanceOrCharge getAllowanceOrCharge() {
        return allowanceOrCharge;
    }

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

    public PercentageDetails getPercentageDetails() {
        return percentageDetails;
    }

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

    public List getMonetaryAmount() {
        return monetaryAmount;
    }

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

    public Currencies getCurrencies() {
        return currencies;
    }

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

    public DateTimePeriod getDateTimePeriod() {
        return dateTimePeriod;
    }

    public SegmentGroup8 setDateTimePeriod(DateTimePeriod dateTimePeriod) {
        this.dateTimePeriod = dateTimePeriod;  return this;
    }

    public List getSegmentGroup9() {
        return segmentGroup9;
    }

    public SegmentGroup8 setSegmentGroup9(List segmentGroup9) {
        this.segmentGroup9 = segmentGroup9;  return this;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy