Package org.greenrobot.greendao.query
Class DeleteQuery<T>
- java.lang.Object
-
- org.greenrobot.greendao.query.DeleteQuery<T>
-
- Type Parameters:
T- The entity class the query will delete from.
public class DeleteQuery<T> extends java.lang.ObjectA repeatable query for deleting entities.
New API note: this is more likely to change.
-
-
Field Summary
Fields Modifier and Type Field Description protected AbstractDao<T,?>daoprotected InternalQueryDaoAccess<T>daoAccessprotected java.lang.ThreadownerThreadprotected java.lang.String[]parametersprotected java.lang.Stringsql
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidcheckThread()voidexecuteDeleteWithoutDetachingEntities()Deletes all matching entities without detaching them from the identity scope (aka session/cache).DeleteQuery<T>forCurrentThread()DeleteQuery<T>setParameter(int index, java.lang.Boolean parameter)DeleteQuery<T>setParameter(int index, java.lang.Object parameter)Sets the parameter (0 based) using the position in which it was added during building the query.DeleteQuery<T>setParameter(int index, java.util.Date parameter)protected static java.lang.String[]toStringArray(java.lang.Object[] values)
-
-
-
Field Detail
-
dao
protected final AbstractDao<T,?> dao
-
daoAccess
protected final InternalQueryDaoAccess<T> daoAccess
-
sql
protected final java.lang.String sql
-
parameters
protected final java.lang.String[] parameters
-
ownerThread
protected final java.lang.Thread ownerThread
-
-
Method Detail
-
forCurrentThread
public DeleteQuery<T> forCurrentThread()
-
executeDeleteWithoutDetachingEntities
public void executeDeleteWithoutDetachingEntities()
Deletes all matching entities without detaching them from the identity scope (aka session/cache). Note that this method may lead to stale entity objects in the session cache. Stale entities may be returned when loaded by their primary key, but not using queries.
-
setParameter
public DeleteQuery<T> setParameter(int index, java.lang.Object parameter)
Sets the parameter (0 based) using the position in which it was added during building the query.
-
setParameter
public DeleteQuery<T> setParameter(int index, java.util.Date parameter)
- See Also:
setParameter(int, Object)
-
setParameter
public DeleteQuery<T> setParameter(int index, java.lang.Boolean parameter)
- See Also:
setParameter(int, Object)
-
toStringArray
protected static java.lang.String[] toStringArray(java.lang.Object[] values)
-
checkThread
protected void checkThread()
-
-