本文整理汇总了Java中com.avaje.ebean.ExpressionList.findRowCount方法的典型用法代码示例。如果您正苦于以下问题:Java ExpressionList.findRowCount方法的具体用法?Java ExpressionList.findRowCount怎么用?Java ExpressionList.findRowCount使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.avaje.ebean.ExpressionList
的用法示例。
在下文中一共展示了ExpressionList.findRowCount方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: existsByAuthUserIdentity
import com.avaje.ebean.ExpressionList; //导入方法依赖的package包/类
public static boolean existsByAuthUserIdentity(
final AuthUserIdentity identity) {
final ExpressionList<User> exp;
if (identity instanceof UsernamePasswordAuthUser) {
exp = getUsernamePasswordAuthUserFind((UsernamePasswordAuthUser) identity);
} else {
exp = getAuthUserFind(identity);
}
return exp.findRowCount() > 0;
}
示例2: getRequirementAsOpenDefectCountByPE
import com.avaje.ebean.ExpressionList; //导入方法依赖的package包/类
/**
* Get the total number of open and direct defects of a portfolio entry.
*
* @param portfolioEntryId
* the portfolio entry id
* @param isBlocker
* if true: get only blocker defects, if false: get only
* non-blocker defects, if null: get all defects
*/
public static Integer getRequirementAsOpenDefectCountByPE(Long portfolioEntryId, Boolean isBlocker) {
ExpressionList<Requirement> expr = RequirementDAO.findRequirement.where().eq("deleted", false).eq("portfolioEntry.id", portfolioEntryId)
.eq("isDefect", true).ne("requirementStatus.type", RequirementStatus.Type.CLOSED)
.ne("requirementStatus.type", RequirementStatus.Type.DEPLOYED);
if (isBlocker != null) {
expr = expr.eq("requirementSeverity.isBlocker", isBlocker);
}
return expr.findRowCount();
}
示例3: getRequirementAsCountByPEAndIsScoped
import com.avaje.ebean.ExpressionList; //导入方法依赖的package包/类
/**
* Get the total number of direct requirements of a portfolio entry
* according to the isScoped value.
*
* @param portfolioEntryId
* the portfolio entry id
* @param isScoped
* if true: get only the scoped requirements, if false: get only
* the non-scoped requirements, if null: get all requirements
*/
public static Integer getRequirementAsCountByPEAndIsScoped(Long portfolioEntryId, Boolean isScoped) {
ExpressionList<Requirement> expr = RequirementDAO.findRequirement.where().eq("deleted", false).eq("portfolioEntry.id", portfolioEntryId);
if (isScoped != null) {
expr = expr.eq("isScoped", isScoped);
}
return expr.findRowCount();
}
示例4: existsByAuthUserIdentity
import com.avaje.ebean.ExpressionList; //导入方法依赖的package包/类
public static boolean existsByAuthUserIdentity(
final AuthUserIdentity identity) {
final ExpressionList<User> exp = getAuthUserFind(identity);
return exp.findRowCount() > 0;
}
示例5: Pagination
import com.avaje.ebean.ExpressionList; //导入方法依赖的package包/类
/**
* Creates a Pagination object using the specified {@link ExpressionList}
* and a specific page size.
*
* @param expressionList
* @param pageSize
* the number of records in one page
* @param numberOfLinksInNavigationBar
* the number of links (possible pages to navigate to) displayed
* in the navigation bar
*/
public Pagination(ExpressionList<T> expressionList, int pageSize, int numberOfLinksInNavigationBar) {
this.pageSize = pageSize;
this.expressionList = expressionList;
this.numberOfLinksInNavigationBar = numberOfLinksInNavigationBar;
this.rowCount = expressionList.findRowCount();
computeNumberOfPages(pageSize);
}