Class MongoOperator
java.lang.Object
com.barden.library.database.mongo.utils.MongoOperator
Mongo document mapper.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic org.bson.DocumentSets key and value then return as a document.static org.bson.DocumentSets key and value then return as a document.static org.bson.DocumentUnsets key and value then return as a document.static org.bson.DocumentUnsets key and value then return as a document.
-
Constructor Details
-
MongoOperator
public MongoOperator()
-
-
Method Details
-
set
Sets key and value then return as a document.- Parameters:
key- Key.value- Value.- Returns:
- Document.
-
set
@Nonnull public static org.bson.Document set(@Nonnull org.bson.Document document, @Nonnull String key, @Nonnull Object value) Sets key and value then return as a document.- Parameters:
document- Document.key- Key.value- Value.- Returns:
- Document.
-
unset
Unsets key and value then return as a document.- Parameters:
key- Key.- Returns:
- Document.
-
unset
@Nonnull public static org.bson.Document unset(@Nonnull org.bson.Document document, @Nonnull String key) Unsets key and value then return as a document.- Parameters:
document- Document.key- Key.- Returns:
- Document.
-