org.apache.ddlutils.dynabean
Class SqlDynaClass

java.lang.Object
  extended by org.apache.commons.beanutils.BasicDynaClass
      extended by org.apache.ddlutils.dynabean.SqlDynaClass
All Implemented Interfaces:
Serializable, DynaClass

public class SqlDynaClass
extends BasicDynaClass

SqlDynaClass is a DynaClass which is associated with a persistent Table in a Database.

Version:
$Revision: 463757 $
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.apache.commons.beanutils.BasicDynaClass
constructor, constructorTypes, constructorValues, dynaBeanClass, name, properties, propertiesMap
 
Constructor Summary
SqlDynaClass(Table table, SqlDynaProperty[] properties)
          Creates a new dyna class instance for the given table that has the given properties.
 
Method Summary
 SqlDynaProperty[] getNonPrimaryKeyProperties()
          Returns the properties for the non-primary keys of the corresponding table.
 SqlDynaProperty[] getPrimaryKeyProperties()
          Returns the properties for the primary keys of the corresponding table.
 SqlDynaProperty[] getSqlDynaProperties()
          Returns the properties of this dyna class.
 Table getTable()
          Returns the table for which this dyna class is defined.
 String getTableName()
          Returns the table name for which this dyna class is defined.
protected  void initPrimaryKeys()
          Initializes the primary key and non primary key property arrays.
static SqlDynaClass newInstance(Table table)
          Factory method for creating and initializing a new dyna class instance for the given table.
 
Methods inherited from class org.apache.commons.beanutils.BasicDynaClass
getDynaBeanClass, getDynaProperties, getDynaProperty, getName, newInstance, setDynaBeanClass, setProperties
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SqlDynaClass

public SqlDynaClass(Table table,
                    SqlDynaProperty[] properties)
Creates a new dyna class instance for the given table that has the given properties.

Parameters:
table - The table
properties - The dyna properties
Method Detail

newInstance

public static SqlDynaClass newInstance(Table table)
Factory method for creating and initializing a new dyna class instance for the given table.

Parameters:
table - The table
Returns:
The dyna class for the table

getTable

public Table getTable()
Returns the table for which this dyna class is defined.

Returns:
The table

getTableName

public String getTableName()
Returns the table name for which this dyna class is defined.

Returns:
The table name

getSqlDynaProperties

public SqlDynaProperty[] getSqlDynaProperties()
Returns the properties of this dyna class.

Returns:
The properties

getPrimaryKeyProperties

public SqlDynaProperty[] getPrimaryKeyProperties()
Returns the properties for the primary keys of the corresponding table.

Returns:
The properties

getNonPrimaryKeyProperties

public SqlDynaProperty[] getNonPrimaryKeyProperties()
Returns the properties for the non-primary keys of the corresponding table.

Returns:
The properties

initPrimaryKeys

protected void initPrimaryKeys()
Initializes the primary key and non primary key property arrays.



Copyright © 2005-2007 Apache Software Foundation. All Rights Reserved.