Predictions 4.10.0.0

hirondelle.predict.main.prediction
Class PredictionDAO

Object
  extended by hirondelle.predict.main.prediction.PredictionDAO

public final class PredictionDAO
extends Object

Data Access Object (DAO) for Prediction objects.


Constructor Summary
PredictionDAO()
           
 
Method Summary
(package private)  Id add(Prediction aPrediction, Id aPredictionListId, DateTime aNow)
          Add a new Prediction to the database.
(package private)  boolean change(Prediction aPrediction, Id aPredictionListId, DateTime aToday)
          Update an existing Prediction.
(package private)  void delete(Id aPredictionId, Id aPredictionListId)
          Delete a Prediction.
(package private)  Prediction fetch(Id aPredictionId, Id aPredictionListId)
          Return a single Prediction identified by its id, and its Prediction List id.
(package private)  Id fetchLoginNameFor(Id aParentId)
          Return the login name of the user that owns the given prediction list
 List<Prediction> list(Id aPredictionListId)
          Return a List of all Prediction objects in a specified Prediction List.
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PredictionDAO

public PredictionDAO()
Method Detail

list

public List<Prediction> list(Id aPredictionListId)
                      throws DAOException
Return a List of all Prediction objects in a specified Prediction List.

Throws:
DAOException

fetch

Prediction fetch(Id aPredictionId,
                 Id aPredictionListId)
           throws DAOException
Return a single Prediction identified by its id, and its Prediction List id.

Throws:
DAOException

add

Id add(Prediction aPrediction,
       Id aPredictionListId,
       DateTime aNow)
 throws DAOException,
        DuplicateException
Add a new Prediction to the database.

Returns:
the autogenerated database id, if any.
Throws:
DAOException
DuplicateException

change

boolean change(Prediction aPrediction,
               Id aPredictionListId,
               DateTime aToday)
         throws DAOException,
                DuplicateException
Update an existing Prediction.

The outcome date is set only when the outcome itself has changed from its previous value.

Returns:
true only if the edit is executed successfullly.
Throws:
DAOException
DuplicateException

delete

void delete(Id aPredictionId,
            Id aPredictionListId)
      throws DAOException
Delete a Prediction.

Throws:
DAOException

fetchLoginNameFor

Id fetchLoginNameFor(Id aParentId)
               throws DAOException
Return the login name of the user that owns the given prediction list

Parameters:
aParentId - identifies the prediction list.
Throws:
DAOException

Predictions 4.10.0.0

Copyright Hirondelle Systems - Generated 2013Oct19.12.27