Interface TopiaQueryBuilderAddCriteriaStep<E extends TopiaEntity>

All Known Subinterfaces:
TopiaQueryBuilderAddCriteriaOrRunQueryStep<E>
All Known Implementing Classes:
AbstractTopiaDao.InnerTopiaQueryBuilderAddCriteriaOrRunQueryStep

public interface TopiaQueryBuilderAddCriteriaStep<E extends TopiaEntity>
Represents a step when building a query to add a constraint. The builder implements the fluent interface DP, so you can add multiple constraints by chaining calls.
Since:
3.0
Author:
bleny, Arnaud Thimel (Code Lutin)
  • Method Details

    • addEquals

      Parameters:
      property - the name of a field of the queried entity, must be a one-to-one or a many-to-one property.
      value - the value the field of the entity must be equals to
      Returns:
      the current or next step for a fluent interface usage
    • addNotEquals

      TopiaQueryBuilderAddCriteriaOrRunQueryStep<E> addNotEquals(String property, Object value)
      Parameters:
      property - the name of a field of the queried entity, must be a one-to-one or a many-to-one property.
      value - the value the field of the entity must not be equals to
      Returns:
      the current or next step for a fluent interface usage
    • addIn

      Parameters:
      property - the name of a field of the queried entity, must be a one-to-one or a many-to-one property
      values - a collection of values the field of the entity must be equals to
      Returns:
      the current or next step for a fluent interface usage
    • addNotIn

      Parameters:
      property - the name of a field of the queried entity, must be a one-to-one or a many-to-one property
      values - the value the field of the entity must not be equals to
      Returns:
      the current or next step for a fluent interface usage
    • addContains

      Parameters:
      property - the name of a field of the queried entity, must be a one-to-many or a many-to-many property
      value - the property of the entity must be a collection that contains value
      Returns:
      the current or next step for a fluent interface usage
    • addNotContains

      TopiaQueryBuilderAddCriteriaOrRunQueryStep<E> addNotContains(String property, Object value)
      Parameters:
      property - the name of a field of the queried entity, must be a one-to-many or a many-to-many property
      value - the property of the entity must be a collection that doesn't contain value
      Returns:
      the current or next step for a fluent interface usage
    • addNull

      Parameters:
      property - the name of a field of the queried entity, must be a one-to-one or a many-to-one property
      Returns:
      the current or next step for a fluent interface usage
    • addNotNull

      Parameters:
      property - the name of a field of the queried entity, must be a one-to-one or a many-to-one property
      Returns:
      the current or next step for a fluent interface usage
    • addTopiaIdEquals

      TopiaQueryBuilderAddCriteriaOrRunQueryStep<E> addTopiaIdEquals(String property, String topiaId)
      This method has the same behavior as addEquals(String, Object) but you don't need to have the entity but only the topiaId. This method is useful when you want to do a addEquals(String, Object) but you don't have the entity you want to give as an argument, you only have the topiaId.
           // given that we want to find an entity that has a boat property valued to a
           // boat which topiaId is boatId, we could write:
      
           addEquals("boat.topiaId", boatId); // boatId is a topiaId
      
           // but instead, you can write
      
           addTopiaIdEquals("boat", boatId); // boat is a topia entity
       
      Parameters:
      property - the name of a field of the queried entity, must be a one-to-one or a many-to-one property
      topiaId - the value the topiaId of the entity must be equals to
      Returns:
      the current or next step for a fluent interface usage
    • addTopiaIdNotEquals

      TopiaQueryBuilderAddCriteriaOrRunQueryStep<E> addTopiaIdNotEquals(String property, String topiaId)
      This method has the same behavior as addNotEquals(String, Object) but you don't need to have the entity but only the topiaId.
      Parameters:
      property - the name of a field of the queried entity, must be a one-to-one or a many-to-one property
      topiaId - the value the topiaId of the entity must not be equals to
      Returns:
      the current or next step for a fluent interface usage
    • addTopiaIdIn

      This method has the same behavior as addIn(String, Collection) but you don't need to have the entity but only the topiaId.
      Parameters:
      property - the name of a field of the queried entity, must be a one-to-one or a many-to-one property
      topiaIds - a collection of values the topiaId of the entity must be equals to
      Returns:
      the current or next step for a fluent interface usage
    • addTopiaIdNotIn

      TopiaQueryBuilderAddCriteriaOrRunQueryStep<E> addTopiaIdNotIn(String property, Collection<String> topiaIds)
      This method has the same behavior as addNotIn(String, Collection) but you don't need to have the entity but only the topiaId.
      Parameters:
      property - the name of a field of the queried entity, must be a one-to-one or a many-to-one property
      topiaIds - a collection of values the topiaId of the entity must not be equals to
      Returns:
      the current or next step for a fluent interface usage
    • addFetch

      Parameters:
      property - a property to load (fetch) with the entity(ies) (in a single query)
      Returns:
      the current or next step for a fluent interface usage
    • addAllFetches

      TopiaQueryBuilderAddCriteriaOrRunQueryStep<E> addAllFetches(String property, String... otherProperties)
      Parameters:
      property - a property to load (fetch) with the entity(ies) (in a single query)
      otherProperties - an optional array of additional properties to load (fetch) with the entity(ies)
      Returns:
      the current or next step for a fluent interface usage
    • addAllFetches

      Parameters:
      properties - a collection of properties to load (fetch) with the entity(ies) (in a single query)
      Returns:
      the current or next step for a fluent interface usage
    • setOrderByArguments

      TopiaQueryBuilderRunQueryStep<E> setOrderByArguments(LinkedHashSet<String> orderByArguments)
      Parameters:
      orderByArguments - list of arguments that will be added as order by
      Returns:
      the next step as this method must be used at the end
    • setOrderByArguments

      TopiaQueryBuilderRunQueryStep<E> setOrderByArguments(String... orderByArguments)
      Parameters:
      orderByArguments - list of arguments that will be added as order by
      Returns:
      the next step as this method must be used at the end
    • setOrderByArguments

      TopiaQueryBuilderRunQueryStep<E> setOrderByArguments(Collection<org.nuiton.util.pagination.PaginationOrder> paginationOrders)
      Parameters:
      paginationOrders - list of PaginationOrder that will be added as order by
      Returns:
      the next step as this method must be used at the end
      See Also:
      • PaginationOrder