|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--edu.rice.rubis.beans.RegionBean
RegionBean is an entity bean with "container managed persistence". The state of an instance is stored into a relational database. The following table should exist:
CREATE TABLE regions ( id INTEGER UNSIGNED NOT NULL UNIQUE name VARCHAR(20), PRIMARY KEY(id) );
Field Summary | |
java.lang.Integer |
id
|
java.lang.String |
name
|
Constructor Summary | |
RegionBean()
|
Method Summary | |
void |
ejbActivate()
This method is empty because persistence is managed by the container |
RegionPK |
ejbCreate(java.lang.String regionName)
This method is used to create a new Region Bean. |
void |
ejbLoad()
Persistence is managed by the container and the bean becomes up to date |
void |
ejbPassivate()
This method is empty because persistence is managed by the container |
void |
ejbPostCreate(java.lang.String regionName)
This method does currently nothing |
void |
ejbRemove()
This method is empty because persistence is managed by the container |
void |
ejbStore()
Persistence is managed by the container and the bean becomes up to date |
java.lang.Integer |
getId()
Get region's id. |
java.lang.String |
getName()
Get region name. |
boolean |
isModified()
Returns true if the beans has been modified. |
void |
setEntityContext(javax.ejb.EntityContext context)
Sets the associated entity context. |
void |
setName(java.lang.String newName)
Set region's name |
void |
unsetEntityContext()
Unsets the associated entity context. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public java.lang.Integer id
public java.lang.String name
Constructor Detail |
public RegionBean()
Method Detail |
public java.lang.Integer getId() throws java.rmi.RemoteException
java.rmi.RemoteException
- if an error occurspublic java.lang.String getName() throws java.rmi.RemoteException
java.rmi.RemoteException
- if an error occurspublic void setName(java.lang.String newName) throws java.rmi.RemoteException
newName
- region namejava.rmi.RemoteException
- if an error occurspublic RegionPK ejbCreate(java.lang.String regionName) throws javax.ejb.CreateException, java.rmi.RemoteException, javax.ejb.RemoveException
regionName
- Region namejavax.ejb.CreateException
- if an error occursjava.rmi.RemoteException
- if an error occursjavax.ejb.RemoveException
- if an error occurspublic void ejbPostCreate(java.lang.String regionName)
public void ejbActivate() throws java.rmi.RemoteException
ejbActivate
in interface javax.ejb.EntityBean
public void ejbPassivate() throws java.rmi.RemoteException
ejbPassivate
in interface javax.ejb.EntityBean
public void ejbRemove() throws java.rmi.RemoteException, javax.ejb.RemoveException
ejbRemove
in interface javax.ejb.EntityBean
public void ejbStore() throws java.rmi.RemoteException
ejbStore
in interface javax.ejb.EntityBean
public void ejbLoad() throws java.rmi.RemoteException
ejbLoad
in interface javax.ejb.EntityBean
public void setEntityContext(javax.ejb.EntityContext context) throws java.rmi.RemoteException
setEntityContext
in interface javax.ejb.EntityBean
context
- An EntityContext interface for the instance. The instance should
store the reference to the context in an instance variable.javax.ejb.EJBException
- Thrown by the method to indicate a failure
caused by a system-level error.java.rmi.RemoteException
- - This exception is defined in the method signature
to provide backward compatibility for enterprise beans
written for the EJB 1.0 specification.
Enterprise beans written for the EJB 1.1 and
higher specification should throw the javax.ejb.EJBException
instead of this exception.public boolean isModified()
boolean
valuepublic void unsetEntityContext() throws java.rmi.RemoteException
unsetEntityContext
in interface javax.ejb.EntityBean
javax.ejb.EJBException
- Thrown by the method to indicate a failure
caused by a system-level error.java.rmi.RemoteException
- - This exception is defined in the method signature
to provide backward compatibility for enterprise beans
written for the EJB 1.0 specification.
Enterprise beans written for the EJB 1.1 and
higher specification should throw the javax.ejb.EJBException
instead of this exception.
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |