Interface QueryModel

  • All Superinterfaces:
    Criteria
    All Known Implementing Classes:
    AssociationQuery, DefaultQuery

    public interface QueryModel
    extends Criteria
    Main interface for constructing queries at either compilation or runtime.
    Since:
    1.0
    • Method Summary

      All Methods Static Methods Instance Methods Abstract Methods Default Methods Deprecated Methods 
      Modifier and Type Method Description
      QueryModel add​(QueryModel.Criterion criterion)
      Adds the specified criterion instance to the query.
      QueryModel allEq​(java.util.Map<java.lang.String,​java.lang.Object> propertyValues)
      Apply an "equals" constraint to each property in the key set of a Map.
      QueryModel and​(Criteria other)
      Creates a logical conjunction.
      QueryModel between​(java.lang.String propertyName, java.lang.Object start, java.lang.Object finish)
      Restricts the results by the given property value range (inclusive).
      QueryModel contains​(java.lang.String propertyName, java.lang.Object parameter)
      Restricts the property match to strings containing with the given value.
      QueryModel endsWith​(java.lang.String propertyName, java.lang.Object parameter)
      Restricts the property match to strings ending with the given value.
      QueryModel eq​(java.lang.String propertyName, java.lang.Object parameter)
      Creates an "equals" Criterion based on the specified property name and value.
      QueryModel eqAll​(java.lang.String propertyName, Criteria propertyValue)
      Creates a subquery criterion that ensures the given property is equals to all the given returned values.
      QueryModel eqProperty​(java.lang.String propertyName, java.lang.String otherPropertyName)
      Constrains a property to be equal to a specified other property.
      void forUpdate()
      Lock the selected entities.
      static QueryModel from​(PersistentEntity entity)
      Creates a query from the given entity.
      QueryModel ge​(java.lang.String property, java.lang.Object parameter)
      Used to restrict a value to be greater than or equal to the given value.
      QueryModel geAll​(java.lang.String propertyName, Criteria propertyValue)
      Creates a subquery criterion that ensures the given property is greater than or equals to all the given returned values.
      QueryModel geProperty​(java.lang.String propertyName, java.lang.String otherPropertyName)
      Constrains a property to be greater than or equal to a specified other property.
      QueryModel geSome​(java.lang.String propertyName, Criteria propertyValue)
      Creates a subquery criterion that ensures the given property is greater than or equal to some of the given values.
      QueryModel.Junction getCriteria()  
      java.util.Optional<JoinPath> getJoinPath​(java.lang.String path)
      Obtain the join type for the given association.
      java.util.Collection<JoinPath> getJoinPaths()  
      int getMax()
      Get the pageSize results to return.
      long getOffset()
      Get the offset of the query.
      PersistentEntity getPersistentEntity()  
      java.util.List<QueryModel.Projection> getProjections()  
      default Sort getSort()
      The sort to apply.
      QueryModel gt​(java.lang.String property, java.lang.Object parameter)
      Used to restrict a value to be greater than or equal to the given value.
      QueryModel gtAll​(java.lang.String propertyName, Criteria propertyValue)
      Creates a subquery criterion that ensures the given property is greater than all the given returned values.
      QueryModel gte​(java.lang.String property, java.lang.Object parameter)
      Used to restrict a value to be greater than or equal to the given value.
      QueryModel gtProperty​(java.lang.String propertyName, java.lang.String otherPropertyName)
      Constrains a property to be greater than a specified other property.
      QueryModel gtSome​(java.lang.String propertyName, Criteria propertyValue)
      Creates a subquery criterion that ensures the given property is greater than some of the given values.
      QueryModel idEq​(java.lang.Object parameter)
      Creates an "equals" Criterion based on the specified property name and value.
      QueryModel ilike​(java.lang.String propertyName, java.lang.Object parameter)
      Creates an ilike Criterion based on the specified property name and value.
      QueryModel inList​(java.lang.String propertyName, QueryModel subquery)
      Creates an "in" Criterion using a subquery.
      QueryModel inList​(java.lang.String propertyName, java.lang.Object parameter)
      Creates an "in" Criterion based on the specified property name and list of values.
      QueryModel isEmpty​(java.lang.String propertyName)
      Creates a criterion that asserts the given property is empty (such as a blank string).
      QueryModel isFalse​(java.lang.String propertyName)
      Creates a criterion that asserts the given property is false.
      boolean isForUpdate()
      Whether to lock the selected entities.
      QueryModel isNotEmpty​(java.lang.String propertyName)
      Creates a criterion that asserts the given property is not empty.
      QueryModel isNotNull​(java.lang.String propertyName)
      Creates a criterion that asserts the given property is not null.
      QueryModel isNull​(java.lang.String propertyName)
      Creates a criterion that asserts the given property is null.
      QueryModel isTrue​(java.lang.String propertyName)
      Creates a criterion that asserts the given property is true.
      default JoinPath join​(Association association)
      Join on the given association.
      default JoinPath join​(Association association, Join.Type joinType)
      Join on the given association.
      default JoinPath join​(java.lang.String path, Join.Type joinType, java.lang.String alias)
      Join on the given association.
      JoinPath join​(java.lang.String path, Association association, Join.Type joinType, java.lang.String alias)
      Deprecated.
      QueryModel le​(java.lang.String property, java.lang.Object parameter)
      Used to restrict a value to be less than or equal to the given value.
      QueryModel leAll​(java.lang.String propertyName, Criteria propertyValue)
      Creates a subquery criterion that ensures the given property is less than or equal to all the given returned values.
      QueryModel leProperty​(java.lang.String propertyName, java.lang.String otherPropertyName)
      Constrains a property to be less than or equal to a specified other property.
      QueryModel leSome​(java.lang.String propertyName, Criteria propertyValue)
      Creates a subquery criterion that ensures the given property is less than or equal to some of the given values.
      QueryModel like​(java.lang.String propertyName, java.lang.Object parameter)
      Creates a like Criterion based on the specified property name and value.
      QueryModel lt​(java.lang.String property, java.lang.Object parameter)
      Used to restrict a value to be less than or equal to the given value.
      QueryModel ltAll​(java.lang.String propertyName, Criteria propertyValue)
      Creates a subquery criterion that ensures the given property is less than all the given returned values.
      QueryModel lte​(java.lang.String property, java.lang.Object parameter)
      Used to restrict a value to be less than or equal to the given value.
      QueryModel ltProperty​(java.lang.String propertyName, java.lang.String otherPropertyName)
      Constrains a property to be less than a specified other property.
      QueryModel ltSome​(java.lang.String propertyName, Criteria propertyValue)
      Creates a subquery criterion that ensures the given property is less than some of the given values.
      QueryModel max​(int max)
      Limits the maximum result.
      QueryModel ne​(java.lang.String propertyName, java.lang.Object parameter)
      Creates a "not equals" Criterion based on the specified property name and value.
      QueryModel neProperty​(java.lang.String propertyName, java.lang.String otherPropertyName)
      Constrains a property to be not equal to a specified other property.
      QueryModel not​(Criteria other)
      Creates a logical negation.
      QueryModel notIn​(java.lang.String propertyName, QueryModel subquery)
      Creates a negated "in" Criterion using a subquery.
      QueryModel offset​(long offset)
      Sets the offset.
      QueryModel or​(Criteria other)
      Creates a logical disjunction.
      ProjectionList projections()  
      QueryModel rlike​(java.lang.String propertyName, java.lang.Object parameter)
      Creates an rlike Criterion based on the specified property name and value.
      QueryModel sizeEq​(java.lang.String propertyName, java.lang.Object size)
      Creates a Criterion that constrains a collection property by size.
      QueryModel sizeGe​(java.lang.String propertyName, java.lang.Object size)
      Creates a Criterion that constrains a collection property to be greater than or equal to the given size.
      QueryModel sizeGt​(java.lang.String propertyName, java.lang.Object size)
      Creates a Criterion that constrains a collection property to be greater than the given size.
      QueryModel sizeLe​(java.lang.String propertyName, java.lang.Object size)
      Creates a Criterion that constrains a collection property to be less than or equal to the given size.
      QueryModel sizeLt​(java.lang.String propertyName, java.lang.Object size)
      Creates a Criterion that constrains a collection property to be less than to the given size.
      QueryModel sizeNe​(java.lang.String propertyName, java.lang.Object size)
      Creates a Criterion that constrains a collection property to be not equal to the given size.
      QueryModel sort​(Sort sort)
      Apply the given sort.
      QueryModel startsWith​(java.lang.String propertyName, java.lang.Object parameter)
      Restricts the property match to strings starting with the given value.
      QueryModel versionEq​(java.lang.Object parameter)
      Creates that restricts the version to the given value.
    • Method Detail

      • idEq

        @NonNull
        QueryModel idEq​(java.lang.Object parameter)
        Description copied from interface: Criteria
        Creates an "equals" Criterion based on the specified property name and value.
        Specified by:
        idEq in interface Criteria
        Parameters:
        parameter - The parameter that provides the value
        Returns:
        The criteria
      • versionEq

        @NonNull
        QueryModel versionEq​(java.lang.Object parameter)
        Description copied from interface: Criteria
        Creates that restricts the version to the given value.
        Specified by:
        versionEq in interface Criteria
        Parameters:
        parameter - The parameter that provides the value
        Returns:
        The criteria
      • isEmpty

        @NonNull
        QueryModel isEmpty​(@NonNull
                           java.lang.String propertyName)
        Description copied from interface: Criteria
        Creates a criterion that asserts the given property is empty (such as a blank string).
        Specified by:
        isEmpty in interface Criteria
        Parameters:
        propertyName - The property name
        Returns:
        The criteria
      • isNotEmpty

        @NonNull
        QueryModel isNotEmpty​(@NonNull
                              java.lang.String propertyName)
        Description copied from interface: Criteria
        Creates a criterion that asserts the given property is not empty.
        Specified by:
        isNotEmpty in interface Criteria
        Parameters:
        propertyName - The property name
        Returns:
        The criteria
      • isNull

        @NonNull
        QueryModel isNull​(@NonNull
                          java.lang.String propertyName)
        Description copied from interface: Criteria
        Creates a criterion that asserts the given property is null.
        Specified by:
        isNull in interface Criteria
        Parameters:
        propertyName - The property name
        Returns:
        The criteria
      • isTrue

        @NonNull
        QueryModel isTrue​(@NonNull
                          java.lang.String propertyName)
        Description copied from interface: Criteria
        Creates a criterion that asserts the given property is true.
        Specified by:
        isTrue in interface Criteria
        Parameters:
        propertyName - The property name
        Returns:
        The criteria
      • isFalse

        @NonNull
        QueryModel isFalse​(@NonNull
                           java.lang.String propertyName)
        Description copied from interface: Criteria
        Creates a criterion that asserts the given property is false.
        Specified by:
        isFalse in interface Criteria
        Parameters:
        propertyName - The property name
        Returns:
        The criteria
      • isNotNull

        @NonNull
        QueryModel isNotNull​(java.lang.String propertyName)
        Description copied from interface: Criteria
        Creates a criterion that asserts the given property is not null.
        Specified by:
        isNotNull in interface Criteria
        Parameters:
        propertyName - The property name
        Returns:
        The criteria
      • eq

        @NonNull
        QueryModel eq​(java.lang.String propertyName,
                      java.lang.Object parameter)
        Description copied from interface: Criteria
        Creates an "equals" Criterion based on the specified property name and value.
        Specified by:
        eq in interface Criteria
        Parameters:
        propertyName - The property name
        parameter - The parameter that provides the value
        Returns:
        The criteria
      • ne

        @NonNull
        QueryModel ne​(@NonNull
                      java.lang.String propertyName,
                      @NonNull
                      java.lang.Object parameter)
        Description copied from interface: Criteria
        Creates a "not equals" Criterion based on the specified property name and value.
        Specified by:
        ne in interface Criteria
        Parameters:
        propertyName - The property name
        parameter - The parameter that provides the value
        Returns:
        The criteria
      • between

        @NonNull
        QueryModel between​(@NonNull
                           java.lang.String propertyName,
                           @NonNull
                           java.lang.Object start,
                           @NonNull
                           java.lang.Object finish)
        Description copied from interface: Criteria
        Restricts the results by the given property value range (inclusive).
        Specified by:
        between in interface Criteria
        Parameters:
        propertyName - The property name
        start - The start of the range
        finish - The end of the range
        Returns:
        The criteria
      • gte

        @NonNull
        QueryModel gte​(@NonNull
                       java.lang.String property,
                       @NonNull
                       java.lang.Object parameter)
        Description copied from interface: Criteria
        Used to restrict a value to be greater than or equal to the given value.
        Specified by:
        gte in interface Criteria
        Parameters:
        property - The property
        parameter - The parameter that provides the value
        Returns:
        The Criterion instance
      • ge

        @NonNull
        QueryModel ge​(@NonNull
                      java.lang.String property,
                      @NonNull
                      java.lang.Object parameter)
        Description copied from interface: Criteria
        Used to restrict a value to be greater than or equal to the given value.
        Specified by:
        ge in interface Criteria
        Parameters:
        property - The property
        parameter - The parameter that provides the value
        Returns:
        The Criterion instance
      • gt

        @NonNull
        QueryModel gt​(@NonNull
                      java.lang.String property,
                      @NonNull
                      java.lang.Object parameter)
        Description copied from interface: Criteria
        Used to restrict a value to be greater than or equal to the given value.
        Specified by:
        gt in interface Criteria
        Parameters:
        property - The property
        parameter - The parameter that provides the value
        Returns:
        The Criterion instance
      • lte

        @NonNull
        QueryModel lte​(@NonNull
                       java.lang.String property,
                       @NonNull
                       java.lang.Object parameter)
        Description copied from interface: Criteria
        Used to restrict a value to be less than or equal to the given value.
        Specified by:
        lte in interface Criteria
        Parameters:
        property - The property
        parameter - The parameter that provides the value
        Returns:
        The Criterion instance
      • le

        @NonNull
        QueryModel le​(@NonNull
                      java.lang.String property,
                      @NonNull
                      java.lang.Object parameter)
        Description copied from interface: Criteria
        Used to restrict a value to be less than or equal to the given value.
        Specified by:
        le in interface Criteria
        Parameters:
        property - The property
        parameter - The parameter that provides the value
        Returns:
        The Criterion instance
      • lt

        @NonNull
        QueryModel lt​(@NonNull
                      java.lang.String property,
                      @NonNull
                      java.lang.Object parameter)
        Description copied from interface: Criteria
        Used to restrict a value to be less than or equal to the given value.
        Specified by:
        lt in interface Criteria
        Parameters:
        property - The property
        parameter - The parameter that provides the value
        Returns:
        The Criterion instance
      • like

        @NonNull
        QueryModel like​(@NonNull
                        java.lang.String propertyName,
                        @NonNull
                        java.lang.Object parameter)
        Description copied from interface: Criteria
        Creates a like Criterion based on the specified property name and value.
        Specified by:
        like in interface Criteria
        Parameters:
        propertyName - The property name
        parameter - The parameter that provides the value
        Returns:
        The criteria
      • startsWith

        @NonNull
        QueryModel startsWith​(@NonNull
                              java.lang.String propertyName,
                              @NonNull
                              java.lang.Object parameter)
        Description copied from interface: Criteria
        Restricts the property match to strings starting with the given value.
        Specified by:
        startsWith in interface Criteria
        Parameters:
        propertyName - The property name
        parameter - The parameter that provides the value
        Returns:
        The criteria
      • endsWith

        @NonNull
        QueryModel endsWith​(@NonNull
                            java.lang.String propertyName,
                            @NonNull
                            java.lang.Object parameter)
        Description copied from interface: Criteria
        Restricts the property match to strings ending with the given value.
        Specified by:
        endsWith in interface Criteria
        Parameters:
        propertyName - The property name
        parameter - The parameter that provides the value
        Returns:
        The criteria
      • contains

        @NonNull
        QueryModel contains​(@NonNull
                            java.lang.String propertyName,
                            @NonNull
                            java.lang.Object parameter)
        Description copied from interface: Criteria
        Restricts the property match to strings containing with the given value.
        Specified by:
        contains in interface Criteria
        Parameters:
        propertyName - The property name
        parameter - The parameter that provides the value
        Returns:
        The criteria
      • ilike

        @NonNull
        QueryModel ilike​(@NonNull
                         java.lang.String propertyName,
                         @NonNull
                         java.lang.Object parameter)
        Description copied from interface: Criteria
        Creates an ilike Criterion based on the specified property name and value. Unlike a like condition, ilike is case insensitive.
        Specified by:
        ilike in interface Criteria
        Parameters:
        propertyName - The property name
        parameter - The parameter that provides the value
        Returns:
        The criteria
      • rlike

        @NonNull
        QueryModel rlike​(@NonNull
                         java.lang.String propertyName,
                         @NonNull
                         java.lang.Object parameter)
        Description copied from interface: Criteria
        Creates an rlike Criterion based on the specified property name and value.
        Specified by:
        rlike in interface Criteria
        Parameters:
        propertyName - The property name
        parameter - The parameter that provides the value
        Returns:
        The criteria
      • and

        @NonNull
        QueryModel and​(@NonNull
                       Criteria other)
        Description copied from interface: Criteria
        Creates a logical conjunction.
        Specified by:
        and in interface Criteria
        Parameters:
        other - The other criteria
        Returns:
        This criteria
      • or

        @NonNull
        QueryModel or​(@NonNull
                      Criteria other)
        Description copied from interface: Criteria
        Creates a logical disjunction.
        Specified by:
        or in interface Criteria
        Parameters:
        other - The other criteria
        Returns:
        This criteria
      • not

        @NonNull
        QueryModel not​(@NonNull
                       Criteria other)
        Description copied from interface: Criteria
        Creates a logical negation.
        Specified by:
        not in interface Criteria
        Parameters:
        other - The other criteria
        Returns:
        This criteria
      • inList

        @NonNull
        QueryModel inList​(@NonNull
                          java.lang.String propertyName,
                          @NonNull
                          QueryModel subquery)
        Description copied from interface: Criteria
        Creates an "in" Criterion using a subquery.
        Specified by:
        inList in interface Criteria
        Parameters:
        propertyName - The property name
        subquery - The subquery
        Returns:
        The criteria
      • inList

        @NonNull
        QueryModel inList​(@NonNull
                          java.lang.String propertyName,
                          @NonNull
                          java.lang.Object parameter)
        Description copied from interface: Criteria
        Creates an "in" Criterion based on the specified property name and list of values.
        Specified by:
        inList in interface Criteria
        Parameters:
        propertyName - The property name
        parameter - The parameter that provides the value
        Returns:
        The criteria
      • notIn

        @NonNull
        QueryModel notIn​(@NonNull
                         java.lang.String propertyName,
                         @NonNull
                         QueryModel subquery)
        Description copied from interface: Criteria
        Creates a negated "in" Criterion using a subquery.
        Specified by:
        notIn in interface Criteria
        Parameters:
        propertyName - The property name
        subquery - The subquery
        Returns:
        The criteria
      • sizeEq

        @NonNull
        QueryModel sizeEq​(@NonNull
                          java.lang.String propertyName,
                          @NonNull
                          java.lang.Object size)
        Description copied from interface: Criteria
        Creates a Criterion that constrains a collection property by size.
        Specified by:
        sizeEq in interface Criteria
        Parameters:
        propertyName - The property name
        size - The size to constrain by
        Returns:
        This criteria
      • sizeGt

        @NonNull
        QueryModel sizeGt​(@NonNull
                          java.lang.String propertyName,
                          @NonNull
                          java.lang.Object size)
        Description copied from interface: Criteria
        Creates a Criterion that constrains a collection property to be greater than the given size.
        Specified by:
        sizeGt in interface Criteria
        Parameters:
        propertyName - The property name
        size - The size to constrain by
        Returns:
        This criteria
      • sizeGe

        @NonNull
        QueryModel sizeGe​(@NonNull
                          java.lang.String propertyName,
                          @NonNull
                          java.lang.Object size)
        Description copied from interface: Criteria
        Creates a Criterion that constrains a collection property to be greater than or equal to the given size.
        Specified by:
        sizeGe in interface Criteria
        Parameters:
        propertyName - The property name
        size - The size to constrain by
        Returns:
        This criteria
      • sizeLe

        @NonNull
        QueryModel sizeLe​(@NonNull
                          java.lang.String propertyName,
                          @NonNull
                          java.lang.Object size)
        Description copied from interface: Criteria
        Creates a Criterion that constrains a collection property to be less than or equal to the given size.
        Specified by:
        sizeLe in interface Criteria
        Parameters:
        propertyName - The property name
        size - The size to constrain by
        Returns:
        This criteria
      • sizeLt

        @NonNull
        QueryModel sizeLt​(@NonNull
                          java.lang.String propertyName,
                          @NonNull
                          java.lang.Object size)
        Description copied from interface: Criteria
        Creates a Criterion that constrains a collection property to be less than to the given size.
        Specified by:
        sizeLt in interface Criteria
        Parameters:
        propertyName - The property name
        size - The size to constrain by
        Returns:
        This criteria
      • sizeNe

        @NonNull
        QueryModel sizeNe​(@NonNull
                          java.lang.String propertyName,
                          @NonNull
                          java.lang.Object size)
        Description copied from interface: Criteria
        Creates a Criterion that constrains a collection property to be not equal to the given size.
        Specified by:
        sizeNe in interface Criteria
        Parameters:
        propertyName - The property name
        size - The size to constrain by
        Returns:
        This criteria
      • eqProperty

        @NonNull
        QueryModel eqProperty​(@NonNull
                              java.lang.String propertyName,
                              @NonNull
                              java.lang.String otherPropertyName)
        Description copied from interface: Criteria
        Constrains a property to be equal to a specified other property.
        Specified by:
        eqProperty in interface Criteria
        Parameters:
        propertyName - The property
        otherPropertyName - The other property
        Returns:
        This criteria
      • neProperty

        @NonNull
        QueryModel neProperty​(@NonNull
                              java.lang.String propertyName,
                              @NonNull
                              java.lang.String otherPropertyName)
        Description copied from interface: Criteria
        Constrains a property to be not equal to a specified other property.
        Specified by:
        neProperty in interface Criteria
        Parameters:
        propertyName - The property
        otherPropertyName - The other property
        Returns:
        This criteria
      • gtProperty

        @NonNull
        QueryModel gtProperty​(@NonNull
                              java.lang.String propertyName,
                              @NonNull
                              java.lang.String otherPropertyName)
        Description copied from interface: Criteria
        Constrains a property to be greater than a specified other property.
        Specified by:
        gtProperty in interface Criteria
        Parameters:
        propertyName - The property
        otherPropertyName - The other property
        Returns:
        This criteria
      • geProperty

        @NonNull
        QueryModel geProperty​(@NonNull
                              java.lang.String propertyName,
                              @NonNull
                              java.lang.String otherPropertyName)
        Description copied from interface: Criteria
        Constrains a property to be greater than or equal to a specified other property.
        Specified by:
        geProperty in interface Criteria
        Parameters:
        propertyName - The property
        otherPropertyName - The other property
        Returns:
        This criteria
      • ltProperty

        @NonNull
        QueryModel ltProperty​(@NonNull
                              java.lang.String propertyName,
                              @NonNull
                              java.lang.String otherPropertyName)
        Description copied from interface: Criteria
        Constrains a property to be less than a specified other property.
        Specified by:
        ltProperty in interface Criteria
        Parameters:
        propertyName - The property
        otherPropertyName - The other property
        Returns:
        This criteria
      • leProperty

        @NonNull
        QueryModel leProperty​(java.lang.String propertyName,
                              @NonNull
                              java.lang.String otherPropertyName)
        Description copied from interface: Criteria
        Constrains a property to be less than or equal to a specified other property.
        Specified by:
        leProperty in interface Criteria
        Parameters:
        propertyName - The property
        otherPropertyName - The other property
        Returns:
        This criteria
      • allEq

        @NonNull
        QueryModel allEq​(@NonNull
                         java.util.Map<java.lang.String,​java.lang.Object> propertyValues)
        Description copied from interface: Criteria
        Apply an "equals" constraint to each property in the key set of a Map.
        Specified by:
        allEq in interface Criteria
        Parameters:
        propertyValues - a map from property names to values
        Returns:
        Criterion
      • eqAll

        @NonNull
        QueryModel eqAll​(@NonNull
                         java.lang.String propertyName,
                         @NonNull
                         Criteria propertyValue)
        Description copied from interface: Criteria
        Creates a subquery criterion that ensures the given property is equals to all the given returned values.
        Specified by:
        eqAll in interface Criteria
        Parameters:
        propertyName - The property name
        propertyValue - A subquery
        Returns:
        This criterion instance
      • gtAll

        @NonNull
        QueryModel gtAll​(@NonNull
                         java.lang.String propertyName,
                         @NonNull
                         Criteria propertyValue)
        Description copied from interface: Criteria
        Creates a subquery criterion that ensures the given property is greater than all the given returned values.
        Specified by:
        gtAll in interface Criteria
        Parameters:
        propertyName - The property name
        propertyValue - A subquery
        Returns:
        This criterion instance
      • ltAll

        @NonNull
        QueryModel ltAll​(@NonNull
                         java.lang.String propertyName,
                         @NonNull
                         Criteria propertyValue)
        Description copied from interface: Criteria
        Creates a subquery criterion that ensures the given property is less than all the given returned values.
        Specified by:
        ltAll in interface Criteria
        Parameters:
        propertyName - The property name
        propertyValue - A subquery
        Returns:
        This criterion instance
      • geAll

        @NonNull
        QueryModel geAll​(@NonNull
                         java.lang.String propertyName,
                         @NonNull
                         Criteria propertyValue)
        Description copied from interface: Criteria
        Creates a subquery criterion that ensures the given property is greater than or equals to all the given returned values.
        Specified by:
        geAll in interface Criteria
        Parameters:
        propertyName - The property name
        propertyValue - A subquery
        Returns:
        This criterion instance
      • leAll

        @NonNull
        QueryModel leAll​(@NonNull
                         java.lang.String propertyName,
                         @NonNull
                         Criteria propertyValue)
        Description copied from interface: Criteria
        Creates a subquery criterion that ensures the given property is less than or equal to all the given returned values.
        Specified by:
        leAll in interface Criteria
        Parameters:
        propertyName - The property name
        propertyValue - A subquery
        Returns:
        This criterion instance
      • gtSome

        @NonNull
        QueryModel gtSome​(@NonNull
                          java.lang.String propertyName,
                          @NonNull
                          Criteria propertyValue)
        Description copied from interface: Criteria
        Creates a subquery criterion that ensures the given property is greater than some of the given values.
        Specified by:
        gtSome in interface Criteria
        Parameters:
        propertyName - The property name
        propertyValue - The property value
        Returns:
        This Criteria instance
      • geSome

        @NonNull
        QueryModel geSome​(@NonNull
                          java.lang.String propertyName,
                          @NonNull
                          Criteria propertyValue)
        Description copied from interface: Criteria
        Creates a subquery criterion that ensures the given property is greater than or equal to some of the given values.
        Specified by:
        geSome in interface Criteria
        Parameters:
        propertyName - The property name
        propertyValue - The property value
        Returns:
        This Criteria instance
      • ltSome

        @NonNull
        QueryModel ltSome​(@NonNull
                          java.lang.String propertyName,
                          @NonNull
                          Criteria propertyValue)
        Description copied from interface: Criteria
        Creates a subquery criterion that ensures the given property is less than some of the given values.
        Specified by:
        ltSome in interface Criteria
        Parameters:
        propertyName - The property name
        propertyValue - The property value
        Returns:
        This Criteria instance
      • leSome

        @NonNull
        QueryModel leSome​(@NonNull
                          java.lang.String propertyName,
                          @NonNull
                          Criteria propertyValue)
        Description copied from interface: Criteria
        Creates a subquery criterion that ensures the given property is less than or equal to some of the given values.
        Specified by:
        leSome in interface Criteria
        Parameters:
        propertyName - The property name
        propertyValue - The property value
        Returns:
        This Criteria instance
      • getJoinPaths

        java.util.Collection<JoinPath> getJoinPaths()
        Returns:
        The join paths.
      • getPersistentEntity

        @NonNull
        PersistentEntity getPersistentEntity()
        Returns:
        The entity the criteria applies to
      • getProjections

        @NonNull
        java.util.List<QueryModel.Projection> getProjections()
        Returns:
        The projections that apply to this query.
      • getJoinPath

        java.util.Optional<JoinPath> getJoinPath​(java.lang.String path)
        Obtain the join type for the given association.
        Parameters:
        path - The path
        Returns:
        The join type for the association.
      • join

        @NonNull
        @Deprecated
        JoinPath join​(java.lang.String path,
                      Association association,
                      @NonNull
                      Join.Type joinType,
                      @Nullable
                      java.lang.String alias)
        Deprecated.
        Join on the given association.
        Parameters:
        path - The join path
        association - The association
        joinType - The join type
        alias - The alias to use.
        Returns:
        The query
      • join

        @NonNull
        default JoinPath join​(java.lang.String path,
                              @NonNull
                              Join.Type joinType,
                              @Nullable
                              java.lang.String alias)
        Join on the given association.
        Parameters:
        path - The join path
        joinType - The join type
        alias - The alias to use.
        Returns:
        The query
      • join

        @NonNull
        default JoinPath join​(@NonNull
                              Association association,
                              @NonNull
                              Join.Type joinType)
        Join on the given association.
        Parameters:
        association - The association, never null
        joinType - The join type
        Returns:
        The query
      • join

        @NonNull
        default JoinPath join​(@NonNull
                              Association association)
        Join on the given association.
        Parameters:
        association - The association, never null
        Returns:
        The query
      • projections

        @NonNull
        ProjectionList projections()
        Returns:
        The projection list.
      • add

        @NonNull
        QueryModel add​(@NonNull
                       QueryModel.Criterion criterion)
        Adds the specified criterion instance to the query.
        Parameters:
        criterion - The criterion instance
        Returns:
        This query
      • max

        QueryModel max​(int max)
        Limits the maximum result.
        Parameters:
        max - The pageSize
        Returns:
        This query
      • offset

        QueryModel offset​(long offset)
        Sets the offset.
        Parameters:
        offset - The offset
        Returns:
        This query
      • getSort

        default Sort getSort()
        The sort to apply.
        Returns:
        The sort
      • sort

        @NonNull
        QueryModel sort​(@NonNull
                        Sort sort)
        Apply the given sort.
        Parameters:
        sort - The sort to apply
        Returns:
        This query
      • from

        @NonNull
        static QueryModel from​(@NonNull
                               PersistentEntity entity)
        Creates a query from the given entity.
        Parameters:
        entity - The entity
        Returns:
        The query
      • getMax

        int getMax()
        Get the pageSize results to return.
        Returns:
        The pageSize results
      • getOffset

        long getOffset()
        Get the offset of the query.
        Returns:
        The offset
      • forUpdate

        void forUpdate()
        Lock the selected entities.
      • isForUpdate

        boolean isForUpdate()
        Whether to lock the selected entities.
        Returns:
        true if the the selected entities should be locked