org.mockejb
Class BMPFinderHandler
java.lang.Object
org.mockejb.BMPFinderHandler
- All Implemented Interfaces:
- Aspect, Interceptor, java.io.Serializable
- public class BMPFinderHandler
- extends java.lang.Object
- implements Aspect, java.io.Serializable
Intercepts the calls to the BMP find methods,
checks if the returned PK (or elements of the pk collection) is in the EntityDatabase,
if not, creates a new entity and calls "ejbLoad", and adds it to the EntityDatabase.
Returns the entity or entity collection to the client
- Author:
- Alexander Ananiev
- See Also:
- Serialized Form
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
entityDatabase
protected EntityDatabase entityDatabase
BMPFinderHandler
public BMPFinderHandler(EntityDatabase entityDatabase)
getPointcut
public Pointcut getPointcut()
- Specified by:
getPointcut
in interface Aspect
intercept
public void intercept(InvocationContext invocationContext)
throws java.lang.Exception
- Intercepts and handles finders.
- Specified by:
intercept
in interface Interceptor
- Parameters:
invocationContext
- provides the info about this call. Also calls interceptors in
turn according to their order in the chain. invocationContext provides access to the return value
and thrown exceptions of this call.
- Throws:
java.lang.Exception
findInCacheOrCreate
protected java.lang.Object findInCacheOrCreate(EntityBeanDescriptor descriptor,
MockEjbContext ejbContext,
java.lang.Object pk)
throws java.lang.Exception
- Throws:
java.lang.Exception
equals
public boolean equals(java.lang.Object obj)
- This class does not have state, so all instances of this class
are considered equal
hashCode
public int hashCode()