本文整理了Java中io.ebean.Query.findCount
方法的一些代码示例,展示了Query.findCount
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Query.findCount
方法的具体详情如下:
包路径:io.ebean.Query
类名称:Query
方法名:findCount
[英]Return the count of entities this query should return.
This is the number of 'top level' or 'root level' entities.
[中]Return此查询应返回的实体数。
这是“顶级”或“根级”实体的数量。
代码示例来源:origin: ebean-orm/ebean
@Override
public int findCount() {
return query.findCount();
}
代码示例来源:origin: ebean-orm/ebean
@Override
public int findCount() {
return rootQuery.findCount();
}
代码示例来源:origin: org.actframework/act-ebean2
@Override
public long count() {
return q.findCount();
}
代码示例来源:origin: io.ebean/ebean
@Override
public int findCount() {
return query.findCount();
}
代码示例来源:origin: org.actframework/act-ebean
@Override
public int findCount() {
return qReadOnly.findCount();
}
代码示例来源:origin: org.actframework/act-ebean2
@Override
public int findCount() {
return q.findCount();
}
代码示例来源:origin: io.ebean/ebean
@Override
public int findCount() {
return rootQuery.findCount();
}
代码示例来源:origin: org.actframework/act-ebean
@Override
public long count() {
return qReadOnly.findCount();
}
代码示例来源:origin: io.ebean/ebean-querybean
/**
* Return the count of entities this query should return.
* <p>
* This is the number of 'top level' or 'root level' entities.
* </p>
*/
@Nonnull
public int findCount() {
return query.findCount();
}
代码示例来源:origin: io.github.hexagonframework.data/spring-data-ebean
boolean isExists() {
if (queryType == QUERY) {
return ((Query) queryInstance).findCount() > 0;
}
throw new IllegalArgumentException("query not supported!");
}
代码示例来源:origin: hexagonframework/spring-data-ebean
boolean isExists() {
if (queryType == QUERY) {
return ((Query) queryInstance).findCount() > 0;
}
throw new IllegalArgumentException("query not supported!");
}
代码示例来源:origin: icode/ameba
/**
* Returns the number of entities this query should return.
*
* @return a int.
*/
public int findCount() {
return query().findCount();
}
代码示例来源:origin: nz.net.osnz.common/common-ebean
/**
* Count all records by passing a closure
*
* @param consumer is a closure to set up the query
* @return the total size of query result
*/
public int countAllBy(Consumer<Query> consumer) {
return buildQuery(consumer).findCount();
}
代码示例来源:origin: hexagonframework/spring-data-ebean
@Override
public <S extends T> long count(Example<S> example) {
return queryByExample(example).findCount();
}
代码示例来源:origin: hexagonframework/spring-data-ebean
@Override
public <S extends T> boolean exists(Example<S> example) {
return queryByExample(example).findCount() > 0;
}
代码示例来源:origin: io.github.hexagonframework.data/spring-data-ebean
@Override
public <S extends T> long count(Example<S> example) {
return queryByExample(example).findCount();
}
代码示例来源:origin: io.github.hexagonframework.data/spring-data-ebean
@Override
public <S extends T> boolean exists(Example<S> example) {
return queryByExample(example).findCount() > 0;
}
代码示例来源:origin: io.github.hexagonframework.data/spring-data-ebean
@Override
public long count() {
return query().findCount();
}
代码示例来源:origin: hexagonframework/spring-data-ebean
@Override
public long count() {
return query().findCount();
}
代码示例来源:origin: icode/ameba
/**
* <p>applyRowCountHeader.</p>
*
* @param headerParams a {@link javax.ws.rs.core.MultivaluedMap} object.
* @param query a {@link io.ebean.Query} object.
* @param rowCount a {@link io.ebean.FutureRowCount} object.
*/
public static void applyRowCountHeader(MultivaluedMap<String, Object> headerParams, Query query, FutureRowCount rowCount) {
if (rowCount != null) {
try {
headerParams.putSingle(REQ_TOTAL_COUNT_HEADER_NAME, rowCount.get());
} catch (InterruptedException | ExecutionException e) {
headerParams.putSingle(REQ_TOTAL_COUNT_HEADER_NAME, query.findCount());
}
}
}
内容来源于网络,如有侵权,请联系作者删除!