|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.torque.map.ColumnMap
ColumnMap is used to model a column of a table in a database.
Constructor Summary | |
ColumnMap(java.lang.String name,
TableMap containingTable)
Constructor. |
Method Summary | |
java.lang.String |
getColumnName()
Get the name of a column. |
java.lang.String |
getFullyQualifiedName()
Get the table name + column name. |
java.lang.String |
getRelatedColumnName()
Get the column name that this column is related to. |
java.lang.String |
getRelatedName()
Get the table.column that this column is related to. |
java.lang.String |
getRelatedTableName()
Get the table name that this column is related to. |
int |
getScale()
Gets the scale set for this column (if any) as set in the XML database definition. |
int |
getSize()
The "precision" value from the XML size="<precision>[,<scale>]" attribute. |
java.lang.String |
getTableName()
Get the name of the table this column is in. |
java.lang.Object |
getType()
Get the type of this column. |
boolean |
isForeignKey()
Is this column a foreign key? |
boolean |
isNotNull()
Is null value allowed ? |
boolean |
isPrimaryKey()
Is this column a primary key? |
void |
setForeignKey(java.lang.String fullyQualifiedName)
Set the foreign key for this column. |
void |
setForeignKey(java.lang.String tableName,
java.lang.String columnName)
Set the foreign key for this column. |
void |
setNotNull(boolean nn)
Set if this column may be null. |
void |
setPrimaryKey(boolean pk)
Set if this column is a primary key or not. |
void |
setScale(int scale)
|
void |
setSize(int size)
Set the size of this column. |
void |
setType(java.lang.Object type)
Set the type of this column. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public ColumnMap(java.lang.String name, TableMap containingTable)
name
- The name of the column.containingTable
- TableMap of the table this column is in.Method Detail |
public java.lang.String getColumnName()
public java.lang.String getFullyQualifiedName()
public java.lang.String getTableName()
public void setType(java.lang.Object type)
type
- An Object specifying the type.public void setSize(int size)
size
- An int specifying the size.public void setPrimaryKey(boolean pk)
pk
- True if column is a primary key.public void setNotNull(boolean nn)
nn
- True if column may be null.public void setForeignKey(java.lang.String fullyQualifiedName)
fullyQualifiedName
- The name of the table.column that is
foreign.public void setForeignKey(java.lang.String tableName, java.lang.String columnName)
tableName
- The name of the table that is foreign.columnName
- The name of the column that is foreign.public java.lang.Object getType()
public int getSize()
Note that the size="P,S" format should be replaced with size="P" scale="S".
public boolean isPrimaryKey()
public boolean isNotNull()
public boolean isForeignKey()
public java.lang.String getRelatedName()
public java.lang.String getRelatedTableName()
public java.lang.String getRelatedColumnName()
public int getScale()
public void setScale(int scale)
scale
- The scale to set.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |