|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectwt.query.TableColumn
This class represents a table column which can be used in a SQL statement.
The exact table and column name specified are used directly in the SQL
statement. This class should generally be used when specifying a column
that is associated with an ExternalTableExpression that has been added
to a query or for a column on a FROM expression with a known table alias.
Using this class with some TableExpression implementations, such as
ClassTableExpression, can result in invalid SQL since the actual table
name can vary for descendant classes.
Supported API: true
Extendable: false
ExternalTableExpression
,
Serialized FormField Summary | |
private boolean |
advancedQueryEnabled
|
private static String |
CLASSNAME
|
private String |
columnAlias
|
private String |
columnName
|
static long |
EXTERNALIZATION_VERSION_UID
|
private Class |
javaType
|
protected static long |
OLD_FORMAT_VERSION_UID
|
private static String |
RESOURCE
|
(package private) static long |
serialVersionUID
|
private String |
tableName
|
Fields inherited from interface wt.query.ColumnExpression |
ADVANCED_QUERY, ADVANCED_QUERY_ENABLED, COLUMN_ALIAS, JAVA_TYPE |
Fields inherited from interface wt.query.Expression |
FROM_COUNT |
Fields inherited from interface wt.query.RelationalExpression |
BIND_PARAMETER |
Constructor Summary | |
TableColumn()
Supported API: false |
|
TableColumn(String a_tableName,
String a_columnName)
Supported API: true |
Method Summary | |
Object |
getBindParameter()
Gets the value of the attribute: bindParameter; Returns a bind parameter for this expression (if supported). |
List |
getClassAttributes()
Supported API: false |
String |
getColumnAlias()
Gets the value of the attribute: columnAlias; Alias for the column expression. |
String |
getColumnName()
Gets the value of the attribute: columnName; Column name in the external table. |
String |
getExpression(boolean a_useBind,
Vector a_tableInfos,
Vector a_aliases,
boolean a_outerJoin)
Return string representation of this expression. |
int |
getFromCount()
Gets the value of the attribute: fromCount; Number of from index values that this expression requires Supported API: false |
Class |
getJavaType()
Gets the value of the attribute: javaType; The java type of this expression. |
String |
getTableName()
Gets the value of the attribute: tableName; External table name. |
boolean |
isAdvancedQuery()
Gets the value of the attribute: advancedQuery; Indicates if the expression uses advanced query capabilities. |
boolean |
isAdvancedQueryEnabled()
Gets the value of the attribute: advancedQueryEnabled; Indicates if advanced query capabilities are enabled. |
void |
readExternal(ObjectInput input)
Reads the non-transient fields of this class from an external source. |
private boolean |
readOldVersion(ObjectInput input,
long readSerialVersionUID,
boolean passThrough,
boolean superDone)
Reads the non-transient fields of this class from an external source, which is not the current version. |
protected boolean |
readVersion(TableColumn thisObject,
ObjectInput input,
long readSerialVersionUID,
boolean passThrough,
boolean superDone)
Reads the non-transient fields of this class from an external source. |
void |
setAdvancedQueryEnabled(boolean a_AdvancedQueryEnabled)
Sets the value of the attribute: advancedQueryEnabled; Indicates if advanced query capabilities are enabled. |
void |
setColumnAlias(String a_ColumnAlias)
Sets the value of the attribute: columnAlias; Alias for the column expression. |
void |
setColumnName(String a_ColumnName)
Sets the value of the attribute: columnName; Column name in the external table. |
int |
setFromAlias(String[] a_aliases,
int a_offset)
This method sets the FROM clause alias for this expression. |
void |
setJavaType(Class a_JavaType)
Sets the value of the attribute: javaType; The java type of this expression. |
void |
setTableName(String a_TableName)
Sets the value of the attribute: tableName; External table name. |
String |
toString()
|
int |
validate(TableExpression[] a_tableExpressions,
int a_offset)
This method validates this expression against the specified table expression. |
void |
writeExternal(ObjectOutput output)
Writes the non-transient fields of this class to an external source. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
private static final String RESOURCE
private static final String CLASSNAME
private String tableName
private String columnName
private Class javaType
private String columnAlias
private transient boolean advancedQueryEnabled
static final long serialVersionUID
public static final long EXTERNALIZATION_VERSION_UID
protected static final long OLD_FORMAT_VERSION_UID
Constructor Detail |
public TableColumn()
public TableColumn(String a_tableName, String a_columnName)
a_tableName
- Name of the database table.a_columnName
- Name of the database column.Method Detail |
public void writeExternal(ObjectOutput output) throws IOException
writeExternal
in interface Externalizable
output
-
IOException
public void readExternal(ObjectInput input) throws IOException, ClassNotFoundException
readExternal
in interface Externalizable
input
-
IOException
ClassNotFoundException
protected boolean readVersion(TableColumn thisObject, ObjectInput input, long readSerialVersionUID, boolean passThrough, boolean superDone) throws IOException, ClassNotFoundException
thisObject
- input
- readSerialVersionUID
- passThrough
- superDone
-
IOException
ClassNotFoundException
private boolean readOldVersion(ObjectInput input, long readSerialVersionUID, boolean passThrough, boolean superDone) throws IOException, ClassNotFoundException
input
- readSerialVersionUID
- passThrough
- superDone
-
IOException
ClassNotFoundException
public String getTableName()
public void setTableName(String a_TableName) throws WTPropertyVetoException
a_TableName
-
WTPropertyVetoException
public String getColumnName()
public void setColumnName(String a_ColumnName) throws WTPropertyVetoException
a_ColumnName
-
WTPropertyVetoException
public Class getJavaType() throws WTException
getJavaType
in interface ColumnExpression
WTException
public void setJavaType(Class a_JavaType) throws WTPropertyVetoException
a_JavaType
-
WTPropertyVetoException
public String getColumnAlias()
getColumnAlias
in interface ColumnExpression
public void setColumnAlias(String a_ColumnAlias) throws WTPropertyVetoException
setColumnAlias
in interface ColumnExpression
a_ColumnAlias
-
WTPropertyVetoException
public boolean isAdvancedQuery() throws WTException
isAdvancedQuery
in interface ColumnExpression
WTException
public boolean isAdvancedQueryEnabled()
isAdvancedQueryEnabled
in interface ColumnExpression
public void setAdvancedQueryEnabled(boolean a_AdvancedQueryEnabled)
setAdvancedQueryEnabled
in interface ColumnExpression
a_AdvancedQueryEnabled
- public int getFromCount()
getFromCount
in interface Expression
public int validate(TableExpression[] a_tableExpressions, int a_offset) throws QueryException
validate
in interface Expression
a_tableExpressions
- Table expression to validate against.a_offset
- Offset index into the TableExpression array for the next valid TableExpression
QueryException
public int setFromAlias(String[] a_aliases, int a_offset)
setFromAlias
in interface Expression
a_aliases
- Array of aliases for expressionsa_offset
- Offset index into the alias array for the next valid alias
public Object getBindParameter() throws WTException
getBindParameter
in interface RelationalExpression
WTException
public String getExpression(boolean a_useBind, Vector a_tableInfos, Vector a_aliases, boolean a_outerJoin) throws QueryException
getExpression
in interface RelationalExpression
a_useBind
- Indicates that bind variables should be used for this expression.a_tableInfos
- a_aliases
- a_outerJoin
- Indicates that outer join syntax should be used for this expression.
QueryException
public List getClassAttributes()
getClassAttributes
in interface RelationalExpression
public String toString()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |