Class Parameters

    • Method Detail

      • addSubParameters

        public Parameters addSubParameters​(String newConnective)
        Adds sub-parameters with a new connective. That is, the parameters will be grouped in parentheses in the generated query, e.g.: ... and (exp1 or exp2) and ..., assuming the old connective is "and", and the new connective is "or".
        Parameters:
        newConnective - New connective of the parameters.
        Returns:
        Sub-parameters with the given connective.
      • addNegatedParameters

        public Parameters addNegatedParameters()
        Adds negated parameters, by default with the "and" connective. These paremeters will be grouped in parentheses in the generated query and negated, e.g. ... not (exp1 and exp2) ...
        Returns:
        Negated sub paremters.
      • addNullRestriction

        public void addNullRestriction​(String propertyName,
                                       boolean addAlias)
        Adds IS NULL restriction.
        Parameters:
        propertyName - Property name.
        addAlias - Positive if an alias to property name shall be added.
      • addNullRestriction

        public void addNullRestriction​(String alias,
                                       String propertyName)
        Adds IS NULL restriction.
        Parameters:
        alias - the alias which should be added to the property name.
        propertyName - Property name.
      • addNotNullRestriction

        public void addNotNullRestriction​(String propertyName,
                                          boolean addAlias)
        Adds IS NOT NULL restriction.
        Parameters:
        propertyName - Property name.
        addAlias - Positive if an alias to property name shall be added.
      • addNotNullRestriction

        public void addNotNullRestriction​(String alias,
                                          String propertyName)
        Adds IS NOT NULL restriction.
        Parameters:
        alias - the alias which should be added to the property name.
        propertyName - Property name.
      • addWhere

        public void addWhere​(String left,
                             boolean addAliasLeft,
                             String op,
                             String right,
                             boolean addAliasRight)
      • addWhereWithParam

        public void addWhereWithParam​(String left,
                                      String op,
                                      Object paramValue)
      • addWhereWithParam

        public void addWhereWithParam​(String left,
                                      boolean addAlias,
                                      String op,
                                      Object paramValue)
      • addWhereWithNamedParam

        public void addWhereWithNamedParam​(String left,
                                           String op,
                                           String paramName)
      • addWhereWithNamedParam

        public void addWhereWithNamedParam​(String left,
                                           boolean addAlias,
                                           String op,
                                           String paramName)
      • addWhereOrNullRestriction

        public void addWhereOrNullRestriction​(String left,
                                              boolean addAliasLeft,
                                              String op,
                                              String right,
                                              boolean addAliasRight)
        Add where clause with a null restriction: (left = right or (left is null and right is null))
        Parameters:
        left - Left property name.
        addAliasLeft - Whether to add the alias to the left property.
        op - The operator.
        right - Right property name.
        addAliasRight - Whether to add the alias to the right property.
      • addWhereWithFunction

        public void addWhereWithFunction​(Configuration configuration,
                                         Map<String,​String> aliasToEntityNameMap,
                                         Map<String,​String> aliasToComponentPropertyNameMap,
                                         AuditFunction function,
                                         String op,
                                         Object value)
        Add where clause with a function call on the left and a scalar value on the right.
        Parameters:
        configuration - the configuration.
        aliasToEntityNameMap - alias to entity name map, never null
        aliasToComponentPropertyNameMap - alias to component property name map, never null
        function - the function.
        op - the operator.
        value - the scalar value.
      • addWhereWithFunction

        public void addWhereWithFunction​(Configuration configuration,
                                         Map<String,​String> aliasToEntityNameMap,
                                         Map<String,​String> aliasToComponentPropertyNameMap,
                                         AuditFunction function,
                                         String op,
                                         String aliasRight,
                                         String right)
        Add a where clause with a function call on the left and an optionally aliased property on the right.
        Parameters:
        configuration - the configuration.
        aliasToEntityNameMap - alias to entity name map, never null
        aliasToComponentPropertyNameMap - alias to component property name map, never null
        function - the function.
        op - the operator.
        aliasRight - the optional alias of the right property, may be null
        right - the property.
      • addWhereWithFunction

        public void addWhereWithFunction​(Configuration configuration,
                                         Map<String,​String> aliasToEntityNameMap,
                                         Map<String,​String> aliasToComponentPropertyNameMap,
                                         String aliasLeft,
                                         String left,
                                         String op,
                                         AuditFunction function)
        Adds a where clause with a left (optionally aliased) property and a function call on the right side.
        Parameters:
        configuration - the configuration.
        aliasToEntityNameMap - alias to entity name map, never null
        aliasToComponentPropertyNameMap - alias to component property name map, never null
        aliasLeft - the optional alias of the left property, may be null
        left - the property.
        op - the operator.
        function - the function.
      • addWhereWithFunction

        public void addWhereWithFunction​(Configuration configuration,
                                         Map<String,​String> aliasToEntityNameMap,
                                         Map<String,​String> aliasToComponentPropertyNameMap,
                                         AuditFunction left,
                                         String op,
                                         AuditFunction right)
        Adds a where clause with a function call on both the left and right of the predicate.
        Parameters:
        configuration - the configuration.
        aliasToEntityNameMap - alias to entity name map, never null
        aliasToComponentPropertyNameMap - alias to component property name map, never null
        left - the left-side function.
        op - the operator.
        right - the right-side function.
      • addEntityTypeRestriction

        public void addEntityTypeRestriction​(String alias,
                                             String entityName)