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

org.milyn.edi.unedifact.d06b.BOPDIR.SegmentGroup3 Maven / Gradle / Ivy

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

import java.io.Serializable;    
import org.milyn.smooks.edi.EDIWritable;    
import org.milyn.edi.unedifact.d06b.common.Reference;    
import org.milyn.edi.unedifact.d06b.common.Attribute;    
import org.milyn.edi.unedifact.d06b.common.FinancialInstitutionInformation;    
import java.util.List;    
import org.milyn.edi.unedifact.d06b.common.NameAndAddress;    
import org.milyn.edi.unedifact.d06b.common.MonetaryAmount;    
import org.milyn.edi.unedifact.d06b.common.Currencies;    
import java.io.Writer;    
import org.milyn.edisax.model.internal.Delimiters;    
import java.io.IOException;    

public class SegmentGroup3 implements Serializable, EDIWritable {

    private static final long serialVersionUID = 1L;

    private Reference reference;
    private Attribute attribute;
    private FinancialInstitutionInformation financialInstitutionInformation;
    private List nameAndAddress;
    private List monetaryAmount;
    private Currencies currencies;
    private List segmentGroup4;

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

        if(reference != null) {
            nodeWriter.write("RFF");
            nodeWriter.write(delimiters.getField());
            reference.write(nodeWriter, delimiters);
        }
        if(attribute != null) {
            nodeWriter.write("ATT");
            nodeWriter.write(delimiters.getField());
            attribute.write(nodeWriter, delimiters);
        }
        if(financialInstitutionInformation != null) {
            nodeWriter.write("FII");
            nodeWriter.write(delimiters.getField());
            financialInstitutionInformation.write(nodeWriter, delimiters);
        }
        if(nameAndAddress != null && !nameAndAddress.isEmpty()) {
            for(NameAndAddress nameAndAddressInst : nameAndAddress) {
                nodeWriter.write("NAD");
                nodeWriter.write(delimiters.getField());
                nameAndAddressInst.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(segmentGroup4 != null && !segmentGroup4.isEmpty()) {
            for(SegmentGroup4 segmentGroup4Inst : segmentGroup4) {
                segmentGroup4Inst.write(nodeWriter, delimiters);
            }
        }
    }

    public Reference getReference() {
        return reference;
    }

    public SegmentGroup3 setReference(Reference reference) {
        this.reference = reference;  return this;
    }

    public Attribute getAttribute() {
        return attribute;
    }

    public SegmentGroup3 setAttribute(Attribute attribute) {
        this.attribute = attribute;  return this;
    }

    public FinancialInstitutionInformation getFinancialInstitutionInformation() {
        return financialInstitutionInformation;
    }

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

    public List getNameAndAddress() {
        return nameAndAddress;
    }

    public SegmentGroup3 setNameAndAddress(List nameAndAddress) {
        this.nameAndAddress = nameAndAddress;  return this;
    }

    public List getMonetaryAmount() {
        return monetaryAmount;
    }

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

    public Currencies getCurrencies() {
        return currencies;
    }

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

    public List getSegmentGroup4() {
        return segmentGroup4;
    }

    public SegmentGroup3 setSegmentGroup4(List segmentGroup4) {
        this.segmentGroup4 = segmentGroup4;  return this;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy