當前位置: 首頁>>代碼示例>>Java>>正文


Java AbstractDao.queryBuilder方法代碼示例

本文整理匯總了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;
}
 
開發者ID:DroidKOF,項目名稱:pineapple,代碼行數:12,代碼來源:GreenDaoUtils.java

示例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;
}
 
開發者ID:cymcsg,項目名稱:UltimateAndroid,代碼行數:19,代碼來源:GreenDaoUtils.java

示例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;
}
 
開發者ID:DroidKOF,項目名稱:pineapple,代碼行數:7,代碼來源:GreenDaoUtils.java

示例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();

}
 
開發者ID:DroidKOF,項目名稱:pineapple,代碼行數:7,代碼來源:GreenDaoUtils.java

示例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();

}
 
開發者ID:cymcsg,項目名稱:UltimateAndroid,代碼行數:15,代碼來源:GreenDaoUtils.java


注:本文中的de.greenrobot.dao.AbstractDao.queryBuilder方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。