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

org.milyn.edi.unedifact.d06b.RESMSG.SegmentGroup14 Maven / Gradle / Ivy

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

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.MonetaryAmount;    
import org.milyn.edi.unedifact.d06b.common.Reference;    
import org.milyn.edi.unedifact.d06b.common.FreeText;    
import java.io.Writer;    
import org.milyn.edisax.model.internal.Delimiters;    
import java.io.IOException;    

public class SegmentGroup14 implements Serializable, EDIWritable {

    private static final long serialVersionUID = 1L;

    private RequirementsAndConditions requirementsAndConditions;
    private List monetaryAmount;
    private List reference;
    private FreeText freeText;

    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(monetaryAmount != null && !monetaryAmount.isEmpty()) {
            for(MonetaryAmount monetaryAmountInst : monetaryAmount) {
                nodeWriter.write("MOA");
                nodeWriter.write(delimiters.getField());
                monetaryAmountInst.write(nodeWriter, delimiters);
            }
        }
        if(reference != null && !reference.isEmpty()) {
            for(Reference referenceInst : reference) {
                nodeWriter.write("RFF");
                nodeWriter.write(delimiters.getField());
                referenceInst.write(nodeWriter, delimiters);
            }
        }
        if(freeText != null) {
            nodeWriter.write("FTX");
            nodeWriter.write(delimiters.getField());
            freeText.write(nodeWriter, delimiters);
        }
    }

    public RequirementsAndConditions getRequirementsAndConditions() {
        return requirementsAndConditions;
    }

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

    public List getMonetaryAmount() {
        return monetaryAmount;
    }

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

    public List getReference() {
        return reference;
    }

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

    public FreeText getFreeText() {
        return freeText;
    }

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy