本文整理了Java中org.apache.usergrid.persistence.Query.getLimit
方法的一些代码示例,展示了Query.getLimit
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Query.getLimit
方法的具体详情如下:
包路径:org.apache.usergrid.persistence.Query
类名称:Query
方法名:getLimit
暂无
代码示例来源:origin: apache/usergrid
public int getLimit() {
return getLimit( DEFAULT_LIMIT );
}
代码示例来源:origin: apache/usergrid
int limit = p.getQuery().getLimit();
if ( limit != Query.DEFAULT_LIMIT ) {
if ( has_prev_param ) {
代码示例来源:origin: apache/usergrid
@Override
protected Observable<ResultsPage<ConnectionRef>> buildNewResultsPage( final Optional<String> cursor ) {
//we need the callback so as we get a new cursor, we execute a new search and re-initialize our builders
final ConnectionSearch search =
new ConnectionSearch( applicationScope, sourceId, entityType, connection, toExecute.getLimit(),
queryString, cursor, isConnecting );
search.setAnalyzeOnly(analyzeOnly);
search.setReturnQuery(returnQuery);
return connectionService.searchConnectionAsRefs( search );
}
}.next();
代码示例来源:origin: apache/usergrid
@Override
protected Observable<ResultsPage<org.apache.usergrid.persistence.model.entity.Entity>> buildNewResultsPage(
final Optional<String> cursor ) {
//we need the callback so as we get a new cursor, we execute a new search and re-initialize our builders
final ConnectionSearch search =
new ConnectionSearch( applicationScope, sourceId, entityType, connection, toExecute.getLimit(),
queryString, cursor, isConnecting );
search.setAnalyzeOnly(analyzeOnly);
search.setReturnQuery(returnQuery);
return connectionService.searchConnection( search );
}
}.next();
代码示例来源:origin: apache/usergrid
@Override
protected Observable<ResultsPage<Id>> buildNewResultsPage(
final Optional<String> cursor ) {
final CollectionSearch search =
new CollectionSearch( applicationScope, ownerId, collectionName, collection.getType(), toExecute.getLimit(),
queryString, cursor );
search.setAnalyzeOnly(analyzeOnly);
search.setReturnQuery(returnQuery);
return collectionService.searchCollectionIds( search );
}
}.next();
代码示例来源:origin: apache/usergrid
@Override
protected Observable<ResultsPage<org.apache.usergrid.persistence.model.entity.Entity>> buildNewResultsPage(
final Optional<String> cursor ) {
final CollectionSearch search =
new CollectionSearch( applicationScope, ownerId, collectionName, collection.getType(), toExecute.getLimit(),
queryString, cursor );
search.setAnalyzeOnly(analyzeOnly);
search.setReturnQuery(returnQuery);
IndexConsistency indexConsistency = getIndexConsistencyForType(collectionName);
search.setKeepStaleEntries(indexConsistency == IndexConsistency.LATEST);
return collectionService.searchCollection( search );
}
}.next();
代码示例来源:origin: apache/usergrid
int count = query.getLimit();
Level level = Level.REFS;
query.setLimit( query.getLimit( count ) );
query.setResultsLevel( level );
代码示例来源:origin: apache/usergrid
assertEquals( query.getLimit(), r.size() );
代码示例来源:origin: apache/usergrid
@Override
public ServiceResults deleteItemsByQuery( ServiceContext context, Query query ) throws Exception {
checkPermissionsForCollection( context );
if ( context.moreParameters() ) {
return getItemsByQuery( context, query );
}
query = new Query( query );
query.setResultsLevel( Level.ALL_PROPERTIES );
query.setLimit( query.getLimit() );
if ( !query.isReversedSet() ) {
query.setReversed( isCollectionReversed( context ) );
}
Results r = em.searchCollection( context.getOwner(), context.getCollectionName(), query );
importEntities( context, r );
for ( Entity entity : r ) {
prepareToDelete( context, entity );
}
for ( Entity entity : r ) {
em.removeFromCollection( context.getOwner(), context.getCollectionName(), entity );
}
return new ServiceResults( this, context, Type.COLLECTION, r, null, null );
}
代码示例来源:origin: apache/usergrid
query.setLimit( query.getLimit( count ) );
内容来源于网络,如有侵权,请联系作者删除!