|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.mongodb.ReflectionDBObject
public abstract class ReflectionDBObject
Nested Class Summary | |
---|---|
static class |
ReflectionDBObject.JavaWrapper
|
Constructor Summary | |
---|---|
ReflectionDBObject()
|
Method Summary | |
---|---|
boolean |
containsField(String s)
Checks if this object contains a field with the given name. |
boolean |
containsKey(String s)
Deprecated. |
Object |
get_id()
|
Object |
get(String key)
Gets a field from this object by a given name. |
static ReflectionDBObject.JavaWrapper |
getWrapper(Class c)
|
static ReflectionDBObject.JavaWrapper |
getWrapperIfReflectionObject(Class c)
|
boolean |
isPartialObject()
whether markAsPartialObject was ever called only matters if you are going to upsert and dont' want to risk losing fields |
Set<String> |
keySet()
Returns this object's fields' names |
void |
markAsPartialObject()
if this object was loaded with only some fields (using a field filter) this method will be called to notify |
Object |
put(String key,
Object v)
Sets a name/value pair in this object. |
void |
putAll(DBObject o)
|
void |
putAll(Map m)
|
Object |
removeField(String key)
Remove a field with a given name from this object. |
void |
set_id(Object id)
|
Map |
toMap()
Returns a map representing this DBObject. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ReflectionDBObject()
Method Detail |
---|
public Object get(String key)
DBObject
get
in interface DBObject
key
- The name of the field fetch
public Set<String> keySet()
DBObject
keySet
in interface DBObject
public boolean containsKey(String s)
containsKey
in interface DBObject
public boolean containsField(String s)
DBObject
containsField
in interface DBObject
s
- Field name for which to check
public Object put(String key, Object v)
DBObject
put
in interface DBObject
key
- Name to setv
- Corresponding value
public void putAll(Map m)
putAll
in interface DBObject
public void putAll(DBObject o)
putAll
in interface DBObject
public Object get_id()
public void set_id(Object id)
public boolean isPartialObject()
DBObject
isPartialObject
in interface DBObject
public Map toMap()
DBObject
toMap
in interface DBObject
public void markAsPartialObject()
DBObject
markAsPartialObject
in interface DBObject
public Object removeField(String key)
DBObject
removeField
in interface DBObject
key
- The name of the field to remove
public static ReflectionDBObject.JavaWrapper getWrapperIfReflectionObject(Class c)
public static ReflectionDBObject.JavaWrapper getWrapper(Class c)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |