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

org.milyn.edi.unedifact.d06b.BUSCRD.SegmentGroup11 Maven / Gradle / Ivy

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

import java.io.Serializable;    
import org.milyn.smooks.edi.EDIWritable;    
import org.milyn.edi.unedifact.d06b.common.BusinessFunction;    
import java.util.List;    
import org.milyn.edi.unedifact.d06b.common.PaymentTerms;    
import org.milyn.edi.unedifact.d06b.common.DateTimePeriod;    
import org.milyn.edi.unedifact.d06b.common.RangeDetails;    
import org.milyn.edi.unedifact.d06b.common.PercentageDetails;    
import java.io.Writer;    
import org.milyn.edisax.model.internal.Delimiters;    
import java.io.IOException;    

public class SegmentGroup11 implements Serializable, EDIWritable {

    private static final long serialVersionUID = 1L;

    private BusinessFunction businessFunction;
    private List paymentTerms;
    private List dateTimePeriod;
    private List rangeDetails;
    private PercentageDetails percentageDetails;

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

        if(businessFunction != null) {
            nodeWriter.write("BUS");
            nodeWriter.write(delimiters.getField());
            businessFunction.write(nodeWriter, delimiters);
        }
        if(paymentTerms != null && !paymentTerms.isEmpty()) {
            for(PaymentTerms paymentTermsInst : paymentTerms) {
                nodeWriter.write("PYT");
                nodeWriter.write(delimiters.getField());
                paymentTermsInst.write(nodeWriter, delimiters);
            }
        }
        if(dateTimePeriod != null && !dateTimePeriod.isEmpty()) {
            for(DateTimePeriod dateTimePeriodInst : dateTimePeriod) {
                nodeWriter.write("DTM");
                nodeWriter.write(delimiters.getField());
                dateTimePeriodInst.write(nodeWriter, delimiters);
            }
        }
        if(rangeDetails != null && !rangeDetails.isEmpty()) {
            for(RangeDetails rangeDetailsInst : rangeDetails) {
                nodeWriter.write("RNG");
                nodeWriter.write(delimiters.getField());
                rangeDetailsInst.write(nodeWriter, delimiters);
            }
        }
        if(percentageDetails != null) {
            nodeWriter.write("PCD");
            nodeWriter.write(delimiters.getField());
            percentageDetails.write(nodeWriter, delimiters);
        }
    }

    public BusinessFunction getBusinessFunction() {
        return businessFunction;
    }

    public SegmentGroup11 setBusinessFunction(BusinessFunction businessFunction) {
        this.businessFunction = businessFunction;  return this;
    }

    public List getPaymentTerms() {
        return paymentTerms;
    }

    public SegmentGroup11 setPaymentTerms(List paymentTerms) {
        this.paymentTerms = paymentTerms;  return this;
    }

    public List getDateTimePeriod() {
        return dateTimePeriod;
    }

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

    public List getRangeDetails() {
        return rangeDetails;
    }

    public SegmentGroup11 setRangeDetails(List rangeDetails) {
        this.rangeDetails = rangeDetails;  return this;
    }

    public PercentageDetails getPercentageDetails() {
        return percentageDetails;
    }

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy