Interface IsTruePlugin

  • All Superinterfaces:
    Modifiers
    All Known Implementing Classes:
    DefaultSqlPlugins

    public interface IsTruePlugin
    extends Modifiers
    The SQL Processor plugin devoted to evaluate the boolean value of the logical expression.

    A boolean expression is an expression of the input values with the following operands between them:

    • ! an exclamation mark - for a logical negation
    • ( and ) left and right round brackets – for a logical grouping
    • && two ampersands – for a logical conjunction
    • || two vertical bars – for a logical disjunction

    The standard evaluation is the next one:

    A logical value of an input value (dynamic or static) depends on the Java type of the related attribute. If the value is null, it is evaluated as false. Otherwise it is evaluated as true in the following cases

    • Boolean or boolean – a logical value of the related attribute
    • any type of Number – if the related attribute value is a positive one
    • String - if the related attribute length is greater than zero. A special case is a token false, which is evaluated as false.
    • an enumeration based attribute is treated in a special way, please see the advanced tutorial
    Author:
    Vladimir Hudec
    • Method Detail

      • isTrue

        boolean isTrue​(SqlRuntimeContext runtimeCtx,
                       String attributeName,
                       Object obj,
                       Object parentObj,
                       SqlMetaType sqlMetaType,
                       String inOutModifier,
                       Map<String,​String> values)
        Used for the evaluation of the logical expression in the conditional META SQL fragments.
        Parameters:
        runtimeCtx - the public runtime context
        attributeName - the name of the input value
        obj - the input value
        parentObj - the parent of the input value
        sqlMetaType - the internal type (= META type) devoted for the special processing of the input values
        inOutModifier - the input/output value modifier devoted to extend the processing of the input/output values
        values - values for a special identifier handling, for example a sequence for an identity
        Returns:
        the boolean value of the logical expression