/** * Gets MonogoDB database object. It does not auto-creates database if given db name does not * corresponds to any db's. * * @param dbName name of database * @return MongoDB databaase object or null if base does not exists. * * This method is depricated. Use getDatabase(String dbName) instead. * @deprecated this method should be used only to get databases for GridFs * * TODO remove this method */ @Deprecated public DB getDB(String dbName) { return getDB(dbName, false); }
/** * Gets MonogoDB database object. It does not auto-creates database if given db name does not * corresponds to any db's. * * @param dbName name of database * @return MongoDB databaase object or null if base does not exists. * * This method is depricated. Use getDatabase(String dbName) instead. * @deprecated this method should be used only to get databases for GridFs * * TODO remove this method */ @Deprecated public DB getDB(String dbName) { return getDB(dbName, false); }
private Set<String> getCollectionsList(String dbName) { Set<String> result = Collections.emptySet(); DB db = getDB(dbName); if (db != null) { result = db.getCollectionNames(); } return result; }
private Set<String> getCollectionsList(String dbName) { Set<String> result = Collections.emptySet(); DB db = getDB(dbName); if (db != null) { result = db.getCollectionNames(); } return result; }
private GridFS getGridFS(DBKey dbKey) { final String dbName = MongoDBClient.getDbName(dbKey.getCompany(), dbKey.getProject()); return new GridFS(client.getDB(dbName, true), ARTIFACTS_COLLECTION_NAME); } }
private GridFS getGridFS(DBKey dbKey) { final String dbName = MongoDBClient.getDbName(dbKey.getCompany(), dbKey.getProject()); return new GridFS(client.getDB(dbName, true), ARTIFACTS_COLLECTION_NAME); } }