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

org.milyn.edi.unedifact.d06b.CHACCO.SegmentGroup5 Maven / Gradle / Ivy

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

import java.io.Serializable;    
import org.milyn.smooks.edi.EDIWritable;    
import org.milyn.edi.unedifact.d06b.common.Relationship;    
import org.milyn.edi.unedifact.d06b.common.AccountIdentification;    
import org.milyn.edi.unedifact.d06b.common.FinancialInstitutionInformation;    
import org.milyn.edi.unedifact.d06b.common.PaymentTerms;    
import org.milyn.edi.unedifact.d06b.common.PaymentInstructions;    
import java.util.List;    
import java.io.Writer;    
import org.milyn.edisax.model.internal.Delimiters;    
import java.io.IOException;    

public class SegmentGroup5 implements Serializable, EDIWritable {

    private static final long serialVersionUID = 1L;

    private Relationship relationship;
    private AccountIdentification accountIdentification;
    private FinancialInstitutionInformation financialInstitutionInformation;
    private PaymentTerms paymentTerms;
    private PaymentInstructions paymentInstructions;
    private List segmentGroup6;

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

        if(relationship != null) {
            nodeWriter.write("REL");
            nodeWriter.write(delimiters.getField());
            relationship.write(nodeWriter, delimiters);
        }
        if(accountIdentification != null) {
            nodeWriter.write("CPT");
            nodeWriter.write(delimiters.getField());
            accountIdentification.write(nodeWriter, delimiters);
        }
        if(financialInstitutionInformation != null) {
            nodeWriter.write("FII");
            nodeWriter.write(delimiters.getField());
            financialInstitutionInformation.write(nodeWriter, delimiters);
        }
        if(paymentTerms != null) {
            nodeWriter.write("PYT");
            nodeWriter.write(delimiters.getField());
            paymentTerms.write(nodeWriter, delimiters);
        }
        if(paymentInstructions != null) {
            nodeWriter.write("PAI");
            nodeWriter.write(delimiters.getField());
            paymentInstructions.write(nodeWriter, delimiters);
        }
        if(segmentGroup6 != null && !segmentGroup6.isEmpty()) {
            for(SegmentGroup6 segmentGroup6Inst : segmentGroup6) {
                segmentGroup6Inst.write(nodeWriter, delimiters);
            }
        }
    }

    public Relationship getRelationship() {
        return relationship;
    }

    public SegmentGroup5 setRelationship(Relationship relationship) {
        this.relationship = relationship;  return this;
    }

    public AccountIdentification getAccountIdentification() {
        return accountIdentification;
    }

    public SegmentGroup5 setAccountIdentification(AccountIdentification accountIdentification) {
        this.accountIdentification = accountIdentification;  return this;
    }

    public FinancialInstitutionInformation getFinancialInstitutionInformation() {
        return financialInstitutionInformation;
    }

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

    public PaymentTerms getPaymentTerms() {
        return paymentTerms;
    }

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

    public PaymentInstructions getPaymentInstructions() {
        return paymentInstructions;
    }

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

    public List getSegmentGroup6() {
        return segmentGroup6;
    }

    public SegmentGroup5 setSegmentGroup6(List segmentGroup6) {
        this.segmentGroup6 = segmentGroup6;  return this;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy