Class MongoOperator

java.lang.Object
com.barden.library.database.mongo.utils.MongoOperator

public final class MongoOperator extends Object
Mongo document mapper.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static org.bson.Document
    set(String key, Object value)
    Sets key and value then return as a document.
    static org.bson.Document
    set(org.bson.Document document, String key, Object value)
    Sets key and value then return as a document.
    static org.bson.Document
    Unsets key and value then return as a document.
    static org.bson.Document
    unset(org.bson.Document document, String key)
    Unsets key and value then return as a document.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • MongoOperator

      public MongoOperator()
  • Method Details

    • set

      @Nonnull public static org.bson.Document set(@Nonnull String key, @Nonnull Object value)
      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

      @Nonnull public static org.bson.Document unset(@Nonnull String key)
      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.