|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Data access object for games.
The data retreival methods (getters) defined by this interface are optional. Implementing classes might elect not to implement them. They are optional because the primary goal of DarTra is tracking darts game data and calculating statistics based on this data. These calculations do not necessarily involve the use of the Java game related objects. For instance when accessing darts data in an RDMS using SQL, there is no immediate need for reconstruction of the original objects.
Persistence management for the Player, Turn and Throw objects is done by this data access object. So Player, Turn and Throw use a Dependent Mapping persistence strategy, Game being the owner object.
Method Summary | |
void |
addGame(Game game)
Add given game to the persistent store. |
java.util.Vector |
getGames()
Load all game objects available in the persistent store. |
Game |
getGameWithId(java.lang.Object id)
Load the game with specified persistent store id. |
java.util.Vector |
getUserGames(User user)
Load all game objects for those games in which given user participated. |
Methods inherited from interface org.dartra.framework.dao.DataAccessObject |
close, getConnection, getDAOFactory, init |
Method Detail |
public void addGame(Game game) throws DataAccessException
Add given game to the persistent store.
DataAccessException
- When there is a problem accessing the persistent store,
for instance when the given game is already present.public Game getGameWithId(java.lang.Object id) throws DataAccessException
Load the game with specified persistent store id.
This is an optional method. Implementing classes might elect not to implement it and can simply return null.
DataAccessException
- When there is a problem accessing the persistent store.public java.util.Vector getGames() throws DataAccessException
Load all game objects available in the persistent store.
This is an optional method. Implementing classes might elect not to implement it and can simply return an empty list.
DataAccessException
- When there is a problem accessing the persistent store.public java.util.Vector getUserGames(User user) throws DataAccessException
Load all game objects for those games in which given user participated.
This is an optional method. Implementing classes might elect not to implement it and can simply return an empty list.
DataAccessException
- When there is a problem accessing the persistent store.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |