Package com.mongodb
Class ReflectionDBObject
- java.lang.Object
-
- com.mongodb.ReflectionDBObject
-
- All Implemented Interfaces:
com.mongodb.DBObject,org.bson.BSONObject
Deprecated.Replaced byPojoCodecProvider
@Deprecated public abstract class ReflectionDBObject extends java.lang.Object implements com.mongodb.DBObjectThis class enables to map simple Class fields to a BSON object fields
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classReflectionDBObject.JavaWrapperDeprecated.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 booleancontainsField(java.lang.String fieldName)Deprecated.booleancontainsKey(java.lang.String key)Deprecated.java.lang.Objectget(java.lang.String key)Deprecated.java.lang.Objectget_id()Deprecated.Gets the _idstatic ReflectionDBObject.JavaWrappergetWrapper(java.lang.Class c)Deprecated.Returns an existing Wrapper instance associated with a class, or creates a new one.static ReflectionDBObject.JavaWrappergetWrapperIfReflectionObject(java.lang.Class c)Deprecated.Returns the wrapper if this object can be assigned from this class.booleanisPartialObject()Deprecated.java.util.Set<java.lang.String>keySet()Deprecated.voidmarkAsPartialObject()Deprecated.ReflectionDBObjects can't be partial.java.lang.Objectput(java.lang.String key, java.lang.Object v)Deprecated.voidputAll(java.util.Map m)Deprecated.voidputAll(org.bson.BSONObject o)Deprecated.java.lang.ObjectremoveField(java.lang.String key)Deprecated.This operation is not supported.voidset_id(java.lang.Object id)Deprecated.Sets the _idjava.util.MaptoMap()Deprecated.
-
-
-
Method Detail
-
get
@Nullable public java.lang.Object get(java.lang.String key)
Deprecated.- Specified by:
getin interfaceorg.bson.BSONObject
-
keySet
public java.util.Set<java.lang.String> keySet()
Deprecated.- Specified by:
keySetin interfaceorg.bson.BSONObject
-
containsKey
public boolean containsKey(java.lang.String key)
Deprecated.- Specified by:
containsKeyin interfaceorg.bson.BSONObject
-
containsField
public boolean containsField(java.lang.String fieldName)
Deprecated.- Specified by:
containsFieldin interfaceorg.bson.BSONObject
-
put
public java.lang.Object put(java.lang.String key, java.lang.Object v)Deprecated.- Specified by:
putin interfaceorg.bson.BSONObject
-
putAll
public void putAll(java.util.Map m)
Deprecated.- Specified by:
putAllin interfaceorg.bson.BSONObject
-
putAll
public void putAll(org.bson.BSONObject o)
Deprecated.- Specified by:
putAllin interfaceorg.bson.BSONObject
-
get_id
public java.lang.Object get_id()
Deprecated.Gets the _id- Returns:
- the _id of this document
-
set_id
public void set_id(java.lang.Object id)
Deprecated.Sets the _id- Parameters:
id- the unique identifier for this DBObject
-
isPartialObject
public boolean isPartialObject()
Deprecated.- Specified by:
isPartialObjectin interfacecom.mongodb.DBObject
-
toMap
public java.util.Map toMap()
Deprecated.- Specified by:
toMapin interfaceorg.bson.BSONObject
-
markAsPartialObject
public void markAsPartialObject()
Deprecated.ReflectionDBObjects can't be partial. This operation is not supported.- Specified by:
markAsPartialObjectin interfacecom.mongodb.DBObject- Throws:
java.lang.RuntimeException- ReflectionDBObjects can't be partial
-
removeField
public java.lang.Object removeField(java.lang.String key)
Deprecated.This operation is not supported.- Specified by:
removeFieldin interfaceorg.bson.BSONObject- Parameters:
key- The name of the field to remove- Returns:
- The value removed from this object
- Throws:
java.lang.UnsupportedOperationException- can't remove from a ReflectionDBObject
-
getWrapperIfReflectionObject
@Nullable public static ReflectionDBObject.JavaWrapper getWrapperIfReflectionObject(java.lang.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(java.lang.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
-
-