Package wt.query
Class ClassAttribute
java.lang.Object
wt.query.ClassAttribute
- All Implemented Interfaces:
Externalizable,Serializable,ColumnExpression,wt.query.Expression,OrderByExpression,RelationalExpression
This class represents a class attribute which can be used in a SQL statement.
Introspection information is used to determine the associated table
and column.
When a query executes, a ClassAttribute used in the query internally
references a TableExpression from that query. A single instance of
ClassAttribute must only be associated to a single TableExpression.
If multiple classes are used in the query or a sub-select is used, then
a single instances of ClassAttribute should not be reused in different
query expressions. Instead, construct multiple instances, as needed.
Supported API: true
Extendable: false
- See Also:
-
Field Summary
Fields inherited from interface wt.query.ColumnExpression
COLUMN_ALIAS -
Constructor Summary
ConstructorsConstructorDescriptionClassAttribute(Class a_targetClass, String a_attributeName)
Supported API: true -
Method Summary
Modifier and TypeMethodDescriptionGets the value of the attribute: attributeName; The class's attribute.Gets the value of the attribute: columnAlias; Alias for the column expression.Gets the object for the association that plays role: targetClass.voidsetAttributeName(String a_AttributeName) Sets the value of the attribute: attributeName; The class's attribute.voidsetColumnAlias(String a_ColumnAlias) Sets the value of the attribute: columnAlias; Alias for the column expression.voidsetTargetClass(Class a_TargetClass) Sets the object for the association that plays role: targetClass.
-
Constructor Details
-
ClassAttribute
Supported API: true- Parameters:
a_targetClass- Specifies the class.a_attributeName- Specifies the class's attribute.- Throws:
QueryException
-
-
Method Details
-
getAttributeName
Gets the value of the attribute: attributeName; The class's attribute.
Supported API: true- Returns:
- String
-
setAttributeName
Sets the value of the attribute: attributeName; The class's attribute.
Supported API: true- Parameters:
a_AttributeName-- Throws:
WTPropertyVetoException
-
getTargetClass
Gets the object for the association that plays role: targetClass.
Supported API: true- Returns:
- Class
-
setTargetClass
Sets the object for the association that plays role: targetClass.
Supported API: true- Parameters:
a_TargetClass-- Throws:
WTPropertyVetoException
-
getColumnAlias
Gets the value of the attribute: columnAlias; Alias for the column expression.
Supported API: true- Specified by:
getColumnAliasin interfaceColumnExpression- Specified by:
getColumnAliasin interfaceOrderByExpression- Returns:
- String
-
setColumnAlias
Sets the value of the attribute: columnAlias; Alias for the column expression.
Supported API: true- Specified by:
setColumnAliasin interfaceColumnExpression- Parameters:
a_ColumnAlias-- Throws:
WTPropertyVetoException
-