List of usage examples for com.mongodb Mongo getDB
@Deprecated public DB getDB(final String dbName)
From source file:com.linuxbox.enkive.workspace.mongo.MongoSearchResultBuilder.java
License:Open Source License
public MongoSearchResultBuilder(Mongo m, String searchResultsDBName, String searchResultsCollName, SearchQueryBuilder queryBuilder) { this(m.getDB(searchResultsDBName).getCollection(searchResultsCollName), queryBuilder); }
From source file:com.linuxbox.enkive.workspace.mongo.MongoSearchResultUtils.java
License:Open Source License
public MongoSearchResultUtils(Mongo m, String messageDB, String messageCollName, String searchResultCollName) { DB messageDb = m.getDB(messageDB); this.messageColl = messageDb.getCollection(messageCollName); this.searchResultColl = messageDb.getCollection(searchResultCollName); }
From source file:com.linuxbox.enkive.workspace.mongo.MongoWorkspaceBuilder.java
License:Open Source License
public MongoWorkspaceBuilder(Mongo m, String dbName, String workspaceCollName, SearchResultBuilder searchResultBuilder, SearchFolderBuilder searchFolderBuilder) { this(m.getDB(dbName).getCollection(workspaceCollName), searchResultBuilder, searchFolderBuilder); }
From source file:com.linuxbox.enkive.workspace.mongo.MongoWorkspaceService.java
License:Open Source License
public MongoWorkspaceService(Mongo m, String dbName, String userWorkspacesCollName) { DB workspaceDb = m.getDB(dbName); userWorkspacesColl = workspaceDb.getCollection(userWorkspacesCollName); }
From source file:com.linuxbox.enkive.workspace.searchFolder.mongo.MongoSearchFolderBuilder.java
License:Open Source License
public MongoSearchFolderBuilder(Mongo m, String searchFolderDBName, String searchFolderCollName, SearchFolderSearchResultBuilder searchResultBuilder) { this(m.getDB(searchFolderDBName).getCollection(searchFolderCollName), searchResultBuilder); }
From source file:com.linuxbox.enkive.workspace.searchFolder.mongo.MongoSearchFolderSearchResult.java
License:Open Source License
public MongoSearchFolderSearchResult(Mongo m, String searchFolderSearchResultsDBName, String searchFolderSearchResultsCollName) { this(m.getDB(searchFolderSearchResultsDBName).getCollection(searchFolderSearchResultsCollName)); }
From source file:com.linuxbox.enkive.workspace.searchFolder.mongo.MongoSearchFolderSearchResultBuilder.java
License:Open Source License
MongoSearchFolderSearchResultBuilder(Mongo m, String searchFolderSearchResultDBName, String searchFolderSearchResultCollName) { this(m.getDB(searchFolderSearchResultDBName).getCollection(searchFolderSearchResultCollName)); }
From source file:com.linuxbox.util.lockservice.mongodb.MongoLockService.java
License:Open Source License
public MongoLockService(Mongo mongo, String database, String collection) { this(mongo, mongo.getDB(database).getCollection(collection)); }
From source file:com.linuxbox.util.mongodb.Dropper.java
License:Open Source License
public static void dropDatabase(String dbName) throws UnknownHostException, MongoException { Mongo m = new Mongo(); DB db = m.getDB(dbName); db.dropDatabase();/*from www . j a v a 2 s . c o m*/ }
From source file:com.linuxbox.util.mongodb.Dropper.java
License:Open Source License
public static void dropCollection(String dbName, String collection) throws UnknownHostException, MongoException { Mongo m = new Mongo(); DB db = m.getDB(dbName); DBCollection c = db.getCollection(collection); c.drop();//from ww w.j a v a 2 s .com }