Class MongoDatabase
java.lang.Object
us.irdev.bedrock.database.MongoDatabase
- All Implemented Interfaces:
AutoCloseable
,Interface
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
static Map
<String, MongoDatabase> connect
(com.mongodb.ConnectionString connectionString, String databaseName, String... collectionNames) static Map
<String, MongoDatabase> static Map
<String, MongoDatabase> static MongoDatabase
connectLocal
(String collectionName) static Map
<String, MongoDatabase> connectLocal
(String databaseName, String... collectionNames) deleteMany
(String queryJson) void
drop()
getAll()
long
getCount()
getName()
-
Field Details
-
CONNECTION_STRING
- See Also:
-
DATABASE_NAME
- See Also:
-
COLLECTION_NAME
- See Also:
-
COLLECTION_NAMES
- See Also:
-
-
Method Details
-
getDatabaseName
- Returns:
-
getCollectionName
- Returns:
-
connect
public static Map<String,MongoDatabase> connect(com.mongodb.ConnectionString connectionString, String databaseName, String... collectionNames) - Parameters:
connectionString
-databaseName
-collectionNames
-- Returns:
-
connect
-
connectLocal
public static Map<String,MongoDatabase> connectLocal(String databaseName, String... collectionNames) - Parameters:
databaseName
-collectionNames
-- Returns:
-
connectLocal
- Parameters:
collectionName
-- Returns:
-
connect
- Parameters:
configuration
-- Returns:
-
put
-
putMany
-
get
-
getMany
-
getAll
-
delete
-
deleteMany
- Specified by:
deleteMany
in interfaceInterface
- Parameters:
queryJson
-- Returns:
-
deleteAll
-
drop
-
close
- Specified by:
close
in interfaceAutoCloseable
- Throws:
Exception
-
getCount
-
getName
-