|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.mockejb.EntityBeanSubclass
Provides mock subclass of the CMP entity abstract class. The subclass gets created dynamically using CGLIB. The behavior is the following: CMP field getters return null if the corresponding set was not called, otherwise it returns the previously set value. Attempt to call ejbFind and ejbSelect will trigger exception. You need to intercept the appropriate methods of the Home interface and provide your own implementation. Intercept "create" method if you want to change the behavior.
Method Summary | |
java.lang.Object |
create()
Creates the subclass of the abstract entity class using CGLIB enhancer. |
java.lang.Object |
intercept(java.lang.Object obj,
java.lang.reflect.Method method,
java.lang.Object[] paramVals,
net.sf.cglib.proxy.MethodProxy cglibMethodProxy)
|
protected java.lang.Object |
invokeEjbSelect(java.lang.Object subclassObj,
java.lang.reflect.Method ejbSelectMethod,
java.lang.Object[] paramVals)
|
static EntityBeanSubclass |
newInstance(java.lang.Class abstractEntityClass)
Creates an instance of EntityBeanSubclass. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public static EntityBeanSubclass newInstance(java.lang.Class abstractEntityClass)
public java.lang.Object create()
public java.lang.Object intercept(java.lang.Object obj, java.lang.reflect.Method method, java.lang.Object[] paramVals, net.sf.cglib.proxy.MethodProxy cglibMethodProxy) throws java.lang.Throwable
intercept
in interface net.sf.cglib.proxy.MethodInterceptor
java.lang.Throwable
protected java.lang.Object invokeEjbSelect(java.lang.Object subclassObj, java.lang.reflect.Method ejbSelectMethod, java.lang.Object[] paramVals) throws java.lang.Exception
java.lang.Exception
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |