本文整理了Java中com.mongodb.BasicDBObject.clone()
方法的一些代码示例,展示了BasicDBObject.clone()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。BasicDBObject.clone()
方法的具体详情如下:
包路径:com.mongodb.BasicDBObject
类名称:BasicDBObject
方法名:clone
暂无
代码示例来源:origin: jmkgreen/morphia
@Override
public QueryImpl<T> clone() {
QueryImpl<T> n = new QueryImpl<T>(clazz, dbColl, ds);
n.batchSize = batchSize;
n.cache = this.ds.getMapper().createEntityCache(); // fresh cache
n.fields = fields == null ? null : Arrays.copyOf(fields, fields.length);
n.includeFields = includeFields;
n.indexHint = indexHint;
n.limit = limit;
n.noTimeout = noTimeout;
n.query = n; // feels weird, correct?
n.offset = offset;
n.readPref = readPref;
n.snapshotted = snapshotted;
n.validateName = validateName;
n.validateType = validateType;
n.sort = (BasicDBObject) (sort == null ? null : sort.clone());
n.baseQuery = (BasicDBObject) (baseQuery == null ? null : baseQuery.clone());
// fields from superclass
n.attachedTo = attachedTo;
n.children = children == null ? null : new ArrayList<Criteria>(children);
n.tail = tail;
n.tail_await_data = tail_await_data;
return n;
}
代码示例来源:origin: com.google.code.maven-play-plugin.com.google.code.morphia/morphia
@Override
public QueryImpl<T> clone(){
QueryImpl<T> n = new QueryImpl<T>(clazz, dbColl, ds);
n.batchSize = batchSize;
n.cache = this.ds.getMapper().createEntityCache(); // fresh cache
n.fields = fields == null ? null : Arrays.copyOf(fields, fields.length);
n.includeFields = includeFields;
n.indexHint = indexHint;
n.limit = limit;
n.noTimeout = noTimeout;
n.query = n; // feels weird, correct?
n.offset = offset;
n.slaveOk = slaveOk;
n.snapshotted = snapshotted;
n.validateName = validateName;
n.validateType = validateType;
n.sort = (BasicDBObject) (sort == null ? null : sort.clone());
n.baseQuery = (BasicDBObject) (baseQuery == null ? null : baseQuery.clone());
// fields from superclass
n.attachedTo = attachedTo;
n.children = children == null ? null : new ArrayList<Criteria>(children);
n.tail = tail;
n.tail_await_data = tail_await_data;
return n;
}
代码示例来源:origin: com.google.code.morphia/morphia
@Override
public QueryImpl<T> clone() {
final QueryImpl<T> n = new QueryImpl<T>(clazz, dbColl, ds);
n.batchSize = batchSize;
n.cache = ds.getMapper().createEntityCache(); // fresh cache
n.fields = fields == null ? null : copy();
n.includeFields = includeFields;
n.indexHint = indexHint;
n.limit = limit;
n.noTimeout = noTimeout;
n.query = n; // feels weird, correct?
n.offset = offset;
n.readPref = readPref;
n.snapshotted = snapshotted;
n.validateName = validateName;
n.validateType = validateType;
n.sort = (BasicDBObject) (sort == null ? null : sort.clone());
n.baseQuery = (BasicDBObject) (baseQuery == null ? null : baseQuery.clone());
// fields from superclass
n.attachedTo = attachedTo;
n.children = children == null ? null : new ArrayList<Criteria>(children);
n.tail = tail;
n.tail_await_data = tail_await_data;
return n;
}
内容来源于网络,如有侵权,请联系作者删除!