Predictions 4.10.0.0

hirondelle.predict.main.lists
Class PredictionListDAO

Object
  extended by hirondelle.predict.main.lists.PredictionListDAO

public final class PredictionListDAO
extends Object

Data Access Object (DAO) for PredictionList objects.

All operations are related to a given user id.


Constructor Summary
PredictionListDAO()
           
 
Method Summary
(package private)  Id add(PredictionList aPredictionList, DateTime aToday)
          Add a new PredictionList to the database.
(package private)  boolean change(PredictionList aPredictionList)
          Update an existing PredictionList.
(package private)  void delete(Id aPredictionListId, Id aUserId)
          Delete a PredictionList.
 PredictionList fetch(Id aPredictionListId, Id aUserId)
          Return a single PredictionList identified by its id, and its user.
 PredictionList fetchPublic(Id aPredictionListId)
          Return a single public PredictionList identified by its id.
 List<PredictionList> list(Id aUserId)
          Return a List of all PredictionList objects for a given user.
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PredictionListDAO

public PredictionListDAO()
Method Detail

list

public List<PredictionList> list(Id aUserId)
                          throws DAOException
Return a List of all PredictionList objects for a given user.

Throws:
DAOException

fetch

public PredictionList fetch(Id aPredictionListId,
                            Id aUserId)
                     throws DAOException
Return a single PredictionList identified by its id, and its user.

Throws:
DAOException

fetchPublic

public PredictionList fetchPublic(Id aPredictionListId)
                           throws DAOException
Return a single public PredictionList identified by its id.

Throws:
DAOException

add

Id add(PredictionList aPredictionList,
       DateTime aToday)
 throws DAOException
Add a new PredictionList to the database.

Parameters:
aToday - defines the creation date of the list.
Returns:
the autogenerated database id, if any.
Throws:
DAOException

change

boolean change(PredictionList aPredictionList)
         throws DAOException
Update an existing PredictionList. The creation date cannot change.

Throws:
DAOException

delete

void delete(Id aPredictionListId,
            Id aUserId)
      throws DAOException,
             ForeignKeyException
Delete a PredictionList.

If an item is linked to this PredictionList, then deletion will fail, and a ForeignKeyException will be thrown.

Throws:
DAOException
ForeignKeyException

Predictions 4.10.0.0

Copyright Hirondelle Systems - Generated 2013Oct19.12.27