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

org.milyn.edi.unedifact.d06b.SUPRES.SegmentGroup16 Maven / Gradle / Ivy

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

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

public class SegmentGroup16 implements Serializable, EDIWritable {

    private static final long serialVersionUID = 1L;

    private RequirementsAndConditions requirementsAndConditions;
    private List financialInstitutionInformation;
    private List monetaryAmount;
    private Reference reference;
    private FreeText freeText;
    private DocumentMessageDetails documentMessageDetails;

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

        if(requirementsAndConditions != null) {
            nodeWriter.write("RCS");
            nodeWriter.write(delimiters.getField());
            requirementsAndConditions.write(nodeWriter, delimiters);
        }
        if(financialInstitutionInformation != null && !financialInstitutionInformation.isEmpty()) {
            for(FinancialInstitutionInformation financialInstitutionInformationInst : financialInstitutionInformation) {
                nodeWriter.write("FII");
                nodeWriter.write(delimiters.getField());
                financialInstitutionInformationInst.write(nodeWriter, delimiters);
            }
        }
        if(monetaryAmount != null && !monetaryAmount.isEmpty()) {
            for(MonetaryAmount monetaryAmountInst : monetaryAmount) {
                nodeWriter.write("MOA");
                nodeWriter.write(delimiters.getField());
                monetaryAmountInst.write(nodeWriter, delimiters);
            }
        }
        if(reference != null) {
            nodeWriter.write("RFF");
            nodeWriter.write(delimiters.getField());
            reference.write(nodeWriter, delimiters);
        }
        if(freeText != null) {
            nodeWriter.write("FTX");
            nodeWriter.write(delimiters.getField());
            freeText.write(nodeWriter, delimiters);
        }
        if(documentMessageDetails != null) {
            nodeWriter.write("DOC");
            nodeWriter.write(delimiters.getField());
            documentMessageDetails.write(nodeWriter, delimiters);
        }
    }

    public RequirementsAndConditions getRequirementsAndConditions() {
        return requirementsAndConditions;
    }

    public SegmentGroup16 setRequirementsAndConditions(RequirementsAndConditions requirementsAndConditions) {
        this.requirementsAndConditions = requirementsAndConditions;  return this;
    }

    public List getFinancialInstitutionInformation() {
        return financialInstitutionInformation;
    }

    public SegmentGroup16 setFinancialInstitutionInformation(List financialInstitutionInformation) {
        this.financialInstitutionInformation = financialInstitutionInformation;  return this;
    }

    public List getMonetaryAmount() {
        return monetaryAmount;
    }

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

    public Reference getReference() {
        return reference;
    }

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

    public FreeText getFreeText() {
        return freeText;
    }

    public SegmentGroup16 setFreeText(FreeText freeText) {
        this.freeText = freeText;  return this;
    }

    public DocumentMessageDetails getDocumentMessageDetails() {
        return documentMessageDetails;
    }

    public SegmentGroup16 setDocumentMessageDetails(DocumentMessageDetails documentMessageDetails) {
        this.documentMessageDetails = documentMessageDetails;  return this;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy