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

org.milyn.edi.unedifact.d06b.IPPOMO.SegmentGroup36 Maven / Gradle / Ivy

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

import java.io.Serializable;    
import org.milyn.smooks.edi.EDIWritable;    
import org.milyn.edi.unedifact.d06b.common.InsuranceCoverDescription;    
import java.util.List;    
import org.milyn.edi.unedifact.d06b.common.Attribute;    
import org.milyn.edi.unedifact.d06b.common.MonetaryAmount;    
import org.milyn.edi.unedifact.d06b.common.Quantity;    
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 SegmentGroup36 implements Serializable, EDIWritable {

    private static final long serialVersionUID = 1L;

    private InsuranceCoverDescription insuranceCoverDescription;
    private List attribute;
    private List monetaryAmount;
    private List quantity;
    private FreeText freeText;

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

        if(insuranceCoverDescription != null) {
            nodeWriter.write("ICD");
            nodeWriter.write(delimiters.getField());
            insuranceCoverDescription.write(nodeWriter, delimiters);
        }
        if(attribute != null && !attribute.isEmpty()) {
            for(Attribute attributeInst : attribute) {
                nodeWriter.write("ATT");
                nodeWriter.write(delimiters.getField());
                attributeInst.write(nodeWriter, delimiters);
            }
        }
        if(monetaryAmount != null && !monetaryAmount.isEmpty()) {
            for(MonetaryAmount monetaryAmountInst : monetaryAmount) {
                nodeWriter.write("MOA");
                nodeWriter.write(delimiters.getField());
                monetaryAmountInst.write(nodeWriter, delimiters);
            }
        }
        if(quantity != null && !quantity.isEmpty()) {
            for(Quantity quantityInst : quantity) {
                nodeWriter.write("QTY");
                nodeWriter.write(delimiters.getField());
                quantityInst.write(nodeWriter, delimiters);
            }
        }
        if(freeText != null) {
            nodeWriter.write("FTX");
            nodeWriter.write(delimiters.getField());
            freeText.write(nodeWriter, delimiters);
        }
    }

    public InsuranceCoverDescription getInsuranceCoverDescription() {
        return insuranceCoverDescription;
    }

    public SegmentGroup36 setInsuranceCoverDescription(InsuranceCoverDescription insuranceCoverDescription) {
        this.insuranceCoverDescription = insuranceCoverDescription;  return this;
    }

    public List getAttribute() {
        return attribute;
    }

    public SegmentGroup36 setAttribute(List attribute) {
        this.attribute = attribute;  return this;
    }

    public List getMonetaryAmount() {
        return monetaryAmount;
    }

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

    public List getQuantity() {
        return quantity;
    }

    public SegmentGroup36 setQuantity(List quantity) {
        this.quantity = quantity;  return this;
    }

    public FreeText getFreeText() {
        return freeText;
    }

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy