Package org.eclipse.jetty.nosql.mongodb
Class MongoUtils
java.lang.Object
org.eclipse.jetty.nosql.mongodb.MongoUtils
MongoUtils
Some utility methods for manipulating mongo data. This class facilitates testing.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic String
decodeName
(String name) static Object
decodeValue
(Object valueToDecode) static Object
encodeName
(Object value) static String
encodeName
(String name) static Object
getNestedValue
(com.mongodb.DBObject dbObject, String nestedKey) Dig through a given dbObject for the nested value
-
Constructor Details
-
MongoUtils
public MongoUtils()
-
-
Method Details
-
decodeValue
- Throws:
IOException
ClassNotFoundException
-
decodeName
-
encodeName
-
encodeName
- Throws:
IOException
-
getNestedValue
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
-