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

org.milyn.edi.unedifact.d99b.STLRPT.SegmentGroup2 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.d99b.STLRPT;

import java.io.Serializable;    
import org.milyn.smooks.edi.EDIWritable;    
import org.milyn.edi.unedifact.d99b.common.DateTimePeriod;    
import org.milyn.edi.unedifact.d99b.common.GeneralIndicator;    
import java.util.List;    
import java.io.Writer;    
import org.milyn.edisax.model.internal.Delimiters;    
import java.io.IOException;    

public class SegmentGroup2 implements Serializable, EDIWritable {

    private static final long serialVersionUID = 1L;

    private DateTimePeriod dateTimePeriod;
    private GeneralIndicator generalIndicator;
    private List segmentGroup3;
    private List segmentGroup4;

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

        if(dateTimePeriod != null) {
            nodeWriter.write("DTM");
            nodeWriter.write(delimiters.getField());
            dateTimePeriod.write(nodeWriter, delimiters);
        }
        if(generalIndicator != null) {
            nodeWriter.write("GIS");
            nodeWriter.write(delimiters.getField());
            generalIndicator.write(nodeWriter, delimiters);
        }
        if(segmentGroup3 != null && !segmentGroup3.isEmpty()) {
            for(SegmentGroup3 segmentGroup3Inst : segmentGroup3) {
                segmentGroup3Inst.write(nodeWriter, delimiters);
            }
        }
        if(segmentGroup4 != null && !segmentGroup4.isEmpty()) {
            for(SegmentGroup4 segmentGroup4Inst : segmentGroup4) {
                segmentGroup4Inst.write(nodeWriter, delimiters);
            }
        }
    }

    public DateTimePeriod getDateTimePeriod() {
        return dateTimePeriod;
    }

    public SegmentGroup2 setDateTimePeriod(DateTimePeriod dateTimePeriod) {
        this.dateTimePeriod = dateTimePeriod;  return this;
    }

    public GeneralIndicator getGeneralIndicator() {
        return generalIndicator;
    }

    public SegmentGroup2 setGeneralIndicator(GeneralIndicator generalIndicator) {
        this.generalIndicator = generalIndicator;  return this;
    }

    public List getSegmentGroup3() {
        return segmentGroup3;
    }

    public SegmentGroup2 setSegmentGroup3(List segmentGroup3) {
        this.segmentGroup3 = segmentGroup3;  return this;
    }

    public List getSegmentGroup4() {
        return segmentGroup4;
    }

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy