public class DBObjectUtil
extends java.lang.Object
DBObjects.| Modifier and Type | Class and Description |
|---|---|
static interface |
DBObjectUtil.MergeConflictResolver
Resolves merge conflicts during
{@link DBObjectUtil#merge(DBObject, DBObject, MergeConflictResolver).
|
| Modifier and Type | Field and Description |
|---|---|
static DBObjectUtil.MergeConflictResolver |
THROW_EXCEPTION
A
DBObjectUtil.MergeConflictResolver that throws an
IllegalStateException on a merge conflict. |
| Constructor and Description |
|---|
DBObjectUtil() |
| Modifier and Type | Method and Description |
|---|---|
static java.lang.Object |
getNestedProperty(com.mongodb.DBObject dbObject,
java.lang.String name)
Gets a nested property of an obect.
|
static boolean |
isDBObject(java.lang.Object dbObject)
Indicates whether or not the given
Object
is a DBObject. |
static boolean |
isList(java.lang.Object dbObject)
Indicates whether or not the given
Object
is a BasicDBList. |
static void |
merge(com.mongodb.DBObject from,
com.mongodb.DBObject into)
Merges the objects using a a
DBObjectUtil.MergeConflictResolver
that throws an IllegalStateException. |
static void |
merge(com.mongodb.DBObject from,
com.mongodb.DBObject into,
DBObjectUtil.MergeConflictResolver resolver)
Merges the objects using the given
DBObjectUtil.MergeConflictResolver
to resolve merge conflicts. |
public static final DBObjectUtil.MergeConflictResolver THROW_EXCEPTION
DBObjectUtil.MergeConflictResolver that throws an
IllegalStateException on a merge conflict.public static boolean isList(java.lang.Object dbObject)
Object
is a BasicDBList.dbObject - public static boolean isDBObject(java.lang.Object dbObject)
Object
is a DBObject.dbObject - public static void merge(com.mongodb.DBObject from,
com.mongodb.DBObject into)
DBObjectUtil.MergeConflictResolver
that throws an IllegalStateException.from - into - THROW_EXCEPTIONpublic static void merge(com.mongodb.DBObject from,
com.mongodb.DBObject into,
DBObjectUtil.MergeConflictResolver resolver)
DBObjectUtil.MergeConflictResolver
to resolve merge conflicts.from - into - THROW_EXCEPTIONpublic static java.lang.Object getNestedProperty(com.mongodb.DBObject dbObject,
java.lang.String name)
dbObject - the objectname - the propertyCopyright © 2013. All Rights Reserved.