com.mongodb.DBCollection#getName ( )源码实例Demo

下面列出了com.mongodb.DBCollection#getName ( ) 实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。

源代码1 项目: hvdf   文件: PeriodicAllocator.java
@Override
public DBCollection getPreviousWithLimit(DBCollection current, long minTime) {
	
	// figure out the current timeslice
	String currentName = current.getName();
	long currSuffix = getSuffix(currentName);
	
	// If minTime is before the lower bound of this collection,
	// just get the collection with the previous suffix
	if(minTime < currSuffix*this.period){
		return db.getCollection(this.prefix + (currSuffix - 1));
	}

	return null;
}
 
源代码2 项目: scava   文件: PongoFactory.java
protected String getFullyQualifiedId(DBObject dbObject, DBCollection dbCollection) {
	if (dbCollection == null) return null;
	return dbCollection.getDB().getName() + "." + dbCollection.getName() + "." + dbObject.get("_id");
}