public class GreenDaoUtils
extends java.lang.Object
构造器和说明 |
---|
GreenDaoUtils() |
限定符和类型 | 方法和说明 |
---|---|
static void |
delete(AbstractDao dao,
java.util.List entities)
Deletes the given entities in the database using a transaction.
|
static void |
delete(AbstractDao dao,
java.lang.Object entity)
Deletes the given entity from the database.
|
static void |
deleteByCondition(AbstractDao dao,
WhereCondition cond,
WhereCondition... condmore)
Deletes all matching entities without detaching them from the identity scope (aka session/cache).
|
static java.util.List |
getList(AbstractDao dao) |
static java.util.List |
getList(AbstractDao dao,
boolean isAsc,
Property... orderProperty)
Executes the query and returns the result as a list containing all entities loaded into memory.
|
static java.util.List |
getList(AbstractDao dao,
Property... orderProperty) |
static java.util.List |
getList(AbstractDao dao,
Property orderProperty,
WhereCondition whereCondition,
WhereCondition... whereConditions)
Executes the query and returns the result as a list containing all entities loaded into memory.
|
static java.util.List |
getList(AbstractDao dao,
WhereCondition whereCondition,
WhereCondition... whereConditions) |
static QueryBuilder |
getQueryBuilder(AbstractDao dao,
WhereCondition cond,
WhereCondition... condmore) |
static void |
insert(AbstractDao dao,
java.util.List entities)
Insert an entity into the table associated with a concrete DAO.
|
static void |
insert(AbstractDao dao,
java.lang.Object entity)
Insert an entity into the table associated with a concrete DAO.
|
static void |
insertOrReplace(AbstractDao dao,
java.util.List entities) |
static void |
insertOrReplace(AbstractDao dao,
java.lang.Object entity) |
static Query |
query(AbstractDao dao,
java.lang.String queryString)
Creates a repeatable Query object based on the given raw SQL where you can pass any WHERE clause and arguments.
|
static Query |
query(AbstractDao dao,
java.lang.String queryString,
java.lang.String queryValue)
Creates a repeatable Query object based on the given raw SQL where you can pass any WHERE clause and arguments.
|
static LazyList |
queryBuilderLazyList(AbstractDao dao,
WhereCondition cond,
WhereCondition... condmore)
Executes the query and returns the result as a list that lazy loads the entities on first access.
|
static java.util.List |
queryBuilderList(AbstractDao dao,
WhereCondition cond,
WhereCondition... condmore) |
static void |
setIsLog(boolean isLog)
Set if the greendao will log the resulting SQL command and the passed values when calling one of the build methods.
|
public static void setIsLog(boolean isLog)
isLog
- public static java.util.List getList(AbstractDao dao, Property orderProperty, WhereCondition whereCondition, WhereCondition... whereConditions)
dao
- orderProperty
- whereCondition
- whereConditions
- public static java.util.List getList(AbstractDao dao, WhereCondition whereCondition, WhereCondition... whereConditions)
dao
- whereCondition
- whereConditions
- #getList(de.greenrobot.dao.AbstractDao, de.greenrobot.dao.Property, de.greenrobot.dao.query.WhereCondition, de.greenrobot.dao.query.WhereCondition...)
public static java.util.List getList(AbstractDao dao, Property... orderProperty)
dao
- orderProperty
- #getList(de.greenrobot.dao.AbstractDao, de.greenrobot.dao.Property, de.greenrobot.dao.query.WhereCondition, de.greenrobot.dao.query.WhereCondition...)
public static java.util.List getList(AbstractDao dao, boolean isAsc, Property... orderProperty)
dao
- isAsc
- orderProperty
- public static java.util.List getList(AbstractDao dao)
dao
- #getList(de.greenrobot.dao.AbstractDao, de.greenrobot.dao.Property, de.greenrobot.dao.query.WhereCondition, de.greenrobot.dao.query.WhereCondition...)
public static java.util.List queryBuilderList(AbstractDao dao, WhereCondition cond, WhereCondition... condmore)
dao
- cond
- condmore
- #getList(de.greenrobot.dao.AbstractDao, de.greenrobot.dao.Property, de.greenrobot.dao.query.WhereCondition, de.greenrobot.dao.query.WhereCondition...)
public static LazyList queryBuilderLazyList(AbstractDao dao, WhereCondition cond, WhereCondition... condmore)
dao
- cond
- condmore
- public static Query query(AbstractDao dao, java.lang.String queryString, java.lang.String queryValue)
dao
- queryString
- queryValue
- public static Query query(AbstractDao dao, java.lang.String queryString)
dao
- queryString
- public static void insert(AbstractDao dao, java.lang.Object entity)
dao
- entity
- public static void insert(AbstractDao dao, java.util.List entities)
dao
- entities
- public static void insertOrReplace(AbstractDao dao, java.lang.Object entity)
public static void insertOrReplace(AbstractDao dao, java.util.List entities)
public static void delete(AbstractDao dao, java.lang.Object entity)
dao
- entity
- public static void delete(AbstractDao dao, java.util.List entities)
dao
- entities
- public static QueryBuilder getQueryBuilder(AbstractDao dao, WhereCondition cond, WhereCondition... condmore)
public static void deleteByCondition(AbstractDao dao, WhereCondition cond, WhereCondition... condmore)
dao
- cond
- condmore
-