Package com.mongodb

Class ReflectionDBObject.JavaWrapper

  • Enclosing class:
    ReflectionDBObject

    @Deprecated(since="2021-05-27")
    public static class ReflectionDBObject.JavaWrapper
    extends java.lang.Object
    Deprecated.
    Usage of this API is not supported in AEM as a Cloud Service.
    Represents a wrapper around the DBObject to interface with the Class fields
    • Method Summary

      All Methods Instance Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      boolean containsKey​(java.lang.String key)
      Deprecated. 
      java.lang.Object get​(ReflectionDBObject document, java.lang.String fieldName)
      Deprecated.
      Gets the value for the given field from the given document.
      java.util.Set<java.lang.String> keySet()
      Deprecated.
      Gets all the fields on this object.
      java.lang.Object set​(ReflectionDBObject document, java.lang.String fieldName, java.lang.Object value)
      Deprecated.
      Adds or sets the given field to the given value on the document.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • keySet

        public java.util.Set<java.lang.String> keySet()
        Deprecated.
        Gets all the fields on this object.
        Returns:
        a Set of all the field names.
      • containsKey

        @Deprecated
        public boolean containsKey​(java.lang.String key)
        Deprecated.
        Whether the document this represents contains the given field.
        Parameters:
        key - a field name
        Returns:
        true if the key exists
      • get

        @Nullable
        public java.lang.Object get​(ReflectionDBObject document,
                                    java.lang.String fieldName)
        Deprecated.
        Gets the value for the given field from the given document.
        Parameters:
        document - a ReflectionDBObject representing a MongoDB document
        fieldName - the name of the field to get the value for
        Returns:
        the value for the given field name
      • set

        public java.lang.Object set​(ReflectionDBObject document,
                                    java.lang.String fieldName,
                                    java.lang.Object value)
        Deprecated.
        Adds or sets the given field to the given value on the document.
        Parameters:
        document - a ReflectionDBObject representing a MongoDB document
        fieldName - the name of the field to get the value for
        value - the value to set the field to
        Returns:
        the result of setting this value