/*
 * 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 java.io.IOException;
import java.io.Reader;
import java.io.Serializable;
import java.io.Writer;
import org.exolab.castor.xml.MarshalException;
import org.exolab.castor.xml.Marshaller;
import org.exolab.castor.xml.Unmarshaller;
import org.exolab.castor.xml.ValidationException;
import org.xml.sax.ContentHandler;

/**
 * Describes cell of the row
 * 
 * @version $Revision$ $Date$
 */
public class Col extends com.queplix.core.utils.jxb.JXBObject 
implements java.io.Serializable
{


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

    /**
     * Name of the field which described by this col
     */
    private java.lang.String _fieldid;

    /**
     * Colspan which should be used for this cell. It equals to 1
     * by default.
     */
    private java.lang.Integer _colspan = new java.lang.Integer("1");

    /**
     * Rowspan which should be used for this cell. It equals to 1
     * by default.
     */
    private java.lang.Integer _rowspan = new java.lang.Integer("1");

    /**
     * Order of the col
     */
    private java.lang.Integer _order;

    /**
     * Order of row which contain this col
     */
    private java.lang.Integer _row;

    /**
     * Name of parent form
     */
    private java.lang.String _form;


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

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


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

    /**
     * Returns the value of field 'colspan'. The field 'colspan'
     * has the following description: Colspan which should be used
     * for this cell. It equals to 1 by default.
     * 
     * @return Integer
     * @return the value of field 'colspan'.
     */
    public java.lang.Integer getColspan()
    {
        return this._colspan;
    } //-- java.lang.Integer getColspan() 

    /**
     * Returns the value of field 'fieldid'. The field 'fieldid'
     * has the following description: Name of the field which
     * described by this col
     * 
     * @return String
     * @return the value of field 'fieldid'.
     */
    public java.lang.String getFieldid()
    {
        return this._fieldid;
    } //-- java.lang.String getFieldid() 

    /**
     * Returns the value of field 'form'. The field 'form' has the
     * following description: Name of parent form
     * 
     * @return String
     * @return the value of field 'form'.
     */
    public java.lang.String getForm()
    {
        return this._form;
    } //-- java.lang.String getForm() 

    /**
     * Returns the value of field 'order'. The field 'order' has
     * the following description: Order of the col
     * 
     * @return Integer
     * @return the value of field 'order'.
     */
    public java.lang.Integer getOrder()
    {
        return this._order;
    } //-- java.lang.Integer getOrder() 

    /**
     * Returns the value of field 'row'. The field 'row' has the
     * following description: Order of row which contain this col
     * 
     * @return Integer
     * @return the value of field 'row'.
     */
    public java.lang.Integer getRow()
    {
        return this._row;
    } //-- java.lang.Integer getRow() 

    /**
     * Returns the value of field 'rowspan'. The field 'rowspan'
     * has the following description: Rowspan which should be used
     * for this cell. It equals to 1 by default.
     * 
     * @return Integer
     * @return the value of field 'rowspan'.
     */
    public java.lang.Integer getRowspan()
    {
        return this._rowspan;
    } //-- java.lang.Integer getRowspan() 

    /**
     * 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 'colspan'. The field 'colspan' has
     * the following description: Colspan which should be used for
     * this cell. It equals to 1 by default.
     * 
     * @param colspan the value of field 'colspan'.
     */
    public void setColspan(java.lang.Integer colspan)
    {
        this._colspan = colspan;
    } //-- void setColspan(java.lang.Integer) 

    /**
     * Sets the value of field 'fieldid'. The field 'fieldid' has
     * the following description: Name of the field which described
     * by this col
     * 
     * @param fieldid the value of field 'fieldid'.
     */
    public void setFieldid(java.lang.String fieldid)
    {
        this._fieldid = fieldid;
    } //-- void setFieldid(java.lang.String) 

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

    /**
     * Sets the value of field 'order'. The field 'order' has the
     * following description: Order of the col
     * 
     * @param order the value of field 'order'.
     */
    public void setOrder(java.lang.Integer order)
    {
        this._order = order;
    } //-- void setOrder(java.lang.Integer) 

    /**
     * Sets the value of field 'row'. The field 'row' has the
     * following description: Order of row which contain this col
     * 
     * @param row the value of field 'row'.
     */
    public void setRow(java.lang.Integer row)
    {
        this._row = row;
    } //-- void setRow(java.lang.Integer) 

    /**
     * Sets the value of field 'rowspan'. The field 'rowspan' has
     * the following description: Rowspan which should be used for
     * this cell. It equals to 1 by default.
     * 
     * @param rowspan the value of field 'rowspan'.
     */
    public void setRowspan(java.lang.Integer rowspan)
    {
        this._rowspan = rowspan;
    } //-- void setRowspan(java.lang.Integer) 

    /**
     * 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.Col) Unmarshaller.unmarshal(com.queplix.core.modules.config.jxb.Col.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() 

}
