public interface TopiaQueryBuilderRunQueryStep<E extends TopiaEntity>
TopiaQueryBuilderAddCriteriaStep)
There are different methods according to the supposed existence or uniqueness of the result. Also some methods may be
used only if order is defined in query.
Some methods return an Optional, but since it's not yet available in JDK, we use Guava's. If you don't want
your project to require Guava dependency, we provide equivalent method named XXXOrNull() for the same purpose.| Modifier and Type | Method and Description |
|---|---|
long |
count()
This method is equivalent as calling
Collection.size()
after doing a findAll() but it may be faster. |
boolean |
exists() |
List<E> |
find(int startIndex,
int endIndex) |
List<E> |
find(TopiaPagerBean pager) |
List<E> |
findAll() |
List<String> |
findAllIds() |
Iterable<E> |
findAllLazy() |
Iterable<E> |
findAllLazy(int batchSize) |
E |
findAny() |
E |
findAnyOrNull() |
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 was empty.
|
List<String> |
findIds(int startIndex,
int endIndex) |
List<String> |
findIds(TopiaPagerBean pager) |
E |
findUnique() |
E |
findUniqueOrNull() |
com.google.common.base.Optional<E> |
tryFindAny() |
com.google.common.base.Optional<E> |
tryFindFirst()
Get the first element of the result set.
|
com.google.common.base.Optional<E> |
tryFindUnique() |
boolean exists()
long count()
Collection.size()
after doing a findAll() but it may be faster.E findUnique() throws TopiaNoResultException, TopiaNonUniqueResultException
E findUniqueOrNull() throws TopiaNonUniqueResultException
TopiaNonUniqueResultExceptioncom.google.common.base.Optional<E> tryFindUnique() throws TopiaNonUniqueResultException
TopiaNonUniqueResultExceptionE findFirst() throws QueryMissingOrderException, TopiaNoResultException
QueryMissingOrderException - if you the query
misses an order clauseTopiaNoResultExceptionE findFirstOrNull() throws QueryMissingOrderException
tryFindFirst()
but allows you to prevent using Guava in you project.QueryMissingOrderException - if you the query
misses an order clausecom.google.common.base.Optional<E> tryFindFirst() throws QueryMissingOrderException
tryFindFirst()
but allows you to prevent using Guava in you project.
If the call must return a result, prefer findFirst()QueryMissingOrderException - if you the query
misses an order clauseE findAny() throws TopiaNoResultException
TopiaNoResultExceptionE findAnyOrNull()
com.google.common.base.Optional<E> tryFindAny()
List<E> find(TopiaPagerBean pager)
List<String> findIds(TopiaPagerBean pager)
Copyright © 2004–2014 CodeLutin. All rights reserved.