Betty v1.1.0

christophedelory.betty.model.bet
Interface BetModel

All Superinterfaces:
Model
All Known Implementing Classes:
AbstractBetModel, RankBetModel, VersusBetModel

public interface BetModel
extends Model

The definition of a bet processing model.

Version:
$Revision$
Author:
Christophe Delory

Method Summary
 int getNbBets()
          Returns the number of bets expected per event.
 void processEventBets(LocalEvent dbEvent)
          Processes all bets in the specified event.
 
Methods inherited from interface christophedelory.betty.model.Model
setParameters
 

Method Detail

getNbBets

int getNbBets()
Returns the number of bets expected per event. It cannot be lower than 1, and cannot exceed the number of players involved in the event. A better may bet either n times (n being this number), or not at all (0 times). Defaults to 1.

Returns:
the expected number of bets per event. Shall not be lower than 1.

processEventBets

void processEventBets(LocalEvent dbEvent)
                      throws Exception
Processes all bets in the specified event.

Parameters:
dbEvent - a championship phase's event. Should not be null.
Throws:
NullPointerException - if dbEvent is null.
Exception - if any unexpected error occurs.
See Also:
LocalBet.setScore(int)

© 2008-2009 Christophe Delory

Copyright © 2008-2009 Christophe Delory. All Rights Reserved.