Class MongoDbObject

  • All Implemented Interfaces:
    NoSqlObject<com.mongodb.BasicDBObject>

    public final class MongoDbObject
    extends java.lang.Object
    implements NoSqlObject<com.mongodb.BasicDBObject>
    The MongoDB implementation of NoSqlObject.
    • Constructor Summary

      Constructors 
      Constructor Description
      MongoDbObject()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void set​(java.lang.String field, java.lang.Object value)
      Sets the value of a property on this object to a String or primitive.
      void set​(java.lang.String field, java.lang.Object[] values)
      Sets the value of a property on this object to an array of Strings or primitives.
      void set​(java.lang.String field, NoSqlObject<com.mongodb.BasicDBObject> value)
      Sets the value of a property on this object to a nested complex object.
      void set​(java.lang.String field, NoSqlObject<com.mongodb.BasicDBObject>[] values)
      Sets the value of a property on this object to an array of nested complex objects.
      com.mongodb.BasicDBObject unwrap()
      Obtains the underlying NoSQL library-specific object that this object wraps.
      • Methods inherited from class java.lang.Object

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

      • MongoDbObject

        public MongoDbObject()
    • Method Detail

      • set

        public void set​(java.lang.String field,
                        java.lang.Object value)
        Description copied from interface: NoSqlObject
        Sets the value of a property on this object to a String or primitive.
        Specified by:
        set in interface NoSqlObject<com.mongodb.BasicDBObject>
        Parameters:
        field - The name of the property
        value - The value of the property
      • set

        public void set​(java.lang.String field,
                        NoSqlObject<com.mongodb.BasicDBObject> value)
        Description copied from interface: NoSqlObject
        Sets the value of a property on this object to a nested complex object.
        Specified by:
        set in interface NoSqlObject<com.mongodb.BasicDBObject>
        Parameters:
        field - The name of the property
        value - The value of the property
      • set

        public void set​(java.lang.String field,
                        java.lang.Object[] values)
        Description copied from interface: NoSqlObject
        Sets the value of a property on this object to an array of Strings or primitives.
        Specified by:
        set in interface NoSqlObject<com.mongodb.BasicDBObject>
        Parameters:
        field - The name of the property
        values - The values for the property
      • set

        public void set​(java.lang.String field,
                        NoSqlObject<com.mongodb.BasicDBObject>[] values)
        Description copied from interface: NoSqlObject
        Sets the value of a property on this object to an array of nested complex objects.
        Specified by:
        set in interface NoSqlObject<com.mongodb.BasicDBObject>
        Parameters:
        field - The name of the property
        values - The values for the property
      • unwrap

        public com.mongodb.BasicDBObject unwrap()
        Description copied from interface: NoSqlObject
        Obtains the underlying NoSQL library-specific object that this object wraps.
        Specified by:
        unwrap in interface NoSqlObject<com.mongodb.BasicDBObject>
        Returns:
        the wrapped object.