ColumnMap is used to model a column of a table in a database.
Note that this information should be set via the
MapBuilder class and
not changed by applications. The set methods are only public because this
class needs them.
author: John D. McNally author: Greg Monroe version: $Id: ColumnMap.java 473821 2006-11-11 22:37:25Z tv $
Get the inheritance map with the specified key.
Parameters: key - the key of the inheritance map. the inheritance map with the specified key, or null if noinheritance map with the specified key exists in this column.
Gets the scale set for this column (if any) as set in the XML database
definition. E.g., the value of the scale attribute or the scale portion
of a size="P,S" attribute. (Note: size="P,S" format is being
deprecated!).
Returns the scale.
The "precision" value from the XML
size="<precision>[,<scale>]"
attribute. Where [,<scale>] is optional.
If the size attribute has not been set in the XML, it will return 0.
Note that the size="P,S" format should be replaced with size="P"
scale="S".
An int specifying the size.
Returns whether getters and setters are generated with the
access modifier "protected" rather than "public".
whether the accessors should be protected rather than public.
Makes sure that the column names don't include table prefixes. E.g.,
SCARAB_PROJECT.PROJECT_ID should be PROJECT_ID.
Parameters: name - The name to check The corrected name if needed or the same name if not.
setAutoIncrement
public void setAutoIncrement(boolean autoIncrement)(Code)
Sets whether this column is an autoincrement column.
Parameters: autoIncrement - whether this colimn is an autoincrement column.
Set the foreign key for this column.
Parameters: tableName - The name of the table that is foreign. Parameters: columnName - The name of the column that is foreign.
setInheritance
public void setInheritance(String inheritanceType)(Code)
Sets the inheritance type.
Parameters: inheritanceType - The inheritance type to set.
setInputValidator
public void setInputValidator(String inputValidator)(Code)
Sets the input validator class name.
Parameters: inputValidator - The inputValidator to set.
Set if this column is a primary key or not.
Parameters: pk - True if column is a primary key.
setProtected
public void setProtected(boolean isProtected)(Code)
Sets whether getters and setters should be generated with the
access modifier "protected" rather than "public".
Parameters: isProtected - whether getters and setters for this columnare protected.