org.ow2.jonas.lib.ejb21.jorm
Class JEntityContext
java.lang.Object
org.ow2.jonas.lib.ejb21.JContext
org.ow2.jonas.lib.ejb21.JEntityContext
org.ow2.jonas.lib.ejb21.jorm.JEntityContext
- All Implemented Interfaces:
- EJBContext, EntityContext, Synchronization
public class JEntityContext
- extends JEntityContext
This class extends the JEntityContext of the JOnAS container in order to take
in consideration the fact that the container manages PName instances and not
primary keys. This is the reason why the getPrimaryKey method is overriden.
- Author:
- Sebastien Chassande-Barrioz
Method Summary |
Object |
getPrimaryKey()
Obtains the primary key of the EJB object that is currently associated
with this instance. |
Methods inherited from class org.ow2.jonas.lib.ejb21.JEntityContext |
activate, afterCompletion, beforeCompletion, detachTx, get2EJBLocalObject, getEJBLocalObject, getEJBObject, getEntityFactory, getEntitySwitch, getInstance, getMyTx, getTimerService, initEntityContext, isDirty, isInitialized, isMarkedRemoved, isNewInstance, passivate, razEntityContext, reuseEntityContext, setDirty, setEntitySwitch, setNewInstance, setRemoved, setRunningTx, storeIfModified |
Methods inherited from class org.ow2.jonas.lib.ejb21.JContext |
getCallerIdentity, getCallerPrincipal, getEJBHome, getEJBLocalHome, getEnvironment, getRollbackOnly, getState, getUserTransaction, getWorkManager, isCallerInRole, isCallerInRole, lookup, setActive, setCommitting, setFinding, setPassive, setRollbackOnly, setState |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface javax.ejb.EJBContext |
getCallerIdentity, getCallerPrincipal, getEJBHome, getEJBLocalHome, getEnvironment, getRollbackOnly, getUserTransaction, isCallerInRole, isCallerInRole, lookup, setRollbackOnly |
JEntityContext
public JEntityContext(JEntityFactory bf,
EntityBean eb)
getPrimaryKey
public Object getPrimaryKey()
throws IllegalStateException
- Obtains the primary key of the EJB object that is currently associated
with this instance.
- Specified by:
getPrimaryKey
in interface EntityContext
- Overrides:
getPrimaryKey
in class JEntityContext
- Returns:
- The EJB object currently associated with the instance.
- Throws:
IllegalStateException
- Thrown if the instance invokes this
method while the instance is in a state that does not allow
the instance to invoke this method.
Copyright © 2010 OW2 Consortium. All Rights Reserved.