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

org.milyn.edi.unedifact.d02a.PRIHIS.SegmentGroup7 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.PRIHIS;

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

public class SegmentGroup7 implements Serializable, EDIWritable {

    private static final long serialVersionUID = 1L;

    private Reference reference;
    private List dateTimePeriod;
    private List agreementIdentification;
    private List segmentGroup8;

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

        if(reference != null) {
            nodeWriter.write("RFF");
            nodeWriter.write(delimiters.getField());
            reference.write(nodeWriter, delimiters);
        }
        if(dateTimePeriod != null && !dateTimePeriod.isEmpty()) {
            for(DateTimePeriod dateTimePeriodInst : dateTimePeriod) {
                nodeWriter.write("DTM");
                nodeWriter.write(delimiters.getField());
                dateTimePeriodInst.write(nodeWriter, delimiters);
            }
        }
        if(agreementIdentification != null && !agreementIdentification.isEmpty()) {
            for(AgreementIdentification agreementIdentificationInst : agreementIdentification) {
                nodeWriter.write("AGR");
                nodeWriter.write(delimiters.getField());
                agreementIdentificationInst.write(nodeWriter, delimiters);
            }
        }
        if(segmentGroup8 != null && !segmentGroup8.isEmpty()) {
            for(SegmentGroup8 segmentGroup8Inst : segmentGroup8) {
                segmentGroup8Inst.write(nodeWriter, delimiters);
            }
        }
    }

    public Reference getReference() {
        return reference;
    }

    public SegmentGroup7 setReference(Reference reference) {
        this.reference = reference;  return this;
    }

    public List getDateTimePeriod() {
        return dateTimePeriod;
    }

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

    public List getAgreementIdentification() {
        return agreementIdentification;
    }

    public SegmentGroup7 setAgreementIdentification(List agreementIdentification) {
        this.agreementIdentification = agreementIdentification;  return this;
    }

    public List getSegmentGroup8() {
        return segmentGroup8;
    }

    public SegmentGroup7 setSegmentGroup8(List segmentGroup8) {
        this.segmentGroup8 = segmentGroup8;  return this;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy