/*
 * 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 reference to entity list-field for lookup and select
 * controls
 *
 * @version $Revision$ $Date$
 */
public class Listref extends com.queplix.core.utils.jxb.JXBObject
        implements java.io.Serializable {

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

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

    /**
     * The entity field name
     */
    private java.lang.String _efield;

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

    /**
     * Field _jointype
     */
    private com.queplix.core.jxb.entity.types.JoinSType _jointype = com.queplix
            .core.jxb.entity.types.JoinSType.valueOf("default");

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

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

    public Listref() {
        super();
        setJointype(com.queplix.core.jxb.entity.types.JoinSType.valueOf(
                "default"));
    } //-- com.queplix.core.jxb.entity.Listref()

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

    /**
     * Returns the value of field 'dataschema'. The field
     * 'dataschema' has the following description: The reference to
     * dataschema
     *
     * @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 'efield'. The field 'efield' has
     * the following description: The entity field name
     *
     * @return the value of field 'efield'.
     */
    public java.lang.String getEfield() {
        return this._efield;
    } //-- java.lang.String getEfield() 

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

    /**
     * Returns the value of field 'jointype'.
     *
     * @return the value of field 'jointype'.
     */
    public com.queplix.core.jxb.entity.types.JoinSType getJointype() {
        return this._jointype;
    } //-- com.queplix.core.jxb.entity.types.JoinSType getJointype() 

    /**
     * Returns the value of field 'refname'.
     *
     * @return the value of field 'refname'.
     */
    public java.lang.String getRefname() {
        return this._refname;
    } //-- java.lang.String getRefname() 

    /**
     * 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 'dataschema'. The field 'dataschema'
     * has the following description: The reference to dataschema
     *
     * @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 'efield'. The field 'efield' has the
     * following description: The entity field name
     *
     * @param efield the value of field 'efield'.
     */
    public void setEfield(java.lang.String efield) {
        this._efield = efield;
    } //-- void setEfield(java.lang.String) 

    /**
     * Sets the value of field 'entity'. The field 'entity' has the
     * following description: The entity name
     *
     * @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 'jointype'.
     *
     * @param jointype the value of field 'jointype'.
     */
    public void setJointype(
            com.queplix.core.jxb.entity.types.JoinSType jointype) {
        this._jointype = jointype;
    } //-- void setJointype(com.queplix.core.jxb.entity.types.JoinSType) 

    /**
     * Sets the value of field 'refname'.
     *
     * @param refname the value of field 'refname'.
     */
    public void setRefname(java.lang.String refname) {
        this._refname = refname;
    } //-- void setRefname(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.jxb.entity.Listref) Unmarshaller.unmarshal(
                com.queplix.core.jxb.entity.Listref.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() 

}
