|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object de.greenrobot.dao.Query<T>
T
- The enitity class the query will return results for.public class Query<T>
A repeatable query returning entities.
Method Summary | |
---|---|
java.util.List<T> |
list() Executes the query and returns the result as a list containing all entities loaded into memory. |
CloseableListIterator<T> |
listIterator() Executes the query and returns the result as a list iterator; make sure to close it to close the underlying cursor. |
LazyList<T> |
listLazy() Executes the query and returns the result as a list that lazy loads the entities on first access. |
LazyList<T> |
listLazyUncached() Executes the query and returns the result as a list that lazy loads the entities on every access (uncached). |
void |
setLimit(int limit) Sets the limit of the maximum number of results returned by this Query. |
void |
setOffset(int offset) Sets the offset for results returned by this Query. |
void |
setParameter(int index, java.lang.Object parameter) Sets the parameter (0 based) using the position in which it was added during building the query. |
T |
unique() Executes the query and returns the unique result or null. |
T |
uniqueOrThrow() Executes the query and returns the unique result (never null). |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public void setParameter(int index, java.lang.Object parameter)
public void setLimit(int limit)
public void setOffset(int offset)
public java.util.List<T> list()
public LazyList<T> listLazy()
public LazyList<T> listLazyUncached()
public CloseableListIterator<T> listIterator()
public T unique()
DaoException
- if the result is not uniquepublic T uniqueOrThrow()
DaoException
- if the result is not unique or no entity was found
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |