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

package com.queplix.core.modules.eqlext.jxb.gr;

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

import org.exolab.castor.xml.Marshaller;
import org.exolab.castor.xml.Unmarshaller;

/**
 * Class ReqEntity.
 *
 * @version $Revision$ $Date$
 */
public class ReqEntity extends com.queplix.core.utils.jxb.JXBObject
        implements java.io.Serializable {

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

    /**
     * The entity name
     */
    private java.lang.String _name;

    /**
     * Treat as request on new record
     */
    private java.lang.Boolean _new = new java.lang.Boolean("false");

    /**
     * Sort field name
     */
    private java.lang.String _sortfield;

    /**
     * Sort direction
     */
    private com.queplix.core.modules.eqlext.jxb.gr.types.OrderDirectionSType _sortdir
            = com.queplix.core.modules.eqlext.jxb.gr.types.OrderDirectionSType
            .valueOf("asc");

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

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

    public ReqEntity() {
        super();
        setSortdir(
                com.queplix.core.modules.eqlext.jxb.gr.types.OrderDirectionSType.valueOf(
                        "asc"));
    } //-- com.queplix.core.modules.eqlext.jxb.gr.ReqEntity()

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

    /**
     * Returns the value of field 'formid'.
     *
     * @return the value of field 'formid'.
     */
    public java.lang.String getFormid() {
        return this._formid;
    } //-- java.lang.String getFormid() 

    /**
     * Returns the value of field 'name'. The field 'name' has the
     * following description: The entity name
     *
     * @return the value of field 'name'.
     */
    public java.lang.String getName() {
        return this._name;
    } //-- java.lang.String getName() 

    /**
     * Returns the value of field 'new'. The field 'new' has the
     * following description: Treat as request on new record
     *
     * @return the value of field 'new'.
     */
    public java.lang.Boolean getNew() {
        return this._new;
    } //-- java.lang.Boolean getNew() 

    /**
     * Returns the value of field 'sortdir'. The field 'sortdir'
     * has the following description: Sort direction
     *
     * @return the value of field 'sortdir'.
     */
    public com.queplix.core.modules.eqlext.jxb.gr.types.OrderDirectionSType getSortdir() {
        return this._sortdir;
    } //-- com.queplix.core.modules.eqlext.jxb.gr.types.OrderDirectionSType getSortdir() 

    /**
     * Returns the value of field 'sortfield'. The field
     * 'sortfield' has the following description: Sort field name
     *
     * @return the value of field 'sortfield'.
     */
    public java.lang.String getSortfield() {
        return this._sortfield;
    } //-- java.lang.String getSortfield() 

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

    /**
     * Method marshal
     *
     * @param out
     */
    public void marshal(java.io.Writer out)
            throws org.exolab.castor.xml.MarshalException,
            org.exolab.castor.xml.ValidationException {

        Marshaller.marshal(this, out);
    } //-- void marshal(java.io.Writer) 

    /**
     * Method marshal
     *
     * @param handler
     */
    public void marshal(org.xml.sax.ContentHandler handler)
            throws java.io.IOException, org.exolab.castor.xml.MarshalException,
            org.exolab.castor.xml.ValidationException {

        Marshaller.marshal(this, handler);
    } //-- void marshal(org.xml.sax.ContentHandler) 

    /**
     * Sets the value of field 'formid'.
     *
     * @param formid the value of field 'formid'.
     */
    public void setFormid(java.lang.String formid) {
        this._formid = formid;
    } //-- void setFormid(java.lang.String) 

    /**
     * Sets the value of field 'name'. The field 'name' has the
     * following description: The entity name
     *
     * @param name the value of field 'name'.
     */
    public void setName(java.lang.String name) {
        this._name = name;
    } //-- void setName(java.lang.String) 

    /**
     * Sets the value of field 'new'. The field 'new' has the
     * following description: Treat as request on new record
     *
     * @param _new
     * @param new  the value of field 'new'.
     */
    public void setNew(java.lang.Boolean _new) {
        this._new = _new;
    } //-- void setNew(java.lang.Boolean) 

    /**
     * Sets the value of field 'sortdir'. The field 'sortdir' has
     * the following description: Sort direction
     *
     * @param sortdir the value of field 'sortdir'.
     */
    public void setSortdir(
            com.queplix.core.modules.eqlext.jxb.gr.types.OrderDirectionSType sortdir) {
        this._sortdir = sortdir;
    } //-- void setSortdir(com.queplix.core.modules.eqlext.jxb.gr.types.OrderDirectionSType) 

    /**
     * Sets the value of field 'sortfield'. The field 'sortfield'
     * has the following description: Sort field name
     *
     * @param sortfield the value of field 'sortfield'.
     */
    public void setSortfield(java.lang.String sortfield) {
        this._sortfield = sortfield;
    } //-- void setSortfield(java.lang.String) 

    /**
     * Method unmarshal
     *
     * @param reader
     * @return Object
     */
    public static java.lang.Object unmarshal(java.io.Reader reader)
            throws org.exolab.castor.xml.MarshalException,
            org.exolab.castor.xml.ValidationException {
        return (com.queplix.core.modules.eqlext.jxb.gr.ReqEntity) Unmarshaller
                .unmarshal(
                        com.queplix.core.modules.eqlext.jxb.gr.ReqEntity.class,
                        reader);
    } //-- java.lang.Object unmarshal(java.io.Reader) 

    /**
     * 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() 

}
