java.lang.Object | |
↳ | com.mongodb.ReflectionDBObject |
This class enables to map simple Class fields to a BSON object fields
Nested Classes | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
ReflectionDBObject.JavaWrapper | Represents a wrapper around the DBObject to interface with the Class fields |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Checks if this object contains a field with the given name.
| |||||||||||
This method is deprecated.
No replacement.
| |||||||||||
Gets a field from this object by a given name.
| |||||||||||
Returns an existing Wrapper instance associated with a class, or creates a new one.
| |||||||||||
Returns the wrapper if this object can be assigned from this class
| |||||||||||
Gets the _id
| |||||||||||
whether markAsPartialObject was ever called
only matters if you are going to upsert and do not want to risk losing fields
| |||||||||||
Returns this object's fields' names
| |||||||||||
ReflectionDBObjects can't be partial
| |||||||||||
Sets a name/value pair in this object.
| |||||||||||
Sets all key/value pairs from a map into this object
| |||||||||||
Sets all key/value pairs from an object into this object
| |||||||||||
can't remove from a ReflectionDBObject
| |||||||||||
Sets the _id
| |||||||||||
Returns a map representing this BSONObject.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
| |||||||||||
From interface
com.mongodb.DBObject
| |||||||||||
From interface
org.bson.BSONObject
|
Checks if this object contains a field with the given name.
s | Field name for which to check |
---|
This method is deprecated.
No replacement.
Deprecated
Gets a field from this object by a given name.
key | The name of the field fetch |
---|
Returns an existing Wrapper instance associated with a class, or creates a new one.
Returns the wrapper if this object can be assigned from this class
whether markAsPartialObject was ever called only matters if you are going to upsert and do not want to risk losing fields
Returns this object's fields' names
ReflectionDBObjects can't be partial
Sets a name/value pair in this object.
key | Name to set |
---|---|
v | Corresponding value |
Sets all key/value pairs from a map into this object
m | the map |
---|
Sets all key/value pairs from an object into this object
o | the object |
---|
can't remove from a ReflectionDBObject
key | The name of the field to remove |
---|