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

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

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

/**
 * The entity field customization description
 *
 * @version $Revision$ $Date$
 */
public class CustomField extends com.queplix.core.utils.jxb.JXBObject
        implements java.io.Serializable {

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

    /**
     * The name of efield
     */
    private java.lang.String _efield;

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

    /**
     * The sequence of captions
     */
    private com.queplix.core.modules.config.jxb.Captions _captions;

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

    public CustomField() {
        super();
    } //-- com.queplix.core.modules.config.jxb.CustomField()

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

    /**
     * Returns the value of field 'caption'.
     *
     * @return the value of field 'caption'.
     */
    public java.lang.String getCaption() {
        return this._caption;
    } //-- java.lang.String getCaption() 

    /**
     * Returns the value of field 'captions'. The field 'captions'
     * has the following description: The sequence of captions
     *
     * @return the value of field 'captions'.
     */
    public com.queplix.core.modules.config.jxb.Captions getCaptions() {
        return this._captions;
    } //-- com.queplix.core.modules.config.jxb.Captions getCaptions() 

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

    /**
     * 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 'caption'.
     *
     * @param caption the value of field 'caption'.
     */
    public void setCaption(java.lang.String caption) {
        this._caption = caption;
    } //-- void setCaption(java.lang.String) 

    /**
     * Sets the value of field 'captions'. The field 'captions' has
     * the following description: The sequence of captions
     *
     * @param captions the value of field 'captions'.
     */
    public void setCaptions(
            com.queplix.core.modules.config.jxb.Captions captions) {
        this._captions = captions;
    } //-- void setCaptions(com.queplix.core.modules.config.jxb.Captions) 

    /**
     * Sets the value of field 'efield'. The field 'efield' has the
     * following description: The name of efield
     *
     * @param efield the value of field 'efield'.
     */
    public void setEfield(java.lang.String efield) {
        this._efield = efield;
    } //-- void setEfield(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.config.jxb.CustomField) Unmarshaller
                .unmarshal(
                        com.queplix.core.modules.config.jxb.CustomField.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() 

}
