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

org.milyn.edi.unedifact.d06b.ICSOLI.SegmentGroup8 Maven / Gradle / Ivy

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

import java.io.Serializable;    
import org.milyn.smooks.edi.EDIWritable;    
import org.milyn.edi.unedifact.d06b.common.PaymentTerms;    
import java.util.List;    
import org.milyn.edi.unedifact.d06b.common.MonetaryAmount;    
import org.milyn.edi.unedifact.d06b.common.PartyIdentification;    
import org.milyn.edi.unedifact.d06b.common.FinancialInstitutionInformation;    
import org.milyn.edi.unedifact.d06b.common.Attribute;    
import org.milyn.edi.unedifact.d06b.common.Reference;    
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 PaymentTerms paymentTerms;
    private List monetaryAmount;
    private PartyIdentification partyIdentification;
    private FinancialInstitutionInformation financialInstitutionInformation;
    private List attribute;
    private List reference;

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

        if(paymentTerms != null) {
            nodeWriter.write("PYT");
            nodeWriter.write(delimiters.getField());
            paymentTerms.write(nodeWriter, delimiters);
        }
        if(monetaryAmount != null && !monetaryAmount.isEmpty()) {
            for(MonetaryAmount monetaryAmountInst : monetaryAmount) {
                nodeWriter.write("MOA");
                nodeWriter.write(delimiters.getField());
                monetaryAmountInst.write(nodeWriter, delimiters);
            }
        }
        if(partyIdentification != null) {
            nodeWriter.write("PNA");
            nodeWriter.write(delimiters.getField());
            partyIdentification.write(nodeWriter, delimiters);
        }
        if(financialInstitutionInformation != null) {
            nodeWriter.write("FII");
            nodeWriter.write(delimiters.getField());
            financialInstitutionInformation.write(nodeWriter, delimiters);
        }
        if(attribute != null && !attribute.isEmpty()) {
            for(Attribute attributeInst : attribute) {
                nodeWriter.write("ATT");
                nodeWriter.write(delimiters.getField());
                attributeInst.write(nodeWriter, delimiters);
            }
        }
        if(reference != null && !reference.isEmpty()) {
            for(Reference referenceInst : reference) {
                nodeWriter.write("RFF");
                nodeWriter.write(delimiters.getField());
                referenceInst.write(nodeWriter, delimiters);
            }
        }
    }

    public PaymentTerms getPaymentTerms() {
        return paymentTerms;
    }

    public SegmentGroup8 setPaymentTerms(PaymentTerms paymentTerms) {
        this.paymentTerms = paymentTerms;  return this;
    }

    public List getMonetaryAmount() {
        return monetaryAmount;
    }

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

    public PartyIdentification getPartyIdentification() {
        return partyIdentification;
    }

    public SegmentGroup8 setPartyIdentification(PartyIdentification partyIdentification) {
        this.partyIdentification = partyIdentification;  return this;
    }

    public FinancialInstitutionInformation getFinancialInstitutionInformation() {
        return financialInstitutionInformation;
    }

    public SegmentGroup8 setFinancialInstitutionInformation(FinancialInstitutionInformation financialInstitutionInformation) {
        this.financialInstitutionInformation = financialInstitutionInformation;  return this;
    }

    public List getAttribute() {
        return attribute;
    }

    public SegmentGroup8 setAttribute(List attribute) {
        this.attribute = attribute;  return this;
    }

    public List getReference() {
        return reference;
    }

    public SegmentGroup8 setReference(List reference) {
        this.reference = reference;  return this;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy