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

org.milyn.edi.unedifact.d97a.common.PASAttendance Maven / Gradle / Ivy

The newest version!
/**
 * This class was generated by Smooks EJC (http://www.smooks.org).
 */
package org.milyn.edi.unedifact.d97a.common;

import java.io.Serializable;    
import org.milyn.smooks.edi.EDIWritable;    
import org.milyn.edi.unedifact.d97a.common.field.C839AttendeeCategory;    
import org.milyn.edi.unedifact.d97a.common.field.C840AttendanceAdmissionDetails;    
import org.milyn.edi.unedifact.d97a.common.field.C841AttendanceDischargeDetails;    
import java.io.Writer;    
import org.milyn.edisax.model.internal.Delimiters;    
import java.io.IOException;    
import java.io.StringWriter;    
import java.util.List;    
import java.util.ArrayList;    
import org.milyn.edisax.util.EDIUtils;    
import org.milyn.edisax.model.internal.DelimiterType;    

public class PASAttendance implements Serializable, EDIWritable {

    private static final long serialVersionUID = 1L;

    private String e9443AttendanceQualifier;
    private C839AttendeeCategory c839AttendeeCategory;
    private C840AttendanceAdmissionDetails c840AttendanceAdmissionDetails;
    private C841AttendanceDischargeDetails c841AttendanceDischargeDetails;

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

        List nodeTokens = new ArrayList();

        if(e9443AttendanceQualifier != null) {
            nodeWriter.write(delimiters.escape(e9443AttendanceQualifier.toString()));
            nodeTokens.add(nodeWriter.toString());
            ((StringWriter)nodeWriter).getBuffer().setLength(0);
        }
        nodeWriter.write(delimiters.getField());
        if(c839AttendeeCategory != null) {
            c839AttendeeCategory.write(nodeWriter, delimiters);
            nodeTokens.add(nodeWriter.toString());
            ((StringWriter)nodeWriter).getBuffer().setLength(0);
        }
        nodeWriter.write(delimiters.getField());
        if(c840AttendanceAdmissionDetails != null) {
            c840AttendanceAdmissionDetails.write(nodeWriter, delimiters);
            nodeTokens.add(nodeWriter.toString());
            ((StringWriter)nodeWriter).getBuffer().setLength(0);
        }
        nodeWriter.write(delimiters.getField());
        if(c841AttendanceDischargeDetails != null) {
            c841AttendanceDischargeDetails.write(nodeWriter, delimiters);
            nodeTokens.add(nodeWriter.toString());
            ((StringWriter)nodeWriter).getBuffer().setLength(0);
        }
        nodeTokens.add(nodeWriter.toString());
        writer.write(EDIUtils.concatAndTruncate(nodeTokens, DelimiterType.FIELD, delimiters));
        writer.write(delimiters.getSegmentDelimiter());
        writer.flush();
    }

    public String getE9443AttendanceQualifier() {
        return e9443AttendanceQualifier;
    }

    public PASAttendance setE9443AttendanceQualifier(String e9443AttendanceQualifier) {
        this.e9443AttendanceQualifier = e9443AttendanceQualifier;  return this;
    }

    public C839AttendeeCategory getC839AttendeeCategory() {
        return c839AttendeeCategory;
    }

    public PASAttendance setC839AttendeeCategory(C839AttendeeCategory c839AttendeeCategory) {
        this.c839AttendeeCategory = c839AttendeeCategory;  return this;
    }

    public C840AttendanceAdmissionDetails getC840AttendanceAdmissionDetails() {
        return c840AttendanceAdmissionDetails;
    }

    public PASAttendance setC840AttendanceAdmissionDetails(C840AttendanceAdmissionDetails c840AttendanceAdmissionDetails) {
        this.c840AttendanceAdmissionDetails = c840AttendanceAdmissionDetails;  return this;
    }

    public C841AttendanceDischargeDetails getC841AttendanceDischargeDetails() {
        return c841AttendanceDischargeDetails;
    }

    public PASAttendance setC841AttendanceDischargeDetails(C841AttendanceDischargeDetails c841AttendanceDischargeDetails) {
        this.c841AttendanceDischargeDetails = c841AttendanceDischargeDetails;  return this;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy