org.iternine.jeppetto.dao.mongodb.enhance
Class DBObjectUtil

java.lang.Object
  extended by org.iternine.jeppetto.dao.mongodb.enhance.DBObjectUtil

public class DBObjectUtil
extends Object


Constructor Summary
DBObjectUtil()
           
 
Method Summary
static Object fromObject(Class<?> type, Object o)
           
static boolean needsNoConversion(Class clazz)
           
static boolean objectIsMutable(Object object)
          Returns true if the given object is a "mutable" type that needs to be enhanced as DirtyableDBObject to prevent lost changes.
static Object toDBObject(Object object)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DBObjectUtil

public DBObjectUtil()
Method Detail

objectIsMutable

public static boolean objectIsMutable(Object object)
Returns true if the given object is a "mutable" type that needs to be enhanced as DirtyableDBObject to prevent lost changes. Array types are ok because the default isDirty method will detect changes there.

Parameters:
object - object to check
Returns:
true if mutable, false otherwise

needsNoConversion

public static boolean needsNoConversion(Class clazz)

fromObject

public static Object fromObject(Class<?> type,
                                Object o)

toDBObject

public static Object toDBObject(Object object)


Copyright © 2012. All Rights Reserved.