本文整理匯總了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();
}