Class TableExpression

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable
    Direct Known Subclasses:
    FromSubSelectExpression

    public class TableExpression
    extends DataExpression
    A TableExpression allows for a raw database table to be referenced in a query. This is used for ManyToMany and DirectCollection mappings to define their selection criteria. It can also be used directly to mix SQL artifacts with Expressions.
    See Also:
    Serialized Form
    • Constructor Detail

      • TableExpression

        public TableExpression()
      • TableExpression

        public TableExpression​(DatabaseTable table)
    • Method Detail

      • equals

        public boolean equals​(java.lang.Object object)
        INTERNAL: Return if the expression is equal to the other. This is used to allow dynamic expression's SQL to be cached.
        Overrides:
        equals in class DataExpression
      • computeHashCode

        public int computeHashCode()
        INTERNAL: Compute a consistent hash-code for the expression. This is used to allow dynamic expression's SQL to be cached.
        Overrides:
        computeHashCode in class Expression
      • descriptionOfNodeType

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

        public Expression getField​(java.lang.String fieldName)
        INTERNAL: Fully-qualify the databaseField if the table is known. CR 3791
        Overrides:
        getField in class DataExpression
      • setTable

        public void setTable​(DatabaseTable table)
        INTERNAL: Added for temporal querying.
      • twistedForBaseAndContext

        public Expression twistedForBaseAndContext​(Expression newBase,
                                                   Expression context,
                                                   Expression oldBase)
        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
      • writeDescriptionOn

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