Package org.nuiton.topia.persistence
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 Summary
Modifier and TypeMethodDescriptionaddAllFetches(String property, String... otherProperties) addAllFetches(Collection<String> properties) addContains(String property, Object value) addIn(String property, Collection<?> values) addNotContains(String property, Object value) addNotEquals(String property, Object value) addNotIn(String property, Collection<?> values) addNotNull(String property) addTopiaIdEquals(String property, String topiaId) This method has the same behavior asaddEquals(String, Object)but you don't need to have the entity but only the topiaId.addTopiaIdIn(String property, Collection<String> topiaIds) This method has the same behavior asaddIn(String, Collection)but you don't need to have the entity but only the topiaId.addTopiaIdNotEquals(String property, String topiaId) This method has the same behavior asaddNotEquals(String, Object)but you don't need to have the entity but only the topiaId.addTopiaIdNotIn(String property, Collection<String> topiaIds) This method has the same behavior asaddNotIn(String, Collection)but you don't need to have the entity but only the topiaId.setOrderByArguments(String... orderByArguments) setOrderByArguments(Collection<org.nuiton.util.pagination.PaginationOrder> paginationOrders) setOrderByArguments(LinkedHashSet<String> orderByArguments)
-
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
- 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 propertyvalues- 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 propertyvalues- 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 propertyvalue- the property of the entity must be a collection that contains value- Returns:
- the current or next step for a fluent interface usage
-
addNotContains
- Parameters:
property- the name of a field of the queried entity, must be a one-to-many or a many-to-many propertyvalue- 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
This method has the same behavior asaddEquals(String, Object)but you don't need to have the entity but only the topiaId. This method is useful when you want to do aaddEquals(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 propertytopiaId- the value the topiaId of the entity must be equals to- Returns:
- the current or next step for a fluent interface usage
-
addTopiaIdNotEquals
This method has the same behavior asaddNotEquals(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 propertytopiaId- the value the topiaId of the entity must not be equals to- Returns:
- the current or next step for a fluent interface usage
-
addTopiaIdIn
TopiaQueryBuilderAddCriteriaOrRunQueryStep<E> addTopiaIdIn(String property, Collection<String> topiaIds) This method has the same behavior asaddIn(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 propertytopiaIds- 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 asaddNotIn(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 propertytopiaIds- 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
- 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
- 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 ofPaginationOrderthat will be added as order by- Returns:
- the next step as this method must be used at the end
- See Also:
-
PaginationOrder
-