wt.query
Class ClassAttribute

java.lang.Object
  extended by wt.query.ClassAttribute
All Implemented Interfaces:
Externalizable, Serializable, ColumnExpression, Expression, OrderByExpression, RelationalExpression

public class ClassAttribute
extends Object
implements ColumnExpression, Externalizable

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:
Serialized Form

Field Summary
 
Fields inherited from interface wt.query.ColumnExpression
COLUMN_ALIAS
 
Constructor Summary
ClassAttribute(Class a_targetClass, String a_attributeName)
          

Supported API: true
 
Method Summary
 String getAttributeName()
          Gets the value of the attribute: attributeName; The class's attribute.
 String getColumnAlias()
          Gets the value of the attribute: columnAlias; Alias for the column expression.
 Class getTargetClass()
          Gets the object for the association that plays role: targetClass.
 void setAttributeName(String a_AttributeName)
          Sets the value of the attribute: attributeName; The class's attribute.
 void setColumnAlias(String a_ColumnAlias)
          Sets the value of the attribute: columnAlias; Alias for the column expression.
 void setTargetClass(Class a_TargetClass)
          Sets the object for the association that plays role: targetClass.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ClassAttribute

public ClassAttribute(Class a_targetClass,
                      String a_attributeName)
               throws QueryException


Supported API: true

Parameters:
a_targetClass - Specifies the class.
a_attributeName - Specifies the class's attribute.
Throws:
QueryException
Method Detail

getAttributeName

public String getAttributeName()
Gets the value of the attribute: attributeName; The class's attribute.

Supported API: true

Returns:
String

setAttributeName

public void setAttributeName(String a_AttributeName)
                      throws WTPropertyVetoException
Sets the value of the attribute: attributeName; The class's attribute.

Supported API: true

Parameters:
a_AttributeName -
Throws:
WTPropertyVetoException

getTargetClass

public Class getTargetClass()
Gets the object for the association that plays role: targetClass.

Supported API: true

Returns:
Class

setTargetClass

public void setTargetClass(Class a_TargetClass)
                    throws WTPropertyVetoException
Sets the object for the association that plays role: targetClass.

Supported API: true

Parameters:
a_TargetClass -
Throws:
WTPropertyVetoException

getColumnAlias

public String getColumnAlias()
Gets the value of the attribute: columnAlias; Alias for the column expression.

Supported API: true

Specified by:
getColumnAlias in interface ColumnExpression
Returns:
String

setColumnAlias

public void setColumnAlias(String a_ColumnAlias)
                    throws WTPropertyVetoException
Sets the value of the attribute: columnAlias; Alias for the column expression.

Supported API: true

Specified by:
setColumnAlias in interface ColumnExpression
Parameters:
a_ColumnAlias -
Throws:
WTPropertyVetoException