public static class AbstractTopiaDao.InnerTopiaQueryBuilderAddCriteriaOrRunQueryStep<E extends TopiaEntity> extends Object implements TopiaQueryBuilderAddCriteriaOrRunQueryStep<E>
| Modifier and Type | Field and Description |
|---|---|
protected HqlAndParametersBuilder<E> |
hqlAndParametersBuilder |
protected AbstractTopiaDao<E> |
topiaDao |
| Modifier | Constructor and Description |
|---|---|
protected |
InnerTopiaQueryBuilderAddCriteriaOrRunQueryStep(AbstractTopiaDao<E> topiaDao,
HqlAndParametersBuilder<E> hqlAndParametersBuilder) |
| Modifier and Type | Method and Description |
|---|---|
TopiaQueryBuilderAddCriteriaOrRunQueryStep<E> |
addAllFetches(Collection<String> properties) |
TopiaQueryBuilderAddCriteriaOrRunQueryStep<E> |
addAllFetches(String property,
String... otherProperties) |
TopiaQueryBuilderAddCriteriaOrRunQueryStep<E> |
addContains(String property,
Object value) |
TopiaQueryBuilderAddCriteriaOrRunQueryStep<E> |
addEquals(String property,
Object value) |
TopiaQueryBuilderAddCriteriaOrRunQueryStep<E> |
addFetch(String property) |
TopiaQueryBuilderAddCriteriaOrRunQueryStep<E> |
addIn(String property,
Collection<?> values) |
TopiaQueryBuilderAddCriteriaOrRunQueryStep<E> |
addNotContains(String property,
Object value) |
TopiaQueryBuilderAddCriteriaOrRunQueryStep<E> |
addNotEquals(String property,
Object value) |
TopiaQueryBuilderAddCriteriaOrRunQueryStep<E> |
addNotIn(String property,
Collection<?> values) |
TopiaQueryBuilderAddCriteriaOrRunQueryStep<E> |
addNotNull(String property) |
TopiaQueryBuilderAddCriteriaOrRunQueryStep<E> |
addNull(String property) |
TopiaQueryBuilderAddCriteriaOrRunQueryStep<E> |
addTopiaIdEquals(String property,
String topiaId)
This method has the same behavior as
TopiaQueryBuilderAddCriteriaStep.addEquals(String, Object) but you don't need to have the entity but
only the topiaId. |
TopiaQueryBuilderAddCriteriaOrRunQueryStep<E> |
addTopiaIdIn(String property,
Collection<String> topiaIds)
This method has the same behavior as
TopiaQueryBuilderAddCriteriaStep.addIn(String, Collection) but you don't need to have the entity but
only the topiaId. |
TopiaQueryBuilderAddCriteriaOrRunQueryStep<E> |
addTopiaIdNotEquals(String property,
String topiaId)
This method has the same behavior as
TopiaQueryBuilderAddCriteriaStep.addNotEquals(String, Object) but you don't need to have the entity
but only the topiaId. |
TopiaQueryBuilderAddCriteriaOrRunQueryStep<E> |
addTopiaIdNotIn(String property,
Collection<String> topiaIds)
This method has the same behavior as
TopiaQueryBuilderAddCriteriaStep.addNotIn(String, Collection) but you don't need to have the entity
but only the topiaId. |
long |
count()
This method is equivalent as calling
Collection.size() after doing a TopiaQueryBuilderRunQueryStep.findAll() but it
may be faster. |
boolean |
exists() |
List<E> |
find(int startIndex,
int endIndex)
Get the elements with the given bounds.
|
List<E> |
find(org.nuiton.util.pagination.PaginationParameter page)
Get the elements according to the given
PaginationParameter. |
List<E> |
findAll()
Get all the elements of the result set.
|
List<String> |
findAllIds()
Get all the elements identifiers of the result set.
|
Iterable<E> |
findAllLazy()
Get all the elements in a lazy loading list.
|
Iterable<E> |
findAllLazy(int batchSize)
Get all the elements in a lazy loading list.
|
E |
findAny()
Get the an element of the non-empty result set.
|
E |
findAnyOrNull()
Get the an element of the result set or null if query result is empty.
|
E |
findFirst()
Get the first element of the non-empty result set.
|
E |
findFirstOrNull()
Get the first element of the result set or null if query result is empty.
|
List<String> |
findIds(int startIndex,
int endIndex)
Get the elements identifiers with the given bounds.
|
List<String> |
findIds(org.nuiton.util.pagination.PaginationParameter page)
Get the elements identifiers according to the given
PaginationParameter. |
org.nuiton.util.pagination.PaginationResult<String> |
findIdsPage(org.nuiton.util.pagination.PaginationParameter page)
Get the elements identifiers according to the given
PaginationParameter. |
org.nuiton.util.pagination.PaginationResult<E> |
findPage(org.nuiton.util.pagination.PaginationParameter page)
Get the elements according to the given
PaginationParameter. |
E |
findUnique()
Get the first element of a single-element result set.
|
E |
findUniqueOrNull()
Get the first element of a single-element result set or null if query result is empty.
|
protected AbstractTopiaDao.InnerTopiaQueryBuilderRunQueryStep<E> |
getNextStep() |
TopiaQueryBuilderRunQueryStep<E> |
setOrderByArguments(Collection<org.nuiton.util.pagination.PaginationOrder> paginationOrders) |
AbstractTopiaDao.InnerTopiaQueryBuilderRunQueryStep<E> |
setOrderByArguments(LinkedHashSet<String> orderByArguments) |
AbstractTopiaDao.InnerTopiaQueryBuilderRunQueryStep<E> |
setOrderByArguments(String... orderByArguments) |
com.google.common.base.Optional<E> |
tryFindAny()
Get the an element of the result set.
|
com.google.common.base.Optional<E> |
tryFindFirst()
Get the first element of the result set.
|
com.google.common.base.Optional<E> |
tryFindUnique()
Get the first element of a single-element result set.
|
protected AbstractTopiaDao<E extends TopiaEntity> topiaDao
protected HqlAndParametersBuilder<E extends TopiaEntity> hqlAndParametersBuilder
protected InnerTopiaQueryBuilderAddCriteriaOrRunQueryStep(AbstractTopiaDao<E> topiaDao, HqlAndParametersBuilder<E> hqlAndParametersBuilder)
public AbstractTopiaDao.InnerTopiaQueryBuilderRunQueryStep<E> setOrderByArguments(LinkedHashSet<String> orderByArguments)
setOrderByArguments in interface TopiaQueryBuilderAddCriteriaStep<E extends TopiaEntity>orderByArguments - list of arguments that will be added as order bypublic AbstractTopiaDao.InnerTopiaQueryBuilderRunQueryStep<E> setOrderByArguments(String... orderByArguments)
setOrderByArguments in interface TopiaQueryBuilderAddCriteriaStep<E extends TopiaEntity>orderByArguments - list of arguments that will be added as order bypublic TopiaQueryBuilderRunQueryStep<E> setOrderByArguments(Collection<org.nuiton.util.pagination.PaginationOrder> paginationOrders)
setOrderByArguments in interface TopiaQueryBuilderAddCriteriaStep<E extends TopiaEntity>paginationOrders - list of PaginationOrder that will be added as order byPaginationOrderpublic TopiaQueryBuilderAddCriteriaOrRunQueryStep<E> addEquals(String property, Object value)
addEquals in interface TopiaQueryBuilderAddCriteriaStep<E extends TopiaEntity>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 topublic TopiaQueryBuilderAddCriteriaOrRunQueryStep<E> addNotEquals(String property, Object value)
addNotEquals in interface TopiaQueryBuilderAddCriteriaStep<E extends TopiaEntity>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 topublic TopiaQueryBuilderAddCriteriaOrRunQueryStep<E> addIn(String property, Collection<?> values)
addIn in interface TopiaQueryBuilderAddCriteriaStep<E extends TopiaEntity>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 topublic TopiaQueryBuilderAddCriteriaOrRunQueryStep<E> addNotIn(String property, Collection<?> values)
addNotIn in interface TopiaQueryBuilderAddCriteriaStep<E extends TopiaEntity>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 topublic TopiaQueryBuilderAddCriteriaOrRunQueryStep<E> addContains(String property, Object value)
addContains in interface TopiaQueryBuilderAddCriteriaStep<E extends TopiaEntity>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 valuepublic TopiaQueryBuilderAddCriteriaOrRunQueryStep<E> addNotContains(String property, Object value)
addNotContains in interface TopiaQueryBuilderAddCriteriaStep<E extends TopiaEntity>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 valuepublic TopiaQueryBuilderAddCriteriaOrRunQueryStep<E> addNull(String property)
addNull in interface TopiaQueryBuilderAddCriteriaStep<E extends TopiaEntity>property - the name of a field of the queried entity, must be a one-to-one or a many-to-one propertypublic TopiaQueryBuilderAddCriteriaOrRunQueryStep<E> addNotNull(String property)
addNotNull in interface TopiaQueryBuilderAddCriteriaStep<E extends TopiaEntity>property - the name of a field of the queried entity, must be a one-to-one or a many-to-one propertypublic TopiaQueryBuilderAddCriteriaOrRunQueryStep<E> addTopiaIdEquals(String property, String topiaId)
TopiaQueryBuilderAddCriteriaStepTopiaQueryBuilderAddCriteriaStep.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 TopiaQueryBuilderAddCriteriaStep.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
addTopiaIdEquals in interface TopiaQueryBuilderAddCriteriaStep<E extends TopiaEntity>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 topublic TopiaQueryBuilderAddCriteriaOrRunQueryStep<E> addTopiaIdIn(String property, Collection<String> topiaIds)
TopiaQueryBuilderAddCriteriaStepTopiaQueryBuilderAddCriteriaStep.addIn(String, Collection) but you don't need to have the entity but
only the topiaId.addTopiaIdIn in interface TopiaQueryBuilderAddCriteriaStep<E extends TopiaEntity>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 topublic TopiaQueryBuilderAddCriteriaOrRunQueryStep<E> addTopiaIdNotEquals(String property, String topiaId)
TopiaQueryBuilderAddCriteriaStepTopiaQueryBuilderAddCriteriaStep.addNotEquals(String, Object) but you don't need to have the entity
but only the topiaId.addTopiaIdNotEquals in interface TopiaQueryBuilderAddCriteriaStep<E extends TopiaEntity>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 topublic TopiaQueryBuilderAddCriteriaOrRunQueryStep<E> addTopiaIdNotIn(String property, Collection<String> topiaIds)
TopiaQueryBuilderAddCriteriaStepTopiaQueryBuilderAddCriteriaStep.addNotIn(String, Collection) but you don't need to have the entity
but only the topiaId.addTopiaIdNotIn in interface TopiaQueryBuilderAddCriteriaStep<E extends TopiaEntity>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 topublic TopiaQueryBuilderAddCriteriaOrRunQueryStep<E> addFetch(String property)
addFetch in interface TopiaQueryBuilderAddCriteriaStep<E extends TopiaEntity>property - a property to load (fetch) with the entity(ies) (in a single query)public TopiaQueryBuilderAddCriteriaOrRunQueryStep<E> addAllFetches(String property, String... otherProperties)
addAllFetches in interface TopiaQueryBuilderAddCriteriaStep<E extends TopiaEntity>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)public TopiaQueryBuilderAddCriteriaOrRunQueryStep<E> addAllFetches(Collection<String> properties)
addAllFetches in interface TopiaQueryBuilderAddCriteriaStep<E extends TopiaEntity>properties - a collection of properties to load (fetch) with the entity(ies) (in a single query)public boolean exists()
exists in interface TopiaQueryBuilderRunQueryWithUniqueResultStep<E extends TopiaEntity>public E findAnyOrNull()
TopiaQueryBuilderRunQueryStepTopiaQueryBuilderRunQueryStep.tryFindAny() but allows you to prevent using Guava in you project.findAnyOrNull in interface TopiaQueryBuilderRunQueryStep<E extends TopiaEntity>public E findUniqueOrNull()
TopiaQueryBuilderRunQueryWithUniqueResultStepTopiaQueryBuilderRunQueryWithUniqueResultStep.tryFindUnique() but allows you to prevent using Guava in you project.findUniqueOrNull in interface TopiaQueryBuilderRunQueryWithUniqueResultStep<E extends TopiaEntity>public E findAny()
TopiaQueryBuilderRunQueryStepfindAny in interface TopiaQueryBuilderRunQueryStep<E extends TopiaEntity>public E findUnique()
TopiaQueryBuilderRunQueryWithUniqueResultStepfindUnique in interface TopiaQueryBuilderRunQueryWithUniqueResultStep<E extends TopiaEntity>public E findFirst()
TopiaQueryBuilderRunQueryStepfindFirst in interface TopiaQueryBuilderRunQueryStep<E extends TopiaEntity>public E findFirstOrNull()
TopiaQueryBuilderRunQueryStepTopiaQueryBuilderRunQueryStep.tryFindFirst() but allows you to prevent using Guava in you project.findFirstOrNull in interface TopiaQueryBuilderRunQueryStep<E extends TopiaEntity>public com.google.common.base.Optional<E> tryFindAny()
TopiaQueryBuilderRunQueryStepTopiaQueryBuilderRunQueryStep.findAny()tryFindAny in interface TopiaQueryBuilderRunQueryStep<E extends TopiaEntity>public com.google.common.base.Optional<E> tryFindFirst()
TopiaQueryBuilderRunQueryStepTopiaQueryBuilderRunQueryStep.findFirst()tryFindFirst in interface TopiaQueryBuilderRunQueryStep<E extends TopiaEntity>public com.google.common.base.Optional<E> tryFindUnique()
TopiaQueryBuilderRunQueryWithUniqueResultStepTopiaQueryBuilderRunQueryWithUniqueResultStep.findUnique()tryFindUnique in interface TopiaQueryBuilderRunQueryWithUniqueResultStep<E extends TopiaEntity>public List<E> findAll()
TopiaQueryBuilderRunQueryStepfindAll in interface TopiaQueryBuilderRunQueryStep<E extends TopiaEntity>public List<E> find(int startIndex, int endIndex)
TopiaQueryBuilderRunQueryStepfind in interface TopiaQueryBuilderRunQueryStep<E extends TopiaEntity>startIndex - inclusive index of the first element to return. This value is 0-basedendIndex - inclusive index of the last element to return. A value lower than 0 means infinite upper bound.public List<E> find(org.nuiton.util.pagination.PaginationParameter page)
TopiaQueryBuilderRunQueryStepPaginationParameter.
Use TopiaQueryBuilderRunQueryStep.findPage(PaginationParameter) to get a PaginationResult instead of a list.find in interface TopiaQueryBuilderRunQueryStep<E extends TopiaEntity>page - information about the page to load.PaginationParameterpublic org.nuiton.util.pagination.PaginationResult<E> findPage(org.nuiton.util.pagination.PaginationParameter page)
TopiaQueryBuilderRunQueryStepPaginationParameter.
Use TopiaQueryBuilderRunQueryStep.find(PaginationParameter) to get a list instead of PaginationResult.
Note: compared to TopiaQueryBuilderRunQueryStep.find(PaginationParameter), this method performs an additional statement to get the
total elements count.findPage in interface TopiaQueryBuilderRunQueryStep<E extends TopiaEntity>page - information about the page to load.PaginationParameter,
PaginationResultpublic Iterable<E> findAllLazy()
TopiaQueryBuilderRunQueryStepTopiaQueryBuilderRunQueryStep.findAllLazy(int)findAllLazy in interface TopiaQueryBuilderRunQueryStep<E extends TopiaEntity>public Iterable<E> findAllLazy(int batchSize)
TopiaQueryBuilderRunQueryStepTopiaQueryBuilderRunQueryStep.findAllLazy()findAllLazy in interface TopiaQueryBuilderRunQueryStep<E extends TopiaEntity>batchSize - the number of elements to load per requestpublic long count()
TopiaQueryBuilderRunQueryStepCollection.size() after doing a TopiaQueryBuilderRunQueryStep.findAll() but it
may be faster.count in interface TopiaQueryBuilderRunQueryStep<E extends TopiaEntity>public List<String> findIds(int startIndex, int endIndex)
TopiaQueryBuilderRunQueryStepTopiaQueryBuilderRunQueryStep.find(int, int), this method will not load entities, only its identifier.findIds in interface TopiaQueryBuilderRunQueryStep<E extends TopiaEntity>startIndex - inclusive index of the first element to return. This value is 0-basedendIndex - inclusive index of the last element to return. A value lower than 0 means infinite upper bound.public List<String> findIds(org.nuiton.util.pagination.PaginationParameter page)
TopiaQueryBuilderRunQueryStepPaginationParameter.
Use TopiaQueryBuilderRunQueryStep.findIdsPage(PaginationParameter) to get a PaginationResult instead of a list.
Note: compared to TopiaQueryBuilderRunQueryStep.find(PaginationParameter), this method will not load entities, only its identifier.findIds in interface TopiaQueryBuilderRunQueryStep<E extends TopiaEntity>page - information about the page to load.PaginationParameterpublic org.nuiton.util.pagination.PaginationResult<String> findIdsPage(org.nuiton.util.pagination.PaginationParameter page)
TopiaQueryBuilderRunQueryStepPaginationParameter.
Use TopiaQueryBuilderRunQueryStep.findIds(PaginationParameter) to get a list instead of PaginationResult.
Note: compared to TopiaQueryBuilderRunQueryStep.findIds(PaginationParameter), this method performs an additional statement to get the
total elements identifiers count.
Note: compared to TopiaQueryBuilderRunQueryStep.findPage(PaginationParameter), this method will not load entities, only its identifierfindIdsPage in interface TopiaQueryBuilderRunQueryStep<E extends TopiaEntity>page - information about the page to load.PaginationParameter,
PaginationResultpublic List<String> findAllIds()
TopiaQueryBuilderRunQueryStepTopiaQueryBuilderRunQueryStep.findAll(), this method will not load entities, only its identifier.findAllIds in interface TopiaQueryBuilderRunQueryStep<E extends TopiaEntity>protected AbstractTopiaDao.InnerTopiaQueryBuilderRunQueryStep<E> getNextStep()
Copyright © 2004–2018 CodeLutin. All rights reserved.