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

org.milyn.edi.unedifact.d06b.DAPLOS.SegmentGroup12 Maven / Gradle / Ivy

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

import java.io.Serializable;    
import org.milyn.smooks.edi.EDIWritable;    
import org.milyn.edi.unedifact.d06b.common.Event;    
import java.util.List;    
import org.milyn.edi.unedifact.d06b.common.DateTimePeriod;    
import org.milyn.edi.unedifact.d06b.common.ItemDescription;    
import org.milyn.edi.unedifact.d06b.common.NameAndAddress;    
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 SegmentGroup12 implements Serializable, EDIWritable {

    private static final long serialVersionUID = 1L;

    private Event event;
    private List dateTimePeriod;
    private List itemDescription;
    private NameAndAddress nameAndAddress;
    private List freeText;
    private SegmentGroup13 segmentGroup13;
    private List segmentGroup14;
    private List segmentGroup15;
    private SegmentGroup20 segmentGroup20;

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

        if(event != null) {
            nodeWriter.write("EVE");
            nodeWriter.write(delimiters.getField());
            event.write(nodeWriter, delimiters);
        }
        if(dateTimePeriod != null && !dateTimePeriod.isEmpty()) {
            for(DateTimePeriod dateTimePeriodInst : dateTimePeriod) {
                nodeWriter.write("DTM");
                nodeWriter.write(delimiters.getField());
                dateTimePeriodInst.write(nodeWriter, delimiters);
            }
        }
        if(itemDescription != null && !itemDescription.isEmpty()) {
            for(ItemDescription itemDescriptionInst : itemDescription) {
                nodeWriter.write("IMD");
                nodeWriter.write(delimiters.getField());
                itemDescriptionInst.write(nodeWriter, delimiters);
            }
        }
        if(nameAndAddress != null) {
            nodeWriter.write("NAD");
            nodeWriter.write(delimiters.getField());
            nameAndAddress.write(nodeWriter, delimiters);
        }
        if(freeText != null && !freeText.isEmpty()) {
            for(FreeText freeTextInst : freeText) {
                nodeWriter.write("FTX");
                nodeWriter.write(delimiters.getField());
                freeTextInst.write(nodeWriter, delimiters);
            }
        }
        if(segmentGroup13 != null) {
            segmentGroup13.write(nodeWriter, delimiters);
        }
        if(segmentGroup14 != null && !segmentGroup14.isEmpty()) {
            for(SegmentGroup14 segmentGroup14Inst : segmentGroup14) {
                segmentGroup14Inst.write(nodeWriter, delimiters);
            }
        }
        if(segmentGroup15 != null && !segmentGroup15.isEmpty()) {
            for(SegmentGroup15 segmentGroup15Inst : segmentGroup15) {
                segmentGroup15Inst.write(nodeWriter, delimiters);
            }
        }
        if(segmentGroup20 != null) {
            segmentGroup20.write(nodeWriter, delimiters);
        }
    }

    public Event getEvent() {
        return event;
    }

    public SegmentGroup12 setEvent(Event event) {
        this.event = event;  return this;
    }

    public List getDateTimePeriod() {
        return dateTimePeriod;
    }

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

    public List getItemDescription() {
        return itemDescription;
    }

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

    public NameAndAddress getNameAndAddress() {
        return nameAndAddress;
    }

    public SegmentGroup12 setNameAndAddress(NameAndAddress nameAndAddress) {
        this.nameAndAddress = nameAndAddress;  return this;
    }

    public List getFreeText() {
        return freeText;
    }

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

    public SegmentGroup13 getSegmentGroup13() {
        return segmentGroup13;
    }

    public SegmentGroup12 setSegmentGroup13(SegmentGroup13 segmentGroup13) {
        this.segmentGroup13 = segmentGroup13;  return this;
    }

    public List getSegmentGroup14() {
        return segmentGroup14;
    }

    public SegmentGroup12 setSegmentGroup14(List segmentGroup14) {
        this.segmentGroup14 = segmentGroup14;  return this;
    }

    public List getSegmentGroup15() {
        return segmentGroup15;
    }

    public SegmentGroup12 setSegmentGroup15(List segmentGroup15) {
        this.segmentGroup15 = segmentGroup15;  return this;
    }

    public SegmentGroup20 getSegmentGroup20() {
        return segmentGroup20;
    }

    public SegmentGroup12 setSegmentGroup20(SegmentGroup20 segmentGroup20) {
        this.segmentGroup20 = segmentGroup20;  return this;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy