| java.lang.Object org.mockejb.EntityBeanSubclass
EntityBeanSubclass | public class EntityBeanSubclass implements MethodInterceptor(Code) | | 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.
author: Alexander Ananiev |
EntityBeanSubclass | EntityBeanSubclass()(Code) | | Fake constructor for CGLIB. This is needed in order to
be able to re-use InterceptableProxy class
|
create | public Object create()(Code) | | Creates the subclass of the abstract entity class using CGLIB
enhancer.
an instance of the subclass implementing abstract methods of the provided entity bean class |
newInstance | public static EntityBeanSubclass newInstance(Class abstractEntityClass)(Code) | | Creates an instance of EntityBeanSubclass. Current implementation creates
a new instance evry time.
This method does not create the actual sublcass, for that you need to call "create".
an instance of EntityBeanSubclass |
|
|