Class LiteralExpression

    • Constructor Detail

      • LiteralExpression

        public LiteralExpression()
      • LiteralExpression

        public LiteralExpression​(String newValue,
                                 Expression baseExpression)
    • Method Detail

      • equals

        public boolean equals​(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 Expression
      • 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
      • getBuilder

        public ExpressionBuilder getBuilder()
        Return the expression builder which is the ultimate base of this expression, or null if there isn't one (shouldn't happen if we start from a root)
        Specified by:
        getBuilder in class Expression
      • getLocalBase

        protected Expression getLocalBase()
      • getValue

        public String getValue()
      • postCopyIn

        protected void postCopyIn​(Map alreadyDone)
        INTERNAL: Used for cloning.
        Overrides:
        postCopyIn in class Expression
      • resetPlaceHolderBuilder

        public void resetPlaceHolderBuilder​(ExpressionBuilder queryBuilder)
        INTERNAL: Search the tree for any expressions (like SubSelectExpressions) that have been built using a builder that is not attached to the query. This happens in case of an Exists call using a new ExpressionBuilder(). This builder needs to be replaced with one from the query.
        Specified by:
        resetPlaceHolderBuilder in class Expression
      • setLocalBase

        public void setLocalBase​(Expression e)
        Description copied from class: Expression
        INTERNAL: Set the local base expression, ie the one on the other side of the operator Most types will ignore this, since they don't need it.
        Overrides:
        setLocalBase in class Expression
      • 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
      • 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 valueable expressions.
        Overrides:
        valueFromObject in class Expression
        isObjectUnregistered - true if object possibly not a clone, but is being conformed against the unit of work cache.