/*
 * 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 foreign table dependence descriptor. Auto-generated by
 * system.
 *
 * @version $Revision$ $Date$
 */
public class Fkeys extends com.queplix.core.utils.jxb.JXBObject
        implements java.io.Serializable {

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

    /**
     * The foreign entity name
     */
    private java.lang.String _fkEntity;

    /**
     * The foreign table name
     */
    private java.lang.String _fkTable;

    /**
     * The foreign column name
     */
    private java.lang.String _fkColumn;

    /**
     * The primary key name of foreign table
     */
    private java.lang.String _pkColumn;

    /**
     * Is cascade deletion allowed
     */
    private java.lang.Boolean _cascadeDelete = new java.lang.Boolean("false");

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

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

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

    /**
     * Returns the value of field 'cascadeDelete'. The field
     * 'cascadeDelete' has the following description: Is cascade
     * deletion allowed
     *
     * @return the value of field 'cascadeDelete'.
     */
    public java.lang.Boolean getCascadeDelete() {
        return this._cascadeDelete;
    } //-- java.lang.Boolean getCascadeDelete() 

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

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

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

    /**
     * Returns the value of field 'pkColumn'. The field 'pkColumn'
     * has the following description: The primary key name of
     * foreign table
     *
     * @return the value of field 'pkColumn'.
     */
    public java.lang.String getPkColumn() {
        return this._pkColumn;
    } //-- java.lang.String getPkColumn() 

    /**
     * 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 'cascadeDelete'. The field
     * 'cascadeDelete' has the following description: Is cascade
     * deletion allowed
     *
     * @param cascadeDelete the value of field 'cascadeDelete'.
     */
    public void setCascadeDelete(java.lang.Boolean cascadeDelete) {
        this._cascadeDelete = cascadeDelete;
    } //-- void setCascadeDelete(java.lang.Boolean) 

    /**
     * Sets the value of field 'fkColumn'. The field 'fkColumn' has
     * the following description: The foreign column name
     *
     * @param fkColumn the value of field 'fkColumn'.
     */
    public void setFkColumn(java.lang.String fkColumn) {
        this._fkColumn = fkColumn;
    } //-- void setFkColumn(java.lang.String) 

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

    /**
     * Sets the value of field 'fkTable'. The field 'fkTable' has
     * the following description: The foreign table name
     *
     * @param fkTable the value of field 'fkTable'.
     */
    public void setFkTable(java.lang.String fkTable) {
        this._fkTable = fkTable;
    } //-- void setFkTable(java.lang.String) 

    /**
     * Sets the value of field 'pkColumn'. The field 'pkColumn' has
     * the following description: The primary key name of foreign
     * table
     *
     * @param pkColumn the value of field 'pkColumn'.
     */
    public void setPkColumn(java.lang.String pkColumn) {
        this._pkColumn = pkColumn;
    } //-- void setPkColumn(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.Fkeys) Unmarshaller.unmarshal(
                com.queplix.core.jxb.entity.Fkeys.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() 

}
