com.submersion.jspshop.ejb
Class ObjectBean

java.lang.Object
  |
  +--com.submersion.jspshop.ejb.ObjectBean
All Implemented Interfaces:
javax.ejb.EnterpriseBean, javax.ejb.EntityBean, java.io.Serializable

public class ObjectBean
extends java.lang.Object
implements javax.ejb.EntityBean

Implementation of the Object entity bean using CMP (Container managed persistance).
 
 Objects may contain other objects.
 Objects are defined from a Class object
 
 Objects are setup to make "Trees", like the following:
 
 ROOT - ID = 1
 |--SubContainer1 - ID = 2
 |      |-SubContainer1-1 - ID = 3
 |      |-SubContainer1-2 - ID = 4
 |            |-SubContainer1-2-3 - ID = 5
 |-SubContainer2 - ID = 6
 
 
 The context for the above containers would look something like this:
 SubContainer1      = .1
 SubContainer1-1    = .2.1
 SubContainer1-2    = .2.1
 SubContainer1-2-3  = .4.2.1
 SubContainer2      = .1

Version:
$Revision$ Date Created: August 22, 2001 Last changed: $Date$ Changed by: $Author$
Author:
Jeff Davey (jeffdavey@submersion.com)
See Also:
Object, ObjectHome, Serialized Form

Field Summary
 java.lang.String className
           
 java.lang.String context
           
 java.lang.String name
           
 java.lang.Long objectID
           
 java.lang.Long parentID
           
 
Constructor Summary
ObjectBean()
           
 
Method Summary
 void ejbActivate()
           
 java.lang.Long ejbCreate()
           
 void ejbLoad()
           
 void ejbPassivate()
           
 void ejbPostCreate()
           
 void ejbRemove()
           
 void ejbStore()
           
 java.lang.String getClassName()
          Returns the primary key of the Class that the object is a type of.
 java.lang.String getContext()
          Returns the context for the Object
 java.lang.String getName()
          Returns the name of the Object
 java.lang.Long getObjectID()
          Returns the primary key of the Object
 java.lang.Long getParentID()
          Returns the primary key for the parent object
 void setClassName(java.lang.String className)
          Changes the class that the object is a type of.
 void setContext(java.lang.String context)
          Changes the context for the object.
 void setEntityContext(javax.ejb.EntityContext ctx)
           
 void setName(java.lang.String name)
          Changes the name of the object
 void setParentID(java.lang.Long parentID)
          Changes the parent object for the current object.
 void unsetEntityContext()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

objectID

public java.lang.Long objectID

context

public java.lang.String context

parentID

public java.lang.Long parentID

name

public java.lang.String name

className

public java.lang.String className
Constructor Detail

ObjectBean

public ObjectBean()
Method Detail

getObjectID

public java.lang.Long getObjectID()
Returns the primary key of the Object

getContext

public java.lang.String getContext()
Returns the context for the Object

setContext

public void setContext(java.lang.String context)
Changes the context for the object. This should only be done during creation, or some sort of moving within the tree
Parameters:
context -  

getParentID

public java.lang.Long getParentID()
Returns the primary key for the parent object

setParentID

public void setParentID(java.lang.Long parentID)
Changes the parent object for the current object. This should only be used during creation or some sort of moving within the tree.
Parameters:
parentID -  

getName

public java.lang.String getName()
Returns the name of the Object

setName

public void setName(java.lang.String name)
Changes the name of the object
Parameters:
name -  

getClassName

public java.lang.String getClassName()
Returns the primary key of the Class that the object is a type of.

setClassName

public void setClassName(java.lang.String className)
Changes the class that the object is a type of. Should only be used during creation.
Parameters:
className -  

ejbCreate

public java.lang.Long ejbCreate()
                         throws javax.naming.NamingException,
                                java.rmi.RemoteException,
                                javax.ejb.CreateException,
                                javax.ejb.FinderException

ejbPostCreate

public void ejbPostCreate()

setEntityContext

public void setEntityContext(javax.ejb.EntityContext ctx)
Specified by:
setEntityContext in interface javax.ejb.EntityBean

unsetEntityContext

public void unsetEntityContext()
Specified by:
unsetEntityContext in interface javax.ejb.EntityBean

ejbActivate

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

ejbPassivate

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

ejbLoad

public void ejbLoad()
Specified by:
ejbLoad in interface javax.ejb.EntityBean

ejbStore

public void ejbStore()
Specified by:
ejbStore in interface javax.ejb.EntityBean

ejbRemove

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