/*
 * 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.jxb.entity;

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

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

/**
 * The dataset descriptor type
 *
 * @version $Revision$ $Date$
 */
public class DatasetType extends com.queplix.core.utils.jxb.JXBObject
        implements java.io.Serializable {

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

    /**
     * The name of field
     */
    private java.lang.String _name;

    /**
     * Name of the external entity
     */
    private java.lang.String _entity;

    /**
     * Name of the dataschema
     */
    private java.lang.String _refname;

    /**
     * Required dataset or not
     */
    private java.lang.Boolean _required;

    /**
     * Return values on request or not
     */
    private java.lang.Boolean _sendonrequest = new java.lang.Boolean("false");

    /**
     * The type of filed control
     */
    private com.queplix.core.jxb.entity.types.ControlSType _control;

    /**
     * Can you change the field
     */
    private java.lang.Boolean _readonly = new java.lang.Boolean("false");

    /**
     * Can you search by values of the dataset
     */
    private java.lang.Boolean _searchable = new java.lang.Boolean("true");

    /**
     * This attribute shows that this dataset be included to report
     */
    private java.lang.Boolean _includeToReport = new java.lang.Boolean("true");

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

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

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

    /**
     * This attribute describes, how the list of options was
     * loaded. If this attribute is true dataset should make call
     * to
     * server each time it needed, otherwise it will be loaded at
     * once per session.
     */
    private java.lang.Boolean _dynamic = new java.lang.Boolean("false");

    /**
     * Field _clear
     */
    private java.lang.Boolean _clear = new java.lang.Boolean("false");

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

    /**
     * The reference to dataschema description
     */
    private com.queplix.core.jxb.entity.Dataschema _dataschema;

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

    public DatasetType() {
        super();
    } //-- com.queplix.core.jxb.entity.DatasetType()

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

    /**
     * Returns the value of field 'clear'.
     *
     * @return the value of field 'clear'.
     */
    public java.lang.Boolean getClear() {
        return this._clear;
    } //-- java.lang.Boolean getClear() 

    /**
     * Returns the value of field 'control'. The field 'control'
     * has the following description: The type of filed control
     *
     * @return the value of field 'control'.
     */
    public com.queplix.core.jxb.entity.types.ControlSType getControl() {
        return this._control;
    } //-- com.queplix.core.jxb.entity.types.ControlSType getControl() 

    /**
     * Returns the value of field 'dataschema'. The field
     * 'dataschema' has the following description: The reference to
     * dataschema description
     *
     * @return the value of field 'dataschema'.
     */
    public com.queplix.core.jxb.entity.Dataschema getDataschema() {
        return this._dataschema;
    } //-- com.queplix.core.jxb.entity.Dataschema getDataschema() 

    /**
     * Returns the value of field 'dynamic'. The field 'dynamic'
     * has the following description: This attribute describes, how
     * the list of options was loaded. If this attribute is true
     * dataset should make call to
     * server each time it needed, otherwise it will be loaded at
     * once per session.
     *
     * @return the value of field 'dynamic'.
     */
    public java.lang.Boolean getDynamic() {
        return this._dynamic;
    } //-- java.lang.Boolean getDynamic() 

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

    /**
     * Returns the value of field 'entityName'.
     *
     * @return the value of field 'entityName'.
     */
    public java.lang.String getEntityName() {
        return this._entityName;
    } //-- java.lang.String getEntityName() 

    /**
     * Returns the value of field 'eql'.
     *
     * @return the value of field 'eql'.
     */
    public java.lang.String getEql() {
        return this._eql;
    } //-- java.lang.String getEql() 

    /**
     * Returns the value of field 'id'.
     *
     * @return the value of field 'id'.
     */
    public java.lang.String getId() {
        return this._id;
    } //-- java.lang.String getId() 

    /**
     * Returns the value of field 'includeToReport'. The field
     * 'includeToReport' has the following description: This
     * attribute shows that this dataset be included to report
     *
     * @return the value of field 'includeToReport'.
     */
    public java.lang.Boolean getIncludeToReport() {
        return this._includeToReport;
    } //-- java.lang.Boolean getIncludeToReport() 

    /**
     * Returns the value of field 'linkedEntity'.
     *
     * @return the value of field 'linkedEntity'.
     */
    public java.lang.String getLinkedEntity() {
        return this._linkedEntity;
    } //-- java.lang.String getLinkedEntity() 

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

    /**
     * Returns the value of field 'readonly'. The field 'readonly'
     * has the following description: Can you change the field
     *
     * @return the value of field 'readonly'.
     */
    public java.lang.Boolean getReadonly() {
        return this._readonly;
    } //-- java.lang.Boolean getReadonly() 

    /**
     * Returns the value of field 'refname'. The field 'refname'
     * has the following description: Name of the dataschema
     *
     * @return the value of field 'refname'.
     */
    public java.lang.String getRefname() {
        return this._refname;
    } //-- java.lang.String getRefname() 

    /**
     * Returns the value of field 'required'. The field 'required'
     * has the following description: Required dataset or not
     *
     * @return the value of field 'required'.
     */
    public java.lang.Boolean getRequired() {
        return this._required;
    } //-- java.lang.Boolean getRequired() 

    /**
     * Returns the value of field 'searchable'. The field
     * 'searchable' has the following description: Can you search
     * by values of the dataset
     *
     * @return the value of field 'searchable'.
     */
    public java.lang.Boolean getSearchable() {
        return this._searchable;
    } //-- java.lang.Boolean getSearchable() 

    /**
     * Returns the value of field 'sendonrequest'. The field
     * 'sendonrequest' has the following description: Return values
     * on request or not
     *
     * @return the value of field 'sendonrequest'.
     */
    public java.lang.Boolean getSendonrequest() {
        return this._sendonrequest;
    } //-- java.lang.Boolean getSendonrequest() 

    /**
     * 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 'clear'.
     *
     * @param clear the value of field 'clear'.
     */
    public void setClear(java.lang.Boolean clear) {
        this._clear = clear;
    } //-- void setClear(java.lang.Boolean) 

    /**
     * Sets the value of field 'control'. The field 'control' has
     * the following description: The type of filed control
     *
     * @param control the value of field 'control'.
     */
    public void setControl(
            com.queplix.core.jxb.entity.types.ControlSType control) {
        this._control = control;
    } //-- void setControl(com.queplix.core.jxb.entity.types.ControlSType) 

    /**
     * Sets the value of field 'dataschema'. The field 'dataschema'
     * has the following description: The reference to dataschema
     * description
     *
     * @param dataschema the value of field 'dataschema'.
     */
    public void setDataschema(
            com.queplix.core.jxb.entity.Dataschema dataschema) {
        this._dataschema = dataschema;
    } //-- void setDataschema(com.queplix.core.jxb.entity.Dataschema) 

    /**
     * Sets the value of field 'dynamic'. The field 'dynamic' has
     * the following description: This attribute describes, how the
     * list of options was loaded. If this attribute is true
     * dataset should make call to
     * server each time it needed, otherwise it will be loaded at
     * once per session.
     *
     * @param dynamic the value of field 'dynamic'.
     */
    public void setDynamic(java.lang.Boolean dynamic) {
        this._dynamic = dynamic;
    } //-- void setDynamic(java.lang.Boolean) 

    /**
     * Sets the value of field 'entity'. The field 'entity' has the
     * following description: Name of the external entity
     *
     * @param entity the value of field 'entity'.
     */
    public void setEntity(java.lang.String entity) {
        this._entity = entity;
    } //-- void setForm(java.lang.String)

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

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

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

    /**
     * Sets the value of field 'includeToReport'. The field
     * 'includeToReport' has the following description: This
     * attribute shows that this dataset be included to report
     *
     * @param includeToReport the value of field 'includeToReport'.
     */
    public void setIncludeToReport(java.lang.Boolean includeToReport) {
        this._includeToReport = includeToReport;
    } //-- void setIncludeToReport(java.lang.Boolean) 

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

    /**
     * Sets the value of field 'name'. The field 'name' has the
     * following description: The name of field
     *
     * @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 'readonly'. The field 'readonly' has
     * the following description: Can you change the field
     *
     * @param readonly the value of field 'readonly'.
     */
    public void setReadonly(java.lang.Boolean readonly) {
        this._readonly = readonly;
    } //-- void setReadonly(java.lang.Boolean) 

    /**
     * Sets the value of field 'refname'. The field 'refname' has
     * the following description: Name of the dataschema
     *
     * @param refname the value of field 'refname'.
     */
    public void setRefname(java.lang.String refname) {
        this._refname = refname;
    } //-- void setRefname(java.lang.String) 

    /**
     * Sets the value of field 'required'. The field 'required' has
     * the following description: Required dataset or not
     *
     * @param required the value of field 'required'.
     */
    public void setRequired(java.lang.Boolean required) {
        this._required = required;
    } //-- void setRequired(java.lang.Boolean) 

    /**
     * Sets the value of field 'searchable'. The field 'searchable'
     * has the following description: Can you search by values of
     * the dataset
     *
     * @param searchable the value of field 'searchable'.
     */
    public void setSearchable(java.lang.Boolean searchable) {
        this._searchable = searchable;
    } //-- void setSearchable(java.lang.Boolean) 

    /**
     * Sets the value of field 'sendonrequest'. The field
     * 'sendonrequest' has the following description: Return values
     * on request or not
     *
     * @param sendonrequest the value of field 'sendonrequest'.
     */
    public void setSendonrequest(java.lang.Boolean sendonrequest) {
        this._sendonrequest = sendonrequest;
    } //-- void setSendonrequest(java.lang.Boolean) 

    /**
     * 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.jxb.entity.DatasetType) Unmarshaller.unmarshal(
                com.queplix.core.jxb.entity.DatasetType.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() 

}
