Package org.eclipse.jetty.nosql.mongodb
Class MongoUtils
- java.lang.Object
-
- org.eclipse.jetty.nosql.mongodb.MongoUtils
-
public class MongoUtils extends java.lang.Object
MongoUtils Some utility methods for manipulating mongo data. This class facilitates testing.
-
-
Constructor Summary
Constructors Constructor Description MongoUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.String
decodeName(java.lang.String name)
static java.lang.Object
decodeValue(java.lang.Object valueToDecode)
static java.lang.Object
encodeName(java.lang.Object value)
static java.lang.String
encodeName(java.lang.String name)
static java.lang.Object
getNestedValue(com.mongodb.DBObject dbObject, java.lang.String nestedKey)
Dig through a given dbObject for the nested value
-
-
-
Method Detail
-
decodeValue
public static java.lang.Object decodeValue(java.lang.Object valueToDecode) throws java.io.IOException, java.lang.ClassNotFoundException
- Throws:
java.io.IOException
java.lang.ClassNotFoundException
-
decodeName
public static java.lang.String decodeName(java.lang.String name)
-
encodeName
public static java.lang.String encodeName(java.lang.String name)
-
encodeName
public static java.lang.Object encodeName(java.lang.Object value) throws java.io.IOException
- Throws:
java.io.IOException
-
getNestedValue
public static java.lang.Object getNestedValue(com.mongodb.DBObject dbObject, java.lang.String nestedKey)
Dig through a given dbObject for the nested value- Parameters:
dbObject
- the mongo object to searchnestedKey
- the field key to find- Returns:
- the value of the field key
-
-