Class MongoManager
java.lang.Object
id.luckynetwork.lyrams.lyralibs.core.database.mongo.MongoManager
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncom.mongodb.client.MongoCollection<org.bson.Document>getCollection(String key) If the collection is not loaded, load itvoidloadCollection(String key) It loads a collection from the database and stores it in a hashmap
-
Constructor Details
-
MongoManager
-
-
Method Details
-
loadCollection
It loads a collection from the database and stores it in a hashmap- Parameters:
key- The name of the collection to load
-
getCollection
If the collection is not loaded, load it- Parameters:
key- The name of the collection you want to get- Returns:
- A MongoCollection object
-