Package com.mongodb
Class ReflectionDBObject
- java.lang.Object
-
- com.mongodb.ReflectionDBObject
-
- All Implemented Interfaces:
com.mongodb.DBObject
,org.bson.BSONObject
@Deprecated public abstract class ReflectionDBObject extends Object implements com.mongodb.DBObject
Deprecated.Replaced byPojoCodecProvider
This class enables to map simple Class fields to a BSON object fields
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ReflectionDBObject.JavaWrapper
Deprecated.Represents a wrapper around the DBObject to interface with the Class fields
-
Constructor Summary
Constructors Constructor Description ReflectionDBObject()
Deprecated.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description boolean
containsField(String fieldName)
Deprecated.boolean
containsKey(String key)
Deprecated.Object
get(String key)
Deprecated.Object
get_id()
Deprecated.Gets the _idstatic ReflectionDBObject.JavaWrapper
getWrapper(Class c)
Deprecated.Returns an existing Wrapper instance associated with a class, or creates a new one.static ReflectionDBObject.JavaWrapper
getWrapperIfReflectionObject(Class c)
Deprecated.Returns the wrapper if this object can be assigned from this class.boolean
isPartialObject()
Deprecated.Set<String>
keySet()
Deprecated.void
markAsPartialObject()
Deprecated.ReflectionDBObjects can't be partial.Object
put(String key, Object v)
Deprecated.void
putAll(Map m)
Deprecated.void
putAll(org.bson.BSONObject o)
Deprecated.Object
removeField(String key)
Deprecated.This operation is not supported.void
set_id(Object id)
Deprecated.Sets the _idMap
toMap()
Deprecated.
-
-
-
Method Detail
-
get
@Nullable public Object get(String key)
Deprecated.- Specified by:
get
in interfaceorg.bson.BSONObject
-
keySet
public Set<String> keySet()
Deprecated.- Specified by:
keySet
in interfaceorg.bson.BSONObject
-
containsKey
public boolean containsKey(String key)
Deprecated.- Specified by:
containsKey
in interfaceorg.bson.BSONObject
-
containsField
public boolean containsField(String fieldName)
Deprecated.- Specified by:
containsField
in interfaceorg.bson.BSONObject
-
put
public Object put(String key, Object v)
Deprecated.- Specified by:
put
in interfaceorg.bson.BSONObject
-
putAll
public void putAll(Map m)
Deprecated.- Specified by:
putAll
in interfaceorg.bson.BSONObject
-
putAll
public void putAll(org.bson.BSONObject o)
Deprecated.- Specified by:
putAll
in interfaceorg.bson.BSONObject
-
get_id
public Object get_id()
Deprecated.Gets the _id- Returns:
- the _id of this document
-
set_id
public void set_id(Object id)
Deprecated.Sets the _id- Parameters:
id
- the unique identifier for this DBObject
-
isPartialObject
public boolean isPartialObject()
Deprecated.- Specified by:
isPartialObject
in interfacecom.mongodb.DBObject
-
toMap
public Map toMap()
Deprecated.- Specified by:
toMap
in interfaceorg.bson.BSONObject
-
markAsPartialObject
public void markAsPartialObject()
Deprecated.ReflectionDBObjects can't be partial. This operation is not supported.- Specified by:
markAsPartialObject
in interfacecom.mongodb.DBObject
- Throws:
RuntimeException
- ReflectionDBObjects can't be partial
-
removeField
public Object removeField(String key)
Deprecated.This operation is not supported.- Specified by:
removeField
in interfaceorg.bson.BSONObject
- Parameters:
key
- The name of the field to remove- Returns:
- The value removed from this object
- Throws:
UnsupportedOperationException
- can't remove from a ReflectionDBObject
-
getWrapperIfReflectionObject
@Nullable public static ReflectionDBObject.JavaWrapper getWrapperIfReflectionObject(Class c)
Deprecated.Returns the wrapper if this object can be assigned from this class.- Parameters:
c
- the class to be wrapped- Returns:
- the wrapper
-
getWrapper
public static ReflectionDBObject.JavaWrapper getWrapper(Class c)
Deprecated.Returns an existing Wrapper instance associated with a class, or creates a new one.- Parameters:
c
- the class to be wrapped- Returns:
- the wrapped
-
-