Class BooleanLiteral

    • Constructor Detail

      • BooleanLiteral

        public BooleanLiteral​(SQLStatement stmt,
                              JavaTypeMapping mapping,
                              Object value,
                              String parameterName)
        Creates a boolean literal with the specified value, using the provided mapping. The boolean literal DOESN'T have closure using this constructor. This constructor will use the provided mapping in determining whether to put "TRUE"/"1=0", or "1"/"0" or "Y"/"N" in the SQL.
        Parameters:
        stmt - The SQL statement
        mapping - the mapping
        value - the value
        parameterName - Parameter name (represented as JDBC "?")
      • BooleanLiteral

        public BooleanLiteral​(SQLStatement stmt,
                              JavaTypeMapping mapping,
                              Boolean value)
        Creates a boolean literal with the specified value, using the provided mapping. The boolean expression has closure using this constructor. This constructor doesn't take into account the type of the mapping and how a boolean may be stored, just creating a literal (TRUE) and the SQL will simply be "TRUE"/"1=0".
        Parameters:
        stmt - The SQL statement
        mapping - the mapping
        value - the boolean value
    • Method Detail

      • getValue

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

        public BooleanExpression and​(SQLExpression expr)
        Description copied from class: SQLExpression
        Conditional AND. Evaluates its right-hand operand only if the value of its left-hand operand is true.
        Overrides:
        and in class BooleanExpression
        Parameters:
        expr - the right-hand operand
        Returns:
        the result value is true if both operand values are true; otherwise, the result is false.
      • ior

        public BooleanExpression ior​(SQLExpression expr)
        Description copied from class: SQLExpression
        Conditional OR. Evaluates its right-hand operand only if the value of its left-hand operand is false.
        Overrides:
        ior in class BooleanExpression
        Parameters:
        expr - the right-hand operand
        Returns:
        the result value is false if both operand values are false; otherwise, the result is true.
      • 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()