本文整理汇总了Java中de.greenrobot.dao.AbstractDao.queryBuilder方法的典型用法代码示例。如果您正苦于以下问题:Java AbstractDao.queryBuilder方法的具体用法?Java AbstractDao.queryBuilder怎么用?Java AbstractDao.queryBuilder使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类de.greenrobot.dao.AbstractDao
的用法示例。
在下文中一共展示了AbstractDao.queryBuilder方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getList
import de.greenrobot.dao.AbstractDao; //导入方法依赖的package包/类
public static List getList(AbstractDao dao, boolean isAsc, Property... orderProperty) {
setIfLog();
QueryBuilder queryBuilder = dao.queryBuilder();
if (isAsc) {
queryBuilder = queryBuilder.orderAsc(orderProperty);
} else {
queryBuilder = queryBuilder.orderDesc(orderProperty);
}
List indexFavList = queryBuilder.list();
return indexFavList;
}
示例2: getList
import de.greenrobot.dao.AbstractDao; //导入方法依赖的package包/类
/**
* Executes the query and returns the result as a list containing all entities loaded into memory.
* @param dao
* @param isAsc
* @param orderProperty
* @return
*/
public static List getList(AbstractDao dao, boolean isAsc, Property... orderProperty) {
setIfLog();
QueryBuilder queryBuilder = dao.queryBuilder();
if (isAsc) {
queryBuilder = queryBuilder.orderAsc(orderProperty);
} else {
queryBuilder = queryBuilder.orderDesc(orderProperty);
}
List indexFavList = queryBuilder.list();
return indexFavList;
}
示例3: getQueryBuilder
import de.greenrobot.dao.AbstractDao; //导入方法依赖的package包/类
public static QueryBuilder getQueryBuilder(AbstractDao dao, WhereCondition cond, WhereCondition... condmore) {
setIfLog();
QueryBuilder qb = dao.queryBuilder();
qb.where(cond, condmore);
return qb;
}
示例4: deleteByCondition
import de.greenrobot.dao.AbstractDao; //导入方法依赖的package包/类
public static void deleteByCondition(AbstractDao dao, WhereCondition cond, WhereCondition... condmore) {
setIfLog();
QueryBuilder qb = dao.queryBuilder();
qb.where(cond, condmore).buildDelete().executeDeleteWithoutDetachingEntities();
}
示例5: deleteByCondition
import de.greenrobot.dao.AbstractDao; //导入方法依赖的package包/类
/**
* 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.
* @param dao
* @param cond
* @param condmore
*/
public static void deleteByCondition(AbstractDao dao, WhereCondition cond, WhereCondition... condmore) {
setIfLog();
QueryBuilder qb = dao.queryBuilder();
qb.where(cond, condmore).buildDelete().executeDeleteWithoutDetachingEntities();
}