|
CLRA 0.1.2 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.clra.rowing.RowingDBRead
This utility class defines common routines for reading snapshots from the database. In cases where read-only lists are presented to a user, these routines are faster than their ejbFind counterparts. However, data should never be written directly back to the database, otherwise in-memory caches maintained by EJB's will be out of synch and data will be corrupted. The class RowingUtils defines utilities with similar signatures that are implemented by calls to EJB's. These operations are appropriate if objects should be cached in memory because they will be modified shortly.
Field Summary | |
static SimpleDateFormat |
dateFormat
The format used to specify a date and time to the database |
static int |
NULL_INT
Labels a null integer in the database, per JDBC |
static SimpleDateFormat |
sdfConvert
The format used to convert a date/time String to a Date |
static SimpleDateFormat |
sdfDBDate
The format used to get a date out of the data base |
static SimpleDateFormat |
sdfDBTime
The format used to get a time out of the data base |
Method Summary | |
static Collection |
findAllEnrollmentSnapshots(int member_id)
Returns a collection of snapshots for all enrollments |
static Collection |
findAllEnrollmentSnapshotsInRange(int member_id,
Date start,
Date finish)
Returns a collection of snapshots for enrollments within an inclusive date range. |
static Collection |
findAllRowingSessionSnapshots()
Returns a collection of snapshots for all rowing sessions |
static Collection |
findAllRowingSessionSnapshotsInRange(Date start,
Date finish)
Returns a collection of snapshots for rowing sessions within an inclusive date range. |
static Collection |
findParticipant2SnapshotsForRowingSession(Integer rowingId)
Returns a collection of Participant2Snapshot instances for the specified rowing session. |
static ParticipantSnapshot |
loadParticipant(Integer participantId)
Returns a Participant identified by a participant id. |
static ParticipantSnapshot |
loadParticipant(Integer memberId,
Integer rowingId)
Returns a Participant identified by a member and rowing id. |
static RowingSessionSnapshot |
loadRowingSession(Integer rowingId)
|
static EnrollmentSnapshot |
mapResultSetToEnrollmentSnapshot(java.sql.ResultSet rs)
Constructs an EnrollmentSnapshot from the current row of a result set. |
static Participant2Snapshot |
mapResultSetToParticipant2Snapshot(java.sql.ResultSet rs)
Constructs an Participant2Snapshot from the current row of a result set. |
static ParticipantSnapshot |
mapResultSetToParticipantSnapshot(java.sql.ResultSet rs)
Constructs an ParticipantSnapshot from the current row of a result set. |
static RowingSessionSnapshot |
mapResultSetToRowingSessionSnapshot(java.sql.ResultSet rs)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int NULL_INT
public static final SimpleDateFormat dateFormat
public static final SimpleDateFormat sdfDBDate
public static final SimpleDateFormat sdfDBTime
public static final SimpleDateFormat sdfConvert
Method Detail |
public static RowingSessionSnapshot loadRowingSession(Integer rowingId) throws java.sql.SQLException, RowingException, javax.ejb.NoSuchEntityException
public static Collection findAllRowingSessionSnapshots() throws RowingException
public static Collection findAllRowingSessionSnapshotsInRange(Date start, Date finish) throws RowingException
public static Collection findAllEnrollmentSnapshots(int member_id) throws RowingException
public static Collection findAllEnrollmentSnapshotsInRange(int member_id, Date start, Date finish) throws RowingException
public static ParticipantSnapshot loadParticipant(Integer participantId) throws java.sql.SQLException, RowingException, javax.ejb.NoSuchEntityException
javax.ejb.NoSuchEntityException
- if the id does not identify
a participantpublic static ParticipantSnapshot loadParticipant(Integer memberId, Integer rowingId) throws java.sql.SQLException, RowingException
public static Collection findParticipant2SnapshotsForRowingSession(Integer rowingId) throws RowingException
public static RowingSessionSnapshot mapResultSetToRowingSessionSnapshot(java.sql.ResultSet rs) throws java.sql.SQLException, RowingException
public static ParticipantSnapshot mapResultSetToParticipantSnapshot(java.sql.ResultSet rs) throws java.sql.SQLException, RowingException
rs
- A result set containing the following columns:rs
- A non-null result set containing the columns specified above.RowingException
- if the result set is exhausted.java.sql.SQLException
- if some database-related error occurspublic static Participant2Snapshot mapResultSetToParticipant2Snapshot(java.sql.ResultSet rs) throws java.sql.SQLException, RowingException
rs
- A result set containing the same columns as ParticipantSnapshot,
plus following columns:rs
- A non-null result set containing the columns specified above.RowingException
- if the result set is exhausted.java.sql.SQLException
- if some database-related error occurspublic static EnrollmentSnapshot mapResultSetToEnrollmentSnapshot(java.sql.ResultSet rs) throws java.sql.SQLException, RowingException
rs
- A result set containing the following columns:rs
- A non-null result set containing the columns specified above.RowingException
- if the result set is exhausted.java.sql.SQLException
- if some database-related error occurs
|
CLRA 0.1.2 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |