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

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

There is a newer version: 1.7.1.0
Show newest version
/**
 * This class was generated by Smooks EJC (http://www.smooks.org).
 */
package org.milyn.edi.unedifact.d02a.RESMSG;

import java.io.Serializable;    
import org.milyn.smooks.edi.EDIWritable;    
import org.milyn.edi.unedifact.d02a.common.RequirementsAndConditions;    
import java.util.List;    
import org.milyn.edi.unedifact.d02a.common.MonetaryAmount;    
import org.milyn.edi.unedifact.d02a.common.Reference;    
import org.milyn.edi.unedifact.d02a.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