public class HibernateUtil extends Object
| Modifier and Type | Field and Description |
|---|---|
protected static Class<?> |
hibernateProxyClass
The hibernate proxy type, null if the class is not found in the classpath
|
| Constructor and Description |
|---|
HibernateUtil() |
| Modifier and Type | Method and Description |
|---|---|
static String |
getEntitiyName(Object object)
Gets the class name of the proxied object
|
static Object |
getIdentifier(Object object)
Gets the unique identifier of the given proxy object.
|
static Object |
getUnproxiedValue(Object object)
Gets (and loads) the wrapped object out of a given hibernate proxy.
|
protected static Object |
invokeLazyInitializerMethod(String methodName,
Object proxy)
Invokes the given method on the LazyInitializer that is associated with the given proxy.
|
static boolean |
isHibernateProxy(Object object)
Checks whether the given ojbect is a HibernateProxy instance.
|
static boolean |
isUninitialized(Object object)
Checks whether the given proxy object has been loaded.
|
protected static Class<?> hibernateProxyClass
public static boolean isHibernateProxy(Object object)
object - The objectpublic static boolean isUninitialized(Object object)
object - The object or proxypublic static String getEntitiyName(Object object)
object - The object or proxypublic static Object getIdentifier(Object object)
object - The object or proxypublic static Object getUnproxiedValue(Object object)
object - The object or proxyprotected static Object invokeLazyInitializerMethod(String methodName, Object proxy)
methodName - The method to invoke, not nullproxy - The hibernate proxy instance, not nullCopyright © 2016. All Rights Reserved.