本文整理了Java中org.mongodb.morphia.query.Query.getOffset
方法的一些代码示例,展示了Query.getOffset
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Query.getOffset
方法的具体详情如下:
包路径:org.mongodb.morphia.query.Query
类名称:Query
方法名:getOffset
暂无
代码示例来源:origin: org.actframework/act-morphia
@Override
public int getOffset() {
return mq.getOffset();
}
代码示例来源:origin: org.mongodb.morphia/morphia
@Override
public <T> WriteResult delete(final Query<T> query, final DeleteOptions options) {
DBCollection dbColl = query.getCollection();
// TODO remove this after testing.
if (dbColl == null) {
dbColl = getCollection(query.getEntityClass());
}
if (query.getSortObject() != null || query.getOffset() != 0 || query.getLimit() > 0) {
throw new QueryException("Delete does not allow sort/offset/limit query options.");
}
return dbColl.remove(query.getQueryObject(), enforceWriteConcern(options, query.getEntityClass()).getOptions());
}
代码示例来源:origin: org.mongodb.morphia/morphia
throw new QueryException("sorting is not allowed for updates.");
if (query.getOffset() > 0) {
throw new QueryException("a query offset is not allowed for updates.");
代码示例来源:origin: org.mongodb.morphia/morphia
@SuppressWarnings("deprecation")
MapReduceCommand toCommand(final Mapper mapper) {
if (query.getOffset() != 0 || query.getFieldsObject() != null) {
throw new QueryException("mapReduce does not allow the offset/retrievedFields query ");
}
final DBCollection dbColl = inputCollection != null ? getQuery().getCollection().getDB().getCollection(inputCollection)
: query.getCollection();
final String target = outputCollection != null ? outputCollection : mapper.getMappedClass(resultType).getCollectionName();
final MapReduceCommand command = new MapReduceCommand(dbColl, map, reduce, target, outputType, query.getQueryObject());
command.setBypassDocumentValidation(bypassDocumentValidation);
command.setCollation(collation);
command.setFinalize(finalize);
command.setJsMode(jsMode);
command.setLimit(limit);
command.setMaxTime(maxTimeMS, TimeUnit.MILLISECONDS);
command.setOutputDB(outputDB);
command.setReadPreference(readPreference);
command.setScope(scope);
command.setSort(query.getSortObject());
command.setVerbose(verbose);
return command;
}
}
代码示例来源:origin: org.mongodb.morphia/morphia
Assert.parameterNotEmpty("reduce", baseCommand.getReduce());
if (query.getOffset() != 0 || query.getFieldsObject() != null) {
throw new QueryException("mapReduce does not allow the offset/retrievedFields query options.");
内容来源于网络,如有侵权,请联系作者删除!