public class UtilMongoDB extends Object
| Constructor and Description |
|---|
UtilMongoDB() |
| Modifier and Type | Method and Description |
|---|---|
static <T extends IDeepType> |
getBsonFromObject(T t)
converts from an entity class with deep's anotations to BsonObject
|
static <T extends IDeepType> |
getId(T t)
returns the id value annotated with @DeepField(fieldName = "_id")
|
static <T> T |
getObjectFromBson(Class<T> classEntity,
org.bson.BSONObject bsonObject)
converts from BsonObject to an entity class with deep's anotations
|
public static <T> T getObjectFromBson(Class<T> classEntity, org.bson.BSONObject bsonObject) throws IllegalAccessException, InstantiationException, InvocationTargetException
T - classEntity - bsonObject - IllegalAccessExceptionInstantiationExceptionInvocationTargetExceptionpublic static <T extends IDeepType> org.bson.BSONObject getBsonFromObject(T t) throws IllegalAccessException, InstantiationException, InvocationTargetException
T - t - IllegalAccessExceptionInstantiationExceptionInvocationTargetExceptionpublic static <T extends IDeepType> Object getId(T t) throws IllegalAccessException, InstantiationException, InvocationTargetException
T - t - IllegalAccessExceptionInstantiationExceptionInvocationTargetExceptionCopyright © 2014. All rights reserved.