|
|||||||||
| Home >> All >> com >> clra >> rowing >> [ remote overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
com.clra.rowing.remote
Class RowingSessionBean

java.lang.Objectcom.clra.rowing.remote.RowingSessionBean
- All Implemented Interfaces:
- javax.ejb.EnterpriseBean, javax.ejb.EntityBean, java.io.Serializable
- public class RowingSessionBean
- extends java.lang.Object
- implements javax.ejb.EntityBean
- extends java.lang.Object
- Version:
- $Revision: 1.8 $ $Date: 2003/02/26 03:38:45 $
| Field Summary | |
private static java.lang.String |
base
|
private javax.ejb.EntityContext |
context
|
private java.util.Date |
date
|
private java.lang.Integer |
id
|
private boolean |
isDirty
|
private com.clra.rowing.RowingSessionLevel |
level
|
private com.clra.rowing.RowingSessionState |
state
|
private static org.apache.log4j.Category |
theLog
|
private com.clra.rowing.RowingSessionType |
type
|
| Constructor Summary | |
RowingSessionBean()
|
|
| Method Summary | |
void |
cancel()
Cancels a rowing session. |
void |
delete()
Deletes a rowing session. |
private void |
deleteRow(java.lang.Integer id)
|
void |
ejbActivate()
|
java.lang.Integer |
ejbCreate(java.util.Date date,
com.clra.rowing.RowingSessionLevel level,
com.clra.rowing.RowingSessionType type)
|
java.util.Collection |
ejbFindAll()
Returns a collection of rowing sessions that fall within the inclusive date range. |
java.lang.Integer |
ejbFindByPrimaryKey(java.lang.Integer primaryKey)
|
java.util.Collection |
ejbFindInDateRange(java.util.Date start,
java.util.Date finish)
Returns a collection of rowing sessions that fall within the inclusive date range. |
void |
ejbLoad()
|
void |
ejbPassivate()
|
void |
ejbPostCreate(java.util.Date date,
com.clra.rowing.RowingSessionLevel level,
com.clra.rowing.RowingSessionType type)
|
void |
ejbRemove()
|
void |
ejbStore()
|
com.clra.rowing.RowingSessionSnapshot |
getData()
Returns a snapshot of a rowing session |
java.util.Date |
getDate()
Returns the date (and time) of a rowing session |
java.lang.Integer |
getId()
Returns the primary key of a rowing session. |
com.clra.rowing.RowingSessionLevel |
getLevel()
Returns the level of a rowing session |
com.clra.util.ISerializableComparator |
getNaturalComparator()
Returns the natural Comparator for rowing sessions, in which rowing sessions are compared by date, state, type, level, and id, with that respective weighting. |
com.clra.rowing.RowingSessionState |
getState()
Returns the state of a rowing session. |
com.clra.rowing.RowingSessionType |
getType()
Returns the type of a rowing session |
private void |
insertRow(java.lang.Integer id,
com.clra.rowing.RowingSessionState state,
java.util.Date date,
com.clra.rowing.RowingSessionLevel level,
com.clra.rowing.RowingSessionType type)
|
private void |
loadRow()
|
void |
lock()
Locks a rowing session. |
static java.lang.Integer |
nextId()
A utility that gets (and reserves) the next id for a rowing session |
void |
publish()
Publishes a rowing session. |
private java.util.Collection |
selectAll()
|
private boolean |
selectByPrimaryKey(java.lang.Integer primaryKey)
|
private java.util.Collection |
selectInDateRange(java.util.Date start,
java.util.Date finish)
|
void |
setData(com.clra.rowing.RowingSessionSnapshot data)
Sets the date, level and type of a rowing session if the rowing session is TENATIVE. |
void |
setDate(java.util.Date date)
Edits the date (and time) of a rowing session. |
void |
setEntityContext(javax.ejb.EntityContext context)
|
void |
setLevel(com.clra.rowing.RowingSessionLevel level)
Edits the level of a rowing session. |
void |
setType(com.clra.rowing.RowingSessionType type)
Edits the type of a rowing session. |
private void |
storeRow()
|
void |
unsetEntityContext()
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
base
private static final java.lang.String base
theLog
private static final org.apache.log4j.Category theLog
isDirty
private transient boolean isDirty
id
private java.lang.Integer id
state
private com.clra.rowing.RowingSessionState state
date
private java.util.Date date
level
private com.clra.rowing.RowingSessionLevel level
type
private com.clra.rowing.RowingSessionType type
context
private javax.ejb.EntityContext context
| Constructor Detail |
RowingSessionBean
public RowingSessionBean()
| Method Detail |
getNaturalComparator
public com.clra.util.ISerializableComparator getNaturalComparator()
- Returns the natural Comparator for rowing sessions, in which rowing
sessions are compared by date, state, type, level, and id, with that
respective weighting.
getData
public com.clra.rowing.RowingSessionSnapshot getData() throws java.rmi.RemoteException
- Returns a snapshot of a rowing session
setData
public void setData(com.clra.rowing.RowingSessionSnapshot data) throws com.clra.rowing.RowingSessionStateException
- Sets the date, level and type of a rowing session if the rowing
session is TENATIVE. The id and state properties are not set.
getId
public java.lang.Integer getId()
- Returns the primary key of a rowing session. The id is immutable
after a rowing session is created.
getState
public com.clra.rowing.RowingSessionState getState()
- Returns the state of a rowing session. The state of a rowing
session can not be set directly. It is changed as a side-effect
of other operations on a rowing session.
publish
public void publish()
throws com.clra.rowing.RowingSessionStateException
- Publishes a rowing session. Only TENATIVE sessions may be published.
The state of a published rowing session becomes OPEN.
lock
public void lock()
throws com.clra.rowing.RowingSessionStateException
- Locks a rowing session. Only OPEN sessions may be locked.
The state of a locked rowing session becomes LOCKED.
cancel
public void cancel()
throws com.clra.rowing.RowingSessionStateException
- Cancels a rowing session. The state of a cancelled state becomes
CANCELLED.
A TENTATIVE session may not be cancelled (but it may be deleted). A COMPLETE, INVOICING or CLOSED session may not be cancelled.
delete
public void delete()
throws java.rmi.RemoteException,
javax.ejb.RemoveException,
com.clra.rowing.RowingSessionStateException
- Deletes a rowing session. Only a TENATIVE session may be deleted.
A deleted session is removed from the database.
This is a safe version of the standard EJBObject.remove() operation. It checks that the session is tenative before removing it. Application code should always delete, rather than remove, rowing sessions. The remove operation, however, is required for testing purposes.
getDate
public java.util.Date getDate()
- Returns the date (and time) of a rowing session
setDate
public void setDate(java.util.Date date) throws com.clra.rowing.RowingSessionStateException
- Edits the date (and time) of a rowing session. Editing is allowed only
for TENATIVE sessions.
getLevel
public com.clra.rowing.RowingSessionLevel getLevel() throws java.rmi.RemoteException
- Returns the level of a rowing session
setLevel
public void setLevel(com.clra.rowing.RowingSessionLevel level) throws com.clra.rowing.RowingSessionStateException
- Edits the level of a rowing session. Editing is allowed only for
TENATIVE sessions.
getType
public com.clra.rowing.RowingSessionType getType() throws java.rmi.RemoteException
- Returns the type of a rowing session
setType
public void setType(com.clra.rowing.RowingSessionType type) throws com.clra.rowing.RowingSessionStateException
- Edits the type of a rowing session. Editing is allowed only for
TENATIVE sessions.
ejbCreate
public java.lang.Integer ejbCreate(java.util.Date date, com.clra.rowing.RowingSessionLevel level, com.clra.rowing.RowingSessionType type) throws javax.ejb.CreateException
ejbFindByPrimaryKey
public java.lang.Integer ejbFindByPrimaryKey(java.lang.Integer primaryKey) throws javax.ejb.FinderException
ejbFindInDateRange
public java.util.Collection ejbFindInDateRange(java.util.Date start, java.util.Date finish) throws javax.ejb.FinderException
- Returns a collection of rowing sessions that fall within the
inclusive date range.
ejbFindAll
public java.util.Collection ejbFindAll() throws javax.ejb.FinderException
- Returns a collection of rowing sessions that fall within the
inclusive date range.
ejbRemove
public void ejbRemove()
- Specified by:
ejbRemovein interfacejavax.ejb.EntityBean
setEntityContext
public void setEntityContext(javax.ejb.EntityContext context)
- Specified by:
setEntityContextin interfacejavax.ejb.EntityBean
unsetEntityContext
public void unsetEntityContext()
- Specified by:
unsetEntityContextin interfacejavax.ejb.EntityBean
ejbActivate
public void ejbActivate()
- Specified by:
ejbActivatein interfacejavax.ejb.EntityBean
ejbPassivate
public void ejbPassivate()
- Specified by:
ejbPassivatein interfacejavax.ejb.EntityBean
ejbLoad
public void ejbLoad()
- Specified by:
ejbLoadin interfacejavax.ejb.EntityBean
ejbStore
public void ejbStore()
- Specified by:
ejbStorein interfacejavax.ejb.EntityBean
ejbPostCreate
public void ejbPostCreate(java.util.Date date, com.clra.rowing.RowingSessionLevel level, com.clra.rowing.RowingSessionType type)
selectByPrimaryKey
private boolean selectByPrimaryKey(java.lang.Integer primaryKey) throws java.sql.SQLException
selectAll
private java.util.Collection selectAll() throws java.sql.SQLException
selectInDateRange
private java.util.Collection selectInDateRange(java.util.Date start, java.util.Date finish) throws java.sql.SQLException
insertRow
private void insertRow(java.lang.Integer id, com.clra.rowing.RowingSessionState state, java.util.Date date, com.clra.rowing.RowingSessionLevel level, com.clra.rowing.RowingSessionType type) throws java.sql.SQLException
deleteRow
private void deleteRow(java.lang.Integer id) throws java.sql.SQLException
loadRow
private void loadRow()
throws java.sql.SQLException,
com.clra.rowing.RowingException,
javax.ejb.NoSuchEntityException
storeRow
private void storeRow()
throws java.sql.SQLException
nextId
public static java.lang.Integer nextId() throws java.sql.SQLException, javax.ejb.CreateException
- A utility that gets (and reserves) the next id for a rowing session
|
|||||||||
| Home >> All >> com >> clra >> rowing >> [ remote overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC
com.clra.rowing.remote.RowingSessionBean