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

org.milyn.edi.unedifact.d06b.ICSOLI.SegmentGroup5 Maven / Gradle / Ivy

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

import java.io.Serializable;    
import org.milyn.smooks.edi.EDIWritable;    
import org.milyn.edi.unedifact.d06b.common.ComponentDetails;    
import java.util.List;    
import org.milyn.edi.unedifact.d06b.common.Attribute;    
import org.milyn.edi.unedifact.d06b.common.Identity;    
import org.milyn.edi.unedifact.d06b.common.Reference;    
import org.milyn.edi.unedifact.d06b.common.DateTimePeriod;    
import org.milyn.edi.unedifact.d06b.common.MonetaryAmount;    
import org.milyn.edi.unedifact.d06b.common.NumberOfUnits;    
import org.milyn.edi.unedifact.d06b.common.QueryAndResponse;    
import java.io.Writer;    
import org.milyn.edisax.model.internal.Delimiters;    
import java.io.IOException;    

public class SegmentGroup5 implements Serializable, EDIWritable {

    private static final long serialVersionUID = 1L;

    private ComponentDetails componentDetails;
    private List attribute;
    private Identity identity;
    private List reference;
    private List dateTimePeriod;
    private List monetaryAmount;
    private List numberOfUnits;
    private List queryAndResponse;

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

        if(componentDetails != null) {
            nodeWriter.write("COD");
            nodeWriter.write(delimiters.getField());
            componentDetails.write(nodeWriter, delimiters);
        }
        if(attribute != null && !attribute.isEmpty()) {
            for(Attribute attributeInst : attribute) {
                nodeWriter.write("ATT");
                nodeWriter.write(delimiters.getField());
                attributeInst.write(nodeWriter, delimiters);
            }
        }
        if(identity != null) {
            nodeWriter.write("IDE");
            nodeWriter.write(delimiters.getField());
            identity.write(nodeWriter, delimiters);
        }
        if(reference != null && !reference.isEmpty()) {
            for(Reference referenceInst : reference) {
                nodeWriter.write("RFF");
                nodeWriter.write(delimiters.getField());
                referenceInst.write(nodeWriter, delimiters);
            }
        }
        if(dateTimePeriod != null && !dateTimePeriod.isEmpty()) {
            for(DateTimePeriod dateTimePeriodInst : dateTimePeriod) {
                nodeWriter.write("DTM");
                nodeWriter.write(delimiters.getField());
                dateTimePeriodInst.write(nodeWriter, delimiters);
            }
        }
        if(monetaryAmount != null && !monetaryAmount.isEmpty()) {
            for(MonetaryAmount monetaryAmountInst : monetaryAmount) {
                nodeWriter.write("MOA");
                nodeWriter.write(delimiters.getField());
                monetaryAmountInst.write(nodeWriter, delimiters);
            }
        }
        if(numberOfUnits != null && !numberOfUnits.isEmpty()) {
            for(NumberOfUnits numberOfUnitsInst : numberOfUnits) {
                nodeWriter.write("EQN");
                nodeWriter.write(delimiters.getField());
                numberOfUnitsInst.write(nodeWriter, delimiters);
            }
        }
        if(queryAndResponse != null && !queryAndResponse.isEmpty()) {
            for(QueryAndResponse queryAndResponseInst : queryAndResponse) {
                nodeWriter.write("QRS");
                nodeWriter.write(delimiters.getField());
                queryAndResponseInst.write(nodeWriter, delimiters);
            }
        }
    }

    public ComponentDetails getComponentDetails() {
        return componentDetails;
    }

    public SegmentGroup5 setComponentDetails(ComponentDetails componentDetails) {
        this.componentDetails = componentDetails;  return this;
    }

    public List getAttribute() {
        return attribute;
    }

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

    public Identity getIdentity() {
        return identity;
    }

    public SegmentGroup5 setIdentity(Identity identity) {
        this.identity = identity;  return this;
    }

    public List getReference() {
        return reference;
    }

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

    public List getDateTimePeriod() {
        return dateTimePeriod;
    }

    public SegmentGroup5 setDateTimePeriod(List dateTimePeriod) {
        this.dateTimePeriod = dateTimePeriod;  return this;
    }

    public List getMonetaryAmount() {
        return monetaryAmount;
    }

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

    public List getNumberOfUnits() {
        return numberOfUnits;
    }

    public SegmentGroup5 setNumberOfUnits(List numberOfUnits) {
        this.numberOfUnits = numberOfUnits;  return this;
    }

    public List getQueryAndResponse() {
        return queryAndResponse;
    }

    public SegmentGroup5 setQueryAndResponse(List queryAndResponse) {
        this.queryAndResponse = queryAndResponse;  return this;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy