java.lang.Object
org.hibernate.test.dynamicentity.DataProxyHandler
- All Implemented Interfaces:
- java.lang.reflect.InvocationHandler
- public final class DataProxyHandler
- extends java.lang.Object
- implements java.lang.reflect.InvocationHandler
A simple java.lang.reflect.InvocationHandler to act as the handler for our generated
java.lang.reflect.Proxy-based entity instances.
This is a trivial impl which simply keeps the property values into
a Map.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
entityName
private java.lang.String entityName
data
private java.util.HashMap data
DataProxyHandler
public DataProxyHandler(java.lang.String entityName,
java.io.Serializable id)
invoke
public java.lang.Object invoke(java.lang.Object proxy,
java.lang.reflect.Method method,
java.lang.Object[] args)
throws java.lang.Throwable
- Description copied from interface:
java.lang.reflect.InvocationHandler
- When a method is invoked on a proxy instance, it is wrapped and
this method is called instead, so that you may decide at runtime
how the original method should behave.
- Specified by:
invoke
in interface java.lang.reflect.InvocationHandler
getEntityName
public java.lang.String getEntityName()
getData
public java.util.HashMap getData()