Package wt.query

Class ClassAttribute

java.lang.Object
wt.query.ClassAttribute
All Implemented Interfaces:
Externalizable, Serializable, ColumnExpression, wt.query.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:
  • Constructor Details

    • 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 Details

    • 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
      Specified by:
      getColumnAlias in interface OrderByExpression
      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