|
||||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||
java.lang.Objectorg.test4j.hamcrest.matcher.property.reflection.HibernateUtil
public class HibernateUtil
Utility class for handling Hibernate proxies during the comparison.
Every operation is performed through reflection to avoid a direct link to Hibernate. This way you do not need Hibernate in the classpath to use the reflection comparator.
| 字段摘要 | |
|---|---|
protected static Class |
hibernateProxyClass
The hibernate proxy type, null if the class is not found in the classpath |
| 构造方法摘要 | |
|---|---|
HibernateUtil()
|
|
| 方法摘要 | |
|---|---|
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. |
| 从类 java.lang.Object 继承的方法 |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| 字段详细信息 |
|---|
protected static Class hibernateProxyClass
| 构造方法详细信息 |
|---|
public HibernateUtil()
| 方法详细信息 |
|---|
public static boolean isHibernateProxy(Object object)
object - The object
public static boolean isUninitialized(Object object)
object - The object or proxy
public static String getEntitiyName(Object object)
object - The object or proxy
public static Object getIdentifier(Object object)
object - The object or proxy
public static Object getUnproxiedValue(Object object)
object - The object or proxy
protected static Object invokeLazyInitializerMethod(String methodName,
Object proxy)
methodName - The method to invoke, not nullproxy - The hibernate proxy instance, not null
|
||||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||