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

org.milyn.edi.unedifact.d96a.PARTIN.SegmentGroup10 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.PARTIN;

import java.io.Serializable;    
import org.milyn.smooks.edi.EDIWritable;    
import org.milyn.edi.unedifact.d96a.common.PaymentInstructions;    
import org.milyn.edi.unedifact.d96a.common.PaymentTermsBasis;    
import java.util.List;    
import org.milyn.edi.unedifact.d96a.common.Currencies;    
import java.io.Writer;    
import org.milyn.edisax.model.internal.Delimiters;    
import java.io.IOException;    

public class SegmentGroup10 implements Serializable, EDIWritable {

    private static final long serialVersionUID = 1L;

    private PaymentInstructions paymentInstructions;
    private PaymentTermsBasis paymentTermsBasis;
    private List currencies;

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

        if(paymentInstructions != null) {
            nodeWriter.write("PAI");
            nodeWriter.write(delimiters.getField());
            paymentInstructions.write(nodeWriter, delimiters);
        }
        if(paymentTermsBasis != null) {
            nodeWriter.write("PAT");
            nodeWriter.write(delimiters.getField());
            paymentTermsBasis.write(nodeWriter, delimiters);
        }
        if(currencies != null && !currencies.isEmpty()) {
            for(Currencies currenciesInst : currencies) {
                nodeWriter.write("CUX");
                nodeWriter.write(delimiters.getField());
                currenciesInst.write(nodeWriter, delimiters);
            }
        }
    }

    public PaymentInstructions getPaymentInstructions() {
        return paymentInstructions;
    }

    public SegmentGroup10 setPaymentInstructions(PaymentInstructions paymentInstructions) {
        this.paymentInstructions = paymentInstructions;  return this;
    }

    public PaymentTermsBasis getPaymentTermsBasis() {
        return paymentTermsBasis;
    }

    public SegmentGroup10 setPaymentTermsBasis(PaymentTermsBasis paymentTermsBasis) {
        this.paymentTermsBasis = paymentTermsBasis;  return this;
    }

    public List getCurrencies() {
        return currencies;
    }

    public SegmentGroup10 setCurrencies(List currencies) {
        this.currencies = currencies;  return this;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy