/*
 * This class was automatically generated with 
 * <a href="http://www.castor.org">Castor 0.9.4.3</a>, using an XML
 * Schema.
 * $Id$
 */

package nz.co.cks.tms.xml;

  //---------------------------------/
 //- Imported classes and packages -/
//---------------------------------/

import java.io.Reader;
import java.io.Serializable;
import java.io.Writer;
import java.util.Date;
import org.exolab.castor.xml.Marshaller;
import org.exolab.castor.xml.Unmarshaller;
import org.exolab.castor.xml.ValidationException;

/**
 * Class MessageType.
 * 
 * @version $Revision$ $Date$
 */
public abstract class MessageType implements java.io.Serializable {


      //--------------------------/
     //- Class/Member Variables -/
    //--------------------------/

    /**
     * Field _messageId
     */
    private long _messageId;

    /**
     * keeps track of state for field: _messageId
     */
    private boolean _has_messageId;

    /**
     * Field _messageDateTime
     */
    private java.util.Date _messageDateTime;

    /**
     * Field _messageComment
     */
    private java.lang.String _messageComment;

    /**
     * Field _messageAuthBlk
     */
    private nz.co.cks.tms.xml.MessageAuthBlk _messageAuthBlk;

    /**
     * Field _messageTypeChoice
     */
    private nz.co.cks.tms.xml.MessageTypeChoice _messageTypeChoice;


      //----------------/
     //- Constructors -/
    //----------------/

    public MessageType() {
        super();
    } //-- nz.co.cks.tms.xml.MessageType()


      //-----------/
     //- Methods -/
    //-----------/

    /**
     * Method getMessageAuthBlkReturns the value of field
     * 'messageAuthBlk'.
     * 
     * @return the value of field 'messageAuthBlk'.
     */
    public nz.co.cks.tms.xml.MessageAuthBlk getMessageAuthBlk()
    {
        return this._messageAuthBlk;
    } //-- nz.co.cks.tms.xml.MessageAuthBlk getMessageAuthBlk() 

    /**
     * Method getMessageCommentReturns the value of field
     * 'messageComment'.
     * 
     * @return the value of field 'messageComment'.
     */
    public java.lang.String getMessageComment()
    {
        return this._messageComment;
    } //-- java.lang.String getMessageComment() 

    /**
     * Method getMessageDateTimeReturns the value of field
     * 'messageDateTime'.
     * 
     * @return the value of field 'messageDateTime'.
     */
    public java.util.Date getMessageDateTime()
    {
        return this._messageDateTime;
    } //-- java.util.Date getMessageDateTime() 

    /**
     * Method getMessageIdReturns the value of field 'messageId'.
     * 
     * @return the value of field 'messageId'.
     */
    public long getMessageId()
    {
        return this._messageId;
    } //-- long getMessageId() 

    /**
     * Method getMessageTypeChoiceReturns the value of field
     * 'messageTypeChoice'.
     * 
     * @return the value of field 'messageTypeChoice'.
     */
    public nz.co.cks.tms.xml.MessageTypeChoice getMessageTypeChoice()
    {
        return this._messageTypeChoice;
    } //-- nz.co.cks.tms.xml.MessageTypeChoice getMessageTypeChoice() 

    /**
     * Method hasMessageId
     */
    public boolean hasMessageId()
    {
        return this._has_messageId;
    } //-- boolean hasMessageId() 

    /**
     * Method isValid
     */
    public boolean isValid()
    {
        try {
            validate();
        }
        catch (org.exolab.castor.xml.ValidationException vex) {
            return false;
        }
        return true;
    } //-- boolean isValid() 

    /**
     * Method setMessageAuthBlkSets the value of field
     * 'messageAuthBlk'.
     * 
     * @param messageAuthBlk the value of field 'messageAuthBlk'.
     */
    public void setMessageAuthBlk(nz.co.cks.tms.xml.MessageAuthBlk messageAuthBlk)
    {
        this._messageAuthBlk = messageAuthBlk;
    } //-- void setMessageAuthBlk(nz.co.cks.tms.xml.MessageAuthBlk) 

    /**
     * Method setMessageCommentSets the value of field
     * 'messageComment'.
     * 
     * @param messageComment the value of field 'messageComment'.
     */
    public void setMessageComment(java.lang.String messageComment)
    {
        this._messageComment = messageComment;
    } //-- void setMessageComment(java.lang.String) 

    /**
     * Method setMessageDateTimeSets the value of field
     * 'messageDateTime'.
     * 
     * @param messageDateTime the value of field 'messageDateTime'.
     */
    public void setMessageDateTime(java.util.Date messageDateTime)
    {
        this._messageDateTime = messageDateTime;
    } //-- void setMessageDateTime(java.util.Date) 

    /**
     * Method setMessageIdSets the value of field 'messageId'.
     * 
     * @param messageId the value of field 'messageId'.
     */
    public void setMessageId(long messageId)
    {
        this._messageId = messageId;
        this._has_messageId = true;
    } //-- void setMessageId(long) 

    /**
     * Method setMessageTypeChoiceSets the value of field
     * 'messageTypeChoice'.
     * 
     * @param messageTypeChoice the value of field
     * 'messageTypeChoice'.
     */
    public void setMessageTypeChoice(nz.co.cks.tms.xml.MessageTypeChoice messageTypeChoice)
    {
        this._messageTypeChoice = messageTypeChoice;
    } //-- void setMessageTypeChoice(nz.co.cks.tms.xml.MessageTypeChoice) 

    /**
     * Method validate
     */
    public void validate()
        throws org.exolab.castor.xml.ValidationException
    {
        org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
        validator.validate(this);
    } //-- void validate() 

}
