T
- The entity class the query will return results for.public class CursorQuery<T>
extends java.lang.Object
Query
). This class
can nevertheless be useful to work with legacy code that is based on Cursors or CursorLoaders.Modifier and Type | Field and Description |
---|---|
protected AbstractDao<T,?> |
dao |
protected de.greenrobot.dao.InternalQueryDaoAccess<T> |
daoAccess |
protected int |
limitPosition |
protected int |
offsetPosition |
protected java.lang.Thread |
ownerThread |
protected java.lang.String[] |
parameters |
protected java.lang.String |
sql |
Modifier and Type | Method and Description |
---|---|
protected void |
checkThread() |
CursorQuery |
forCurrentThread() |
static <T2> CursorQuery<T2> |
internalCreate(AbstractDao<T2,?> dao,
java.lang.String sql,
java.lang.Object[] initialValues)
For internal use by greenDAO only.
|
android.database.Cursor |
query()
Executes the query and returns a raw android.database.Cursor.
|
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.Boolean parameter) |
void |
setParameter(int index,
java.util.Date parameter) |
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.
|
protected static java.lang.String[] |
toStringArray(java.lang.Object[] values) |
protected final int limitPosition
protected final int offsetPosition
protected final AbstractDao<T,?> dao
protected final de.greenrobot.dao.InternalQueryDaoAccess<T> daoAccess
protected final java.lang.String sql
protected final java.lang.String[] parameters
protected final java.lang.Thread ownerThread
public static <T2> CursorQuery<T2> internalCreate(AbstractDao<T2,?> dao, java.lang.String sql, java.lang.Object[] initialValues)
public CursorQuery forCurrentThread()
public android.database.Cursor query()
public void setParameter(int index, java.lang.Object parameter)
public void setParameter(int index, java.util.Date parameter)
public void setParameter(int index, java.lang.Boolean parameter)
public void setLimit(int limit)
QueryBuilder.limit(int)
must
have been called on the QueryBuilder that created this Query object.public void setOffset(int offset)
QueryBuilder.offset(int)
must
have been called on
the QueryBuilder that created this Query object.protected static java.lang.String[] toStringArray(java.lang.Object[] values)
protected void checkThread()
Available under the Apache License, Version 2.0 - Copyright © 2011-2015 greenrobot.de. All Rights Reserved.