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

org.milyn.edi.unedifact.d02a.SAFHAZ.SegmentGroup3 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.SAFHAZ;

import java.io.Serializable;    
import org.milyn.smooks.edi.EDIWritable;    
import org.milyn.edi.unedifact.d02a.common.DocumentMessageDetails;    
import java.util.List;    
import org.milyn.edi.unedifact.d02a.common.ItemDescription;    
import org.milyn.edi.unedifact.d02a.common.AdditionalProductId;    
import org.milyn.edi.unedifact.d02a.common.Measurements;    
import org.milyn.edi.unedifact.d02a.common.RequirementsAndConditions;    
import org.milyn.edi.unedifact.d02a.common.Reference;    
import org.milyn.edi.unedifact.d02a.common.DateTimePeriod;    
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 SegmentGroup3 implements Serializable, EDIWritable {

    private static final long serialVersionUID = 1L;

    private DocumentMessageDetails documentMessageDetails;
    private List itemDescription;
    private List additionalProductId;
    private List measurements;
    private List requirementsAndConditions;
    private List reference;
    private List dateTimePeriod;
    private List freeText;
    private List segmentGroup4;
    private List segmentGroup6;

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

        if(documentMessageDetails != null) {
            nodeWriter.write("DOC");
            nodeWriter.write(delimiters.getField());
            documentMessageDetails.write(nodeWriter, delimiters);
        }
        if(itemDescription != null && !itemDescription.isEmpty()) {
            for(ItemDescription itemDescriptionInst : itemDescription) {
                nodeWriter.write("IMD");
                nodeWriter.write(delimiters.getField());
                itemDescriptionInst.write(nodeWriter, delimiters);
            }
        }
        if(additionalProductId != null && !additionalProductId.isEmpty()) {
            for(AdditionalProductId additionalProductIdInst : additionalProductId) {
                nodeWriter.write("PIA");
                nodeWriter.write(delimiters.getField());
                additionalProductIdInst.write(nodeWriter, delimiters);
            }
        }
        if(measurements != null && !measurements.isEmpty()) {
            for(Measurements measurementsInst : measurements) {
                nodeWriter.write("MEA");
                nodeWriter.write(delimiters.getField());
                measurementsInst.write(nodeWriter, delimiters);
            }
        }
        if(requirementsAndConditions != null && !requirementsAndConditions.isEmpty()) {
            for(RequirementsAndConditions requirementsAndConditionsInst : requirementsAndConditions) {
                nodeWriter.write("RCS");
                nodeWriter.write(delimiters.getField());
                requirementsAndConditionsInst.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(freeText != null && !freeText.isEmpty()) {
            for(FreeText freeTextInst : freeText) {
                nodeWriter.write("FTX");
                nodeWriter.write(delimiters.getField());
                freeTextInst.write(nodeWriter, delimiters);
            }
        }
        if(segmentGroup4 != null && !segmentGroup4.isEmpty()) {
            for(SegmentGroup4 segmentGroup4Inst : segmentGroup4) {
                segmentGroup4Inst.write(nodeWriter, delimiters);
            }
        }
        if(segmentGroup6 != null && !segmentGroup6.isEmpty()) {
            for(SegmentGroup6 segmentGroup6Inst : segmentGroup6) {
                segmentGroup6Inst.write(nodeWriter, delimiters);
            }
        }
    }

    public DocumentMessageDetails getDocumentMessageDetails() {
        return documentMessageDetails;
    }

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

    public List getItemDescription() {
        return itemDescription;
    }

    public SegmentGroup3 setItemDescription(List itemDescription) {
        this.itemDescription = itemDescription;  return this;
    }

    public List getAdditionalProductId() {
        return additionalProductId;
    }

    public SegmentGroup3 setAdditionalProductId(List additionalProductId) {
        this.additionalProductId = additionalProductId;  return this;
    }

    public List getMeasurements() {
        return measurements;
    }

    public SegmentGroup3 setMeasurements(List measurements) {
        this.measurements = measurements;  return this;
    }

    public List getRequirementsAndConditions() {
        return requirementsAndConditions;
    }

    public SegmentGroup3 setRequirementsAndConditions(List requirementsAndConditions) {
        this.requirementsAndConditions = requirementsAndConditions;  return this;
    }

    public List getReference() {
        return reference;
    }

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

    public List getDateTimePeriod() {
        return dateTimePeriod;
    }

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

    public List getFreeText() {
        return freeText;
    }

    public SegmentGroup3 setFreeText(List freeText) {
        this.freeText = freeText;  return this;
    }

    public List getSegmentGroup4() {
        return segmentGroup4;
    }

    public SegmentGroup3 setSegmentGroup4(List segmentGroup4) {
        this.segmentGroup4 = segmentGroup4;  return this;
    }

    public List getSegmentGroup6() {
        return segmentGroup6;
    }

    public SegmentGroup3 setSegmentGroup6(List segmentGroup6) {
        this.segmentGroup6 = segmentGroup6;  return this;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy