Class ObjectLiteral

    • Field Detail

      • value

        private java.lang.Object value
    • Constructor Detail

      • ObjectLiteral

        public ObjectLiteral​(SQLStatement stmt,
                             JavaTypeMapping mapping,
                             java.lang.Object value,
                             java.lang.String parameterName)
        Constructor for an Object literal with a value.
        Parameters:
        stmt - the SQL statement
        mapping - the mapping
        value - the Object value
        parameterName - Name of the parameter that this represents if any (as JDBC "?")
    • Method Detail

      • addSubexpressionsForValue

        private void addSubexpressionsForValue​(java.lang.Object value,
                                               JavaTypeMapping mapping)
        Method to add subExprs for the supplied mapping, consistent with the supplied value. The value can be a persistent object, or an identity (datastore/application).
        Parameters:
        value - The value
        mapping - The mapping
      • getValue

        public java.lang.Object getValue()
        Description copied from interface: SQLLiteral
        Accessor to the literal value
        Specified by:
        getValue in interface SQLLiteral
        Returns:
        the value of the literal
      • eq

        public BooleanExpression eq​(SQLExpression expr)
        Method called when the query contains "object == value".
        Overrides:
        eq in class ObjectExpression
        Parameters:
        expr - The expression
        Returns:
        The resultant expression for this query relation
      • ne

        public BooleanExpression ne​(SQLExpression expr)
        Method called when the query contains "object NOTEQUALS value".
        Overrides:
        ne in class ObjectExpression
        Parameters:
        expr - The expression
        Returns:
        The resultant expression for this query relation
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • setNotParameter

        public void setNotParameter()
        Description copied from interface: SQLLiteral
        Method to set this literal as not being a parameter. If the literal if not currently a parameter then does nothing. Updates any underlying SQL to have the value.
        Specified by:
        setNotParameter in interface SQLLiteral
      • setStatement

        protected void setStatement()