All Implemented Interfaces:
Serializable, Cloneable

public class ClassTypeExpression extends DataExpression
See Also:
  • Field Details

    • field

      protected DatabaseField field
      Cache the aliased field. Only applies to attributes.
    • aliasedField

      protected DatabaseField aliasedField
      Cache the aliased field. Only applies to attributes.
  • Constructor Details

    • ClassTypeExpression

      public ClassTypeExpression(Expression base)
    • ClassTypeExpression

      public ClassTypeExpression()
  • Method Details

    • descriptionOfNodeType

      public String descriptionOfNodeType()
      INTERNAL: Used for debug printing.
      Overrides:
      descriptionOfNodeType in class Expression
    • rebuildOn

      public Expression rebuildOn(Expression newBase)
      Description copied from class: Expression
      INTERNAL: This expression is built on a different base than the one we want. Rebuild it and return the root of the new tree If receiver is a complex expression, use cloneUsing(newBase) instead.
      Specified by:
      rebuildOn in class Expression
      See Also:
    • typeValueFromObject

      public Object typeValueFromObject(Object object, AbstractSession session)
      INTERNAL This method returns the inheritance field value for an object to conform in an in-memory query. Similar to getFieldValue, but deals with an instance rather than a Class object directly
    • validateNode

      public void validateNode()
      Description copied from class: Expression
      INTERNAL: Do any required validation for this node. Throw an exception for any incorrect constructs.
      Overrides:
      validateNode in class Expression
    • valueFromObject

      public Object valueFromObject(Object object, AbstractSession session, AbstractRecord translationRow, int valueHolderPolicy, boolean isObjectUnregistered)
      INTERNAL: Return the value for in memory comparison. This is only valid for value expressions. Pulled from QueryKeyExpression valueFromObject
      Overrides:
      valueFromObject in class Expression
      Parameters:
      isObjectUnregistered - true if object possibly not a clone, but is being conformed against the unit of work cache.
    • writeDescriptionOn

      public void writeDescriptionOn(BufferedWriter writer) throws IOException
      INTERNAL: Used to print a debug form of the expression tree.
      Overrides:
      writeDescriptionOn in class Expression
      Throws:
      IOException
    • getField

      public DatabaseField getField()
      INTERNAL:
      Overrides:
      getField in class DataExpression
    • getFieldValue

      public Object getFieldValue(Object objectValue, AbstractSession session)
      INTERNAL: Transform the object-level value into a database-level value objectValue is a Class or collection of Class objects and the returned value is the database representation Example: ObjectValue=LargeProject returns "L".
      Overrides:
      getFieldValue in class Expression
    • getContainingDescriptor

      public ClassDescriptor getContainingDescriptor()
      INTERNAL: Like QueryKeyExpression, return the descriptor for the class type used, null if one can't be determined yet. Should only be called when a session is already set.
      Overrides:
      getContainingDescriptor in class DataExpression
    • getContainingDescriptor

      public ClassDescriptor getContainingDescriptor(ObjectLevelReadQuery query)
      INTERNAL: Return the descriptor for the base expression. This is used in ReportItem when building the return value (a class), as none of the expressions will have a session.
    • isClassTypeExpression

      public boolean isClassTypeExpression()
      Description copied from class: Expression
      INTERNAL:
      Overrides:
      isClassTypeExpression in class Expression
    • isAttribute

      public boolean isAttribute()
      INTERNAL:
      Overrides:
      isAttribute in class DataExpression
    • normalize

      public Expression normalize(ExpressionNormalizer normalizer, Vector foreignKeyJoinPointer)
      INTERNAL: For CR#2456 if this is part of an objExp.equal(objExp), do not need to add additional expressions to normalizer both times, and the foreign key join replaces the equal expression.
    • initializeAliasedField

      protected void initializeAliasedField()
      INTERNAL: Alias the database field for our current environment
    • getAliasedField

      public DatabaseField getAliasedField()
      INTERNAL: Return the field appropriately aliased
      Overrides:
      getAliasedField in class DataExpression
    • getAliasedTable

      protected DatabaseTable getAliasedTable()
      Return the alias for our table
    • getFields

      public Vector getFields()
      INTERNAL: Return all the fields
      Overrides:
      getFields in class Expression
    • twistedForBaseAndContext

      public Expression twistedForBaseAndContext(Expression newBase, Expression context, Expression oldBase)
      Description copied from class: Expression
      INTERNAL: Rebuild myself against the base, with the values of parameters supplied by the context expression. This is used for transforming a standalone expression (e.g. the join criteria of a mapping) into part of some larger expression. You normally would not call this directly, instead calling twist See the comment there for more details"
      Overrides:
      twistedForBaseAndContext in class Expression