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

org.milyn.edi.unedifact.d99b.RETACC.SegmentGroup4 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.RETACC;

import java.io.Serializable;    
import org.milyn.smooks.edi.EDIWritable;    
import org.milyn.edi.unedifact.d99b.common.Reference;    
import org.milyn.edi.unedifact.d99b.common.DateTimePeriod;    
import org.milyn.edi.unedifact.d99b.common.CommunicationContact;    
import org.milyn.edi.unedifact.d99b.common.FreeText;    
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 Reference reference;
    private DateTimePeriod dateTimePeriod;
    private CommunicationContact communicationContact;
    private FreeText freeText;

    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) {
            nodeWriter.write("DTM");
            nodeWriter.write(delimiters.getField());
            dateTimePeriod.write(nodeWriter, delimiters);
        }
        if(communicationContact != null) {
            nodeWriter.write("COM");
            nodeWriter.write(delimiters.getField());
            communicationContact.write(nodeWriter, delimiters);
        }
        if(freeText != null) {
            nodeWriter.write("FTX");
            nodeWriter.write(delimiters.getField());
            freeText.write(nodeWriter, delimiters);
        }
    }

    public Reference getReference() {
        return reference;
    }

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

    public DateTimePeriod getDateTimePeriod() {
        return dateTimePeriod;
    }

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

    public CommunicationContact getCommunicationContact() {
        return communicationContact;
    }

    public SegmentGroup4 setCommunicationContact(CommunicationContact communicationContact) {
        this.communicationContact = communicationContact;  return this;
    }

    public FreeText getFreeText() {
        return freeText;
    }

    public SegmentGroup4 setFreeText(FreeText freeText) {
        this.freeText = freeText;  return this;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy