PojoCodecProvider@Deprecated public abstract class ReflectionDBObject extends java.lang.Object implements DBObject
| Modifier and Type | Class and Description |
|---|---|
static class |
ReflectionDBObject.JavaWrapper
Deprecated.
Represents a wrapper around the DBObject to interface with the Class fields
|
| Constructor and Description |
|---|
ReflectionDBObject()
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
containsField(java.lang.String fieldName)
Deprecated.
Checks if this object contains a field with the given name.
|
boolean |
containsKey(java.lang.String key)
Deprecated.
Deprecated
|
java.lang.Object |
get_id()
Deprecated.
Gets the _id
|
java.lang.Object |
get(java.lang.String key)
Deprecated.
Gets a field from this object by a given name.
|
static ReflectionDBObject.JavaWrapper |
getWrapper(java.lang.Class c)
Deprecated.
Returns an existing Wrapper instance associated with a class, or creates a new one.
|
static ReflectionDBObject.JavaWrapper |
getWrapperIfReflectionObject(java.lang.Class c)
Deprecated.
Returns the wrapper if this object can be assigned from this class.
|
boolean |
isPartialObject()
Deprecated.
Whether
DBObject.markAsPartialObject() was ever called only matters if you are going to upsert and do not want to risk losing fields. |
java.util.Set<java.lang.String> |
keySet()
Deprecated.
Returns this object's fields' names
|
void |
markAsPartialObject()
Deprecated.
ReflectionDBObjects can't be partial.
|
java.lang.Object |
put(java.lang.String key,
java.lang.Object v)
Deprecated.
Sets a name/value pair in this object.
|
void |
putAll(BSONObject o)
Deprecated.
Sets all key/value pairs from an object into this object
|
void |
putAll(java.util.Map m)
Deprecated.
Sets all key/value pairs from a map into this object
|
java.lang.Object |
removeField(java.lang.String key)
Deprecated.
This operation is not supported.
|
void |
set_id(java.lang.Object id)
Deprecated.
Sets the _id
|
java.util.Map |
toMap()
Deprecated.
Returns a map representing this BSONObject.
|
@Nullable public java.lang.Object get(java.lang.String key)
BSONObjectget in interface BSONObjectkey - The name of the field fetchpublic java.util.Set<java.lang.String> keySet()
BSONObjectkeySet in interface BSONObjectpublic boolean containsKey(java.lang.String key)
BSONObjectcontainsKey in interface BSONObjectkey - the key to checkpublic boolean containsField(java.lang.String fieldName)
BSONObjectcontainsField in interface BSONObjectfieldName - Field name for which to checkpublic java.lang.Object put(java.lang.String key,
java.lang.Object v)
BSONObjectput in interface BSONObjectkey - Name to setv - Corresponding valuekey, or null if there was no mapping for key. (A
null return can also indicate that the map previously associated null with key.)public void putAll(java.util.Map m)
BSONObjectputAll in interface BSONObjectm - the mappublic void putAll(BSONObject o)
BSONObjectputAll in interface BSONObjecto - the objectpublic java.lang.Object get_id()
public void set_id(java.lang.Object id)
id - the unique identifier for this DBObjectpublic boolean isPartialObject()
DBObjectDBObject.markAsPartialObject() was ever called only matters if you are going to upsert and do not want to risk losing fields.isPartialObject in interface DBObjectpublic java.util.Map toMap()
BSONObjecttoMap in interface BSONObjectpublic void markAsPartialObject()
markAsPartialObject in interface DBObjectjava.lang.RuntimeException - ReflectionDBObjects can't be partialpublic java.lang.Object removeField(java.lang.String key)
removeField in interface BSONObjectkey - The name of the field to removejava.lang.UnsupportedOperationException - can't remove from a ReflectionDBObject@Nullable public static ReflectionDBObject.JavaWrapper getWrapperIfReflectionObject(java.lang.Class c)
c - the class to be wrappedpublic static ReflectionDBObject.JavaWrapper getWrapper(java.lang.Class c)
c - the class to be wrappedCopyright © 2010 - 2023 Adobe. All Rights Reserved