CLRA 0.1.2

com.clra.rowing
Interface IRowingSession

All Superinterfaces:
javax.ejb.EJBObject, java.rmi.Remote

public interface IRowingSession
extends javax.ejb.EJBObject

Represents a rowing session.

Version:
$Revision: 1.2 $ $Date: 2002/02/18 18:04:32 $
Author:
Rick Hall

Method Summary
 void cancel()
          Cancels a rowing session.
 void delete()
          Deletes a rowing session.
 RowingSessionSnapshot getData()
          Returns a snapshot of a rowing session
 Date getDate()
          Returns the date (and time) of a rowing session
 Integer getId()
          Returns the primary key of a rowing session.
 RowingSessionLevel getLevel()
          Returns the level of a rowing session
 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.
 RowingSessionState getState()
          Returns the state of a rowing session.
 RowingSessionType getType()
          Returns the type of a rowing session
 void publish()
          Publishes a rowing session.
 void setData(RowingSessionSnapshot data)
          Sets the date, level and type of a rowing session if the rowing session is TENATIVE.
 void setDate(Date date)
          Edits the date (and time) of a rowing session.
 void setLevel(RowingSessionLevel level)
          Edits the level of a rowing session.
 void setType(RowingSessionType type)
          Edits the type of a rowing session.
 
Methods inherited from interface javax.ejb.EJBObject
getEJBHome, getHandle, getPrimaryKey, isIdentical, remove
 

Method Detail

getNaturalComparator

public ISerializableComparator getNaturalComparator()
                                             throws java.rmi.RemoteException
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 RowingSessionSnapshot getData()
                              throws java.rmi.RemoteException
Returns a snapshot of a rowing session

setData

public void setData(RowingSessionSnapshot data)
             throws java.rmi.RemoteException,
                    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 Integer getId()
              throws java.rmi.RemoteException
Returns the primary key of a rowing session. The id is immutable after a rowing session is created.

getState

public RowingSessionState getState()
                            throws java.rmi.RemoteException
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 java.rmi.RemoteException,
                    RowingSessionStateException
Publishes a rowing session. Only TENATIVE sessions may be published. The state of a published rowing session becomes OPEN.
Throws:
RowingSessionStateException - if a non-tenative rowing session is published.

cancel

public void cancel()
            throws java.rmi.RemoteException,
                   RowingSessionStateException
Cancels a rowing session. A TENTATIVE session may not be cancelled (but a TENATIVE session may be deleted). The state of a cancelled state becomes CANCELLED.
Throws:
RowingSessionStateException - if a tenative rowing session is cancelled.

delete

public void delete()
            throws java.rmi.RemoteException,
                   javax.ejb.RemoveException,
                   RowingSessionStateException
Deletes a rowing session. Only a TENATIVE session may be deleted. A deleted session is removed from the CLRA 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 is required for testing.)

Throws:
RowingSessionStateException - if a non-tenative rowing session is deleted.
See Also:
javax.ebj.EJBObject.remove()

getDate

public Date getDate()
             throws java.rmi.RemoteException
Returns the date (and time) of a rowing session

setDate

public void setDate(Date date)
             throws java.rmi.RemoteException,
                    RowingSessionStateException
Edits the date (and time) of a rowing session. Editing is allowed only for TENATIVE sessions.
Throws:
RowingSessionStateException - if the edited session is not in the TENATIVE state.
See Also:
RowingSessionState

getLevel

public RowingSessionLevel getLevel()
                            throws java.rmi.RemoteException
Returns the level of a rowing session

setLevel

public void setLevel(RowingSessionLevel level)
              throws java.rmi.RemoteException,
                     RowingSessionStateException
Edits the level of a rowing session. Editing is allowed only for TENATIVE sessions.

getType

public RowingSessionType getType()
                          throws java.rmi.RemoteException
Returns the type of a rowing session

setType

public void setType(RowingSessionType type)
             throws java.rmi.RemoteException,
                    RowingSessionStateException
Edits the type of a rowing session. Editing is allowed only for TENATIVE sessions.

CLRA 0.1.2