Methods Summary |
---|
final com.sun.ejb.containers.EntityContextImpl | _getNext()
return _next;
|
final int | _getPKHashCode()
return this._pkHashCode;
|
final void | _setNext(com.sun.ejb.containers.EntityContextImpl val)
this._next = val;
|
final void | cachePrimaryKey()
Object pk = getPrimaryKey();
this._primaryKey = pk;
this._pkHashCode = pk.hashCode();
|
protected void | checkAccessToCallerSecurity()
if( state == NOT_INITIALIZED || inUnsetEntityContext ) {
throw new IllegalStateException("Operation not allowed");
}
checkActivatePassivate();
if (inEjbLoad || inEjbStore) {
// Security access is allowed from these two methods. In the
// case that they are invoked as part of an ejbTimeout call,
// getCallerPrincipal will return null and isCallerInRole will
// be false
return;
}
|
public void | checkTimerServiceMethodAccess()
// Prohibit access from constructor, setEntityContext, ejbCreate,
// ejbActivate, ejbPassivate, unsetEntityContext, ejbFind
if( (state == NOT_INITIALIZED) ||
inUnsetEntityContext ||
inFinder() ||
inActivatePassivate() ||
!hasIdentity() ) {
throw new IllegalStateException("Operation not allowed");
}
|
final void | clearCachedPrimaryKey()
this._primaryKey = null;
|
synchronized void | decrementCalls()
nCallsInProgress--;
|
final boolean | doesMatch(BaseContainer baseContainer, int pkHashCode, java.lang.Object pk)
return (
(container == baseContainer)
&& (_pkHashCode == pkHashCode)
&& (_primaryKey.equals(pk))
);
|
public EJBObject | getEJBObject()Implementation of EntityContext method, overrides EJBContextImpl method.
if (! isRemoteInterfaceSupported) {
throw new IllegalStateException("EJBObject not available");
}
if ( ejbStub == null ) {
Object pkey = getPrimaryKey(); // throws IllegalStateException
ejbStub = ((EntityContainer) container).getEJBObjectStub(pkey, null);
}
return ejbStub;
|
int | getLastTransactionStatus()
return lastTxStatus;
|
public java.lang.Object | getPrimaryKey()Implementation of EntityContext method.
if ( ejbObjectImpl == null && ejbLocalObjectImpl == null ) {
// There is no ejbObjectImpl/localObject in ejbCreate, ejbFind,
// setEntityCtx etc
throw new IllegalStateException("Primary key not available");
}
if ( ejbLocalObjectImpl != null )
return ejbLocalObjectImpl.getKey();
else
return ejbObjectImpl.getKey();
|
public TimerService | getTimerService()
if( state == NOT_INITIALIZED || inUnsetEntityContext || inFinder() ) {
throw new IllegalStateException("Operation not allowed");
}
ContainerFactoryImpl cf = (ContainerFactoryImpl)
Switch.getSwitch().getContainerFactory();
EJBTimerService timerService = cf.getEJBTimerService();
if( timerService == null ) {
throw new EJBException("EJB Timer service not available");
}
return new EJBTimerServiceWrapper(timerService,
(EntityContextImpl) this);
|
boolean | hasIdentity()
return( (ejbObjectImpl != null) || (ejbLocalObjectImpl != null) );
|
boolean | hasReentrantCall()
return (nCallsInProgress > 1);
|
private boolean | inFinder()
boolean inFinder = false;
ComponentInvocation i =
container.invocationManager.getCurrentInvocation();
if ( i instanceof Invocation ) {
Invocation inv = (Invocation) i;
Method currentMethod = inv.method;
inFinder = ( (currentMethod != null) && inv.isHome &&
currentMethod.getName().startsWith("find") );
}
return inFinder;
|
synchronized void | incrementCalls()
nCallsInProgress++;
|
public final boolean | isCascadeDeleteAfterSuperEJBRemove()
return cascadeDeleteAfterSuperEJBRemove;
|
public final boolean | isCascadeDeleteBeforeEJBRemove()
return cascadeDeleteBeforeEJBRemove;
|
boolean | isDirty()
return dirty;
|
boolean | isNewlyActivated()
return newlyActivated;
|
public final void | setCascadeDeleteAfterSuperEJBRemove(boolean value)
this.cascadeDeleteAfterSuperEJBRemove = value;
|
public final void | setCascadeDeleteBeforeEJBRemove(boolean value)
this.cascadeDeleteBeforeEJBRemove = value;
|
void | setDirty(boolean b)
dirty = b;
|
void | setInEjbLoad(boolean flag)
inEjbLoad = flag;
|
void | setInEjbStore(boolean flag)
inEjbStore = flag;
|
void | setInUnsetEntityContext(boolean flag)
inUnsetEntityContext = flag;
|
void | setLastTransactionStatus(int status)
lastTxStatus = status;
|
void | setNewlyActivated(boolean b)
newlyActivated = b;
|
void | setState(int s)
state = s;
if ( state == EntityContainer.POOLED ||
state == EntityContainer.DESTROYED )
{
dirty = false;
}
|