|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.torque.ColumnImpl
public class ColumnImpl
An implementation of the column interface. This class is immutable, i.e cannot be changed once constructed.
Constructor Summary | |
---|---|
ColumnImpl(String sqlExpression)
Constructor which tries to guess schema, table and column names from an SQL expression. |
|
ColumnImpl(String tableName,
String columnName)
Constructor. |
|
ColumnImpl(String schemaName,
String tableName,
String columnName)
Constructor. |
|
ColumnImpl(String schemaName,
String tableName,
String columnName,
String sqlExpression)
Constructor. |
Method Summary | |
---|---|
boolean |
equals(Object obj)
|
String |
getColumnName()
Returns the column name. |
String |
getFullTableName()
Returns the table name prefixed with the schema name if it exists. |
String |
getSchemaName()
Returns the name of any fixed schema prefix for the column's table (if any). |
String |
getSqlExpression()
Returns the SQL expression for the column, qualified by the table name but not by the schema name. |
String |
getTableName()
Returns the table name. |
int |
hashCode()
|
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ColumnImpl(String tableName, String columnName)
tableName
- the table name, not null or blank.columnName
- the column name, not null or blank.
NullPointerException
- if columnName or tableName are null.
IllegalArgumentException
- if columnName or tableName are blank.public ColumnImpl(String schemaName, String tableName, String columnName)
schemaName
- the schema name, may be null but not blank.tableName
- the table name, may be null but not blank.
If it contains a dot, then only the portion after the dot
will be taken as table name.
If it contains a dot and schemaName is null, then the schema
name will be set as the portion before the dot.columnName
- the column name, not null or blank.
NullPointerException
- if columnName or tableName are null.
IllegalArgumentException
- if columnName or tableName are blank.public ColumnImpl(String schemaName, String tableName, String columnName, String sqlExpression)
schemaName
- the schema name, may be null but not blank.tableName
- the table name, may be null but not blank.
If it contains a dot, then only the portion after the dot
will be taken as table name.
If it contains a dot and schemaName is null, then the schema
name will be set as the portion before the dot.columnName
- the column name, may be null but not blank.sqlExpression
- the SQL expression for the column,
not null or blank.
NullPointerException
- if tableName or sqlExpression are null.
IllegalArgumentException
- if tableName or sqlExpression are blank.public ColumnImpl(String sqlExpression)
sqlExpression
- the SQL expression, not null, not blank.
NullPointerException
- if sqlExpression is null.
IllegalArgumentException
- if table or column name cannot be
guessed from sqlExpression.Method Detail |
---|
public String getColumnName()
getColumnName
in interface Column
public String getTableName()
getTableName
in interface Column
public String getFullTableName()
getFullTableName
in interface Column
public String getSchemaName()
getSchemaName
in interface Column
public String getSqlExpression()
getSqlExpression
in interface Column
public int hashCode()
hashCode
in class Object
public boolean equals(Object obj)
equals
in class Object
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |