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

org.milyn.edi.unedifact.d06b.PRIHIS.SegmentGroup4 Maven / Gradle / Ivy

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

import java.io.Serializable;    
import org.milyn.smooks.edi.EDIWritable;    
import org.milyn.edi.unedifact.d06b.common.LineItem;    
import java.util.List;    
import org.milyn.edi.unedifact.d06b.common.AdditionalProductId;    
import org.milyn.edi.unedifact.d06b.common.Reference;    
import org.milyn.edi.unedifact.d06b.common.ItemDescription;    
import org.milyn.edi.unedifact.d06b.common.Measurements;    
import org.milyn.edi.unedifact.d06b.common.PercentageDetails;    
import org.milyn.edi.unedifact.d06b.common.AdditionalInformation;    
import org.milyn.edi.unedifact.d06b.common.RelatedIdentificationNumbers;    
import java.io.Writer;    
import org.milyn.edisax.model.internal.Delimiters;    
import java.io.IOException;    

public class SegmentGroup4 implements Serializable, EDIWritable {

    private static final long serialVersionUID = 1L;

    private LineItem lineItem;
    private List additionalProductId;
    private List reference;
    private List itemDescription;
    private List measurements;
    private List percentageDetails;
    private List additionalInformation;
    private List relatedIdentificationNumbers;
    private List segmentGroup5;

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

        if(lineItem != null) {
            nodeWriter.write("LIN");
            nodeWriter.write(delimiters.getField());
            lineItem.write(nodeWriter, delimiters);
        }
        if(additionalProductId != null && !additionalProductId.isEmpty()) {
            for(AdditionalProductId additionalProductIdInst : additionalProductId) {
                nodeWriter.write("PIA");
                nodeWriter.write(delimiters.getField());
                additionalProductIdInst.write(nodeWriter, delimiters);
            }
        }
        if(reference != null && !reference.isEmpty()) {
            for(Reference referenceInst : reference) {
                nodeWriter.write("RFF");
                nodeWriter.write(delimiters.getField());
                referenceInst.write(nodeWriter, delimiters);
            }
        }
        if(itemDescription != null && !itemDescription.isEmpty()) {
            for(ItemDescription itemDescriptionInst : itemDescription) {
                nodeWriter.write("IMD");
                nodeWriter.write(delimiters.getField());
                itemDescriptionInst.write(nodeWriter, delimiters);
            }
        }
        if(measurements != null && !measurements.isEmpty()) {
            for(Measurements measurementsInst : measurements) {
                nodeWriter.write("MEA");
                nodeWriter.write(delimiters.getField());
                measurementsInst.write(nodeWriter, delimiters);
            }
        }
        if(percentageDetails != null && !percentageDetails.isEmpty()) {
            for(PercentageDetails percentageDetailsInst : percentageDetails) {
                nodeWriter.write("PCD");
                nodeWriter.write(delimiters.getField());
                percentageDetailsInst.write(nodeWriter, delimiters);
            }
        }
        if(additionalInformation != null && !additionalInformation.isEmpty()) {
            for(AdditionalInformation additionalInformationInst : additionalInformation) {
                nodeWriter.write("ALI");
                nodeWriter.write(delimiters.getField());
                additionalInformationInst.write(nodeWriter, delimiters);
            }
        }
        if(relatedIdentificationNumbers != null && !relatedIdentificationNumbers.isEmpty()) {
            for(RelatedIdentificationNumbers relatedIdentificationNumbersInst : relatedIdentificationNumbers) {
                nodeWriter.write("GIR");
                nodeWriter.write(delimiters.getField());
                relatedIdentificationNumbersInst.write(nodeWriter, delimiters);
            }
        }
        if(segmentGroup5 != null && !segmentGroup5.isEmpty()) {
            for(SegmentGroup5 segmentGroup5Inst : segmentGroup5) {
                segmentGroup5Inst.write(nodeWriter, delimiters);
            }
        }
    }

    public LineItem getLineItem() {
        return lineItem;
    }

    public SegmentGroup4 setLineItem(LineItem lineItem) {
        this.lineItem = lineItem;  return this;
    }

    public List getAdditionalProductId() {
        return additionalProductId;
    }

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

    public List getReference() {
        return reference;
    }

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

    public List getItemDescription() {
        return itemDescription;
    }

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

    public List getMeasurements() {
        return measurements;
    }

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

    public List getPercentageDetails() {
        return percentageDetails;
    }

    public SegmentGroup4 setPercentageDetails(List percentageDetails) {
        this.percentageDetails = percentageDetails;  return this;
    }

    public List getAdditionalInformation() {
        return additionalInformation;
    }

    public SegmentGroup4 setAdditionalInformation(List additionalInformation) {
        this.additionalInformation = additionalInformation;  return this;
    }

    public List getRelatedIdentificationNumbers() {
        return relatedIdentificationNumbers;
    }

    public SegmentGroup4 setRelatedIdentificationNumbers(List relatedIdentificationNumbers) {
        this.relatedIdentificationNumbers = relatedIdentificationNumbers;  return this;
    }

    public List getSegmentGroup5() {
        return segmentGroup5;
    }

    public SegmentGroup4 setSegmentGroup5(List segmentGroup5) {
        this.segmentGroup5 = segmentGroup5;  return this;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy