org.mockejb
Class CMPFindByPrimaryKeyHandler
java.lang.Object
org.mockejb.CMPFindByPrimaryKeyHandler
- All Implemented Interfaces:
- Aspect, Interceptor, java.io.Serializable
- public class CMPFindByPrimaryKeyHandler
- extends java.lang.Object
- implements Aspect, java.io.Serializable
Handles calls to findByPrimaryKey for CMP beans.
Checks if the requested PK is in the EntityDatabase,
if it is, gets the entity from the EntityDatabase and returns it to the client.
Otherwise, proceeds to the next interceptor in the chain.
- 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
CMPFindByPrimaryKeyHandler
public CMPFindByPrimaryKeyHandler(EntityDatabase entityDatabase)
getPointcut
public Pointcut getPointcut()
- Specified by:
getPointcut
in interface Aspect
intercept
public void intercept(InvocationContext invocationContext)
throws java.lang.Exception
- Description copied from interface:
Interceptor
- Performs pre and post invocation actions for the target object call.
- 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
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()