|
|||||||||||
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.
Field Summary | |
private java.lang.String |
columnName
The name of the column. |
private boolean |
notNull
Is null value allowed ? |
private boolean |
pk
Is it a primary key? |
private java.lang.String |
relatedColumnName
Name of the column that this column is related to. |
private java.lang.String |
relatedTableName
Name of the table that this column is related to. |
private int |
size
Size of the column. |
private TableMap |
table
The TableMap for this column. |
private java.lang.Object |
type
Type of the column. |
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 |
getSize()
Get the size of this column. |
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 |
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 |
Field Detail |
private java.lang.Object type
private int size
private boolean pk
private boolean notNull
private java.lang.String relatedTableName
private java.lang.String relatedColumnName
private TableMap table
private java.lang.String columnName
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()
public boolean isPrimaryKey()
public boolean isNotNull()
public boolean isForeignKey()
public java.lang.String getRelatedName()
public java.lang.String getRelatedTableName()
public java.lang.String getRelatedColumnName()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |