net.walend.lyophil.ejb.ejbbeans
Class FreezerEJBBean

java.lang.Object
  |
  +--net.walend.lyophil.ejb.ejbbeans.FreezerEJBBean
All Implemented Interfaces:
javax.ejb.EnterpriseBean, java.io.Serializable, javax.ejb.SessionBean

public class FreezerEJBBean
extends java.lang.Object
implements javax.ejb.SessionBean

Since:
20010905
Author:
David Walend

Field Summary
private  javax.ejb.SessionContext ctx
           
static java.lang.String EJBFREEZERDELEGATE
           
private  Freezer freezer
           
 
Constructor Summary
FreezerEJBBean()
           
 
Method Summary
 int count()
          Returns the number of elements in this collection.
 void ejbActivate()
           
 void ejbCreate()
           
 void ejbPassivate()
           
 void ejbRemove()
           
 void freeze(Freezable victem)
          Take the Thawed victem and put it in cold storage.
 SetOfFreezables getAll()
          Returns a lyophilizer.collection.Set of Freezables.
 boolean isAvailable(java.io.Serializable identifier)
          Return true if identifier is available in the freezer
 boolean isEmpty()
          Returns true if this collection contains no elements.
 void setSessionContext(javax.ejb.SessionContext context)
           
 Freezable thaw(java.io.Serializable identifier)
          For the identifier, return a Freezable object containing the data.
 void throwOut(java.io.Serializable identifier)
          Remote the Freezable identified by identifier from the persistent storage
 void throwOutAll()
          Throw out everything in the Freezer.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

EJBFREEZERDELEGATE

public static final java.lang.String EJBFREEZERDELEGATE

freezer

private Freezer freezer

ctx

private javax.ejb.SessionContext ctx
Constructor Detail

FreezerEJBBean

public FreezerEJBBean()
Method Detail

setSessionContext

public void setSessionContext(javax.ejb.SessionContext context)
Specified by:
setSessionContext in interface javax.ejb.SessionBean

ejbActivate

public void ejbActivate()
Specified by:
ejbActivate in interface javax.ejb.SessionBean

ejbPassivate

public void ejbPassivate()
Specified by:
ejbPassivate in interface javax.ejb.SessionBean

ejbRemove

public void ejbRemove()
Specified by:
ejbRemove in interface javax.ejb.SessionBean

ejbCreate

public void ejbCreate()
               throws javax.ejb.CreateException

freeze

public void freeze(Freezable victem)
Take the Thawed victem and put it in cold storage.

Throws:
<{CannotFreezeException}>

thaw

public Freezable thaw(java.io.Serializable identifier)
               throws NotInFreezerException
For the identifier, return a Freezable object containing the data.

Throws:
<{CannotThawException}>
NotInFreezerException

throwOut

public void throwOut(java.io.Serializable identifier)
              throws NotInFreezerException
Remote the Freezable identified by identifier from the persistent storage

Throws:
<{CannotThrowOutException}>
NotInFreezerException

isAvailable

public boolean isAvailable(java.io.Serializable identifier)
Return true if identifier is available in the freezer

Throws:
<{PersistenceFailureException}>

throwOutAll

public void throwOutAll()
Throw out everything in the Freezer.


getAll

public SetOfFreezables getAll()
Returns a lyophilizer.collection.Set of Freezables.

Throws:
<{PersistenceFailureException}>

count

public int count()
Returns the number of elements in this collection. If this collection contains more than Integer.MAX_VALUE elements, returns Integer.MAX_VALUE.


isEmpty

public boolean isEmpty()
Returns true if this collection contains no elements.



Copyright (c) 2000, 2001, David Walend