本文整理匯總了Java中de.greenrobot.dao.query.QueryBuilder.count方法的典型用法代碼示例。如果您正苦於以下問題:Java QueryBuilder.count方法的具體用法?Java QueryBuilder.count怎麽用?Java QueryBuilder.count使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類de.greenrobot.dao.query.QueryBuilder
的用法示例。
在下文中一共展示了QueryBuilder.count方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: getCount4
import de.greenrobot.dao.query.QueryBuilder; //導入方法依賴的package包/類
public int getCount4(WhereCondition wherecondition, WhereCondition wherecondition1, WhereCondition wherecondition2, WhereCondition wherecondition3)
{
QueryBuilder querybuilder = DaoManager.getInstance().getLuaListDao().queryBuilder();
querybuilder.where(wherecondition, new WhereCondition[0]);
if (wherecondition1 != null)
{
querybuilder.where(wherecondition1, new WhereCondition[0]);
}
if (wherecondition2 != null)
{
querybuilder.where(wherecondition2, new WhereCondition[0]);
}
if (wherecondition2 != null)
{
querybuilder.where(wherecondition2, new WhereCondition[0]);
}
return (int)querybuilder.count();
}
示例2: isMealItemAlreadyExistingForMeal
import de.greenrobot.dao.query.QueryBuilder; //導入方法依賴的package包/類
private boolean isMealItemAlreadyExistingForMeal(Long mealId, String item) {
if (mealId == null || item == null) {
return true;
}
QueryBuilder<MealItem> queryBuilder = mDao.getMealItemDao().queryBuilder();
queryBuilder.where(MealItemDao.Properties.MealId.eq(mealId), MealItemDao.Properties.Item.eq(item));
return queryBuilder.count() > 0;
}
示例3: getCount
import de.greenrobot.dao.query.QueryBuilder; //導入方法依賴的package包/類
public int getCount(WhereCondition wherecondition, WhereCondition wherecondition1)
{
QueryBuilder querybuilder = DaoManager.getInstance().getLuaListDao().queryBuilder();
querybuilder.where(wherecondition, new WhereCondition[0]);
if (wherecondition1 != null)
{
querybuilder.where(wherecondition1, new WhereCondition[0]);
}
return (int)querybuilder.count();
}
示例4: queryCount
import de.greenrobot.dao.query.QueryBuilder; //導入方法依賴的package包/類
public int queryCount(QueryBuilder querybuilder)
{
return (int)querybuilder.count();
}