Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.hibernate.test.dynamicentity
Class DataProxyHandler  view DataProxyHandler download DataProxyHandler.java

java.lang.Object
  extended byorg.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.


Field Summary
private  java.util.HashMap data
           
private  java.lang.String entityName
           
 
Constructor Summary
DataProxyHandler(java.lang.String entityName, java.io.Serializable id)
           
 
Method Summary
 java.util.HashMap getData()
           
 java.lang.String getEntityName()
           
 java.lang.Object invoke(java.lang.Object proxy, java.lang.reflect.Method method, java.lang.Object[] args)
          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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

entityName

private java.lang.String entityName

data

private java.util.HashMap data
Constructor Detail

DataProxyHandler

public DataProxyHandler(java.lang.String entityName,
                        java.io.Serializable id)
Method Detail

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()