christophedelory.betty.model.bet
Class RankBetModel
java.lang.Object
christophedelory.betty.model.bet.AbstractBetModel
christophedelory.betty.model.bet.RankBetModel
- All Implemented Interfaces:
- BetModel, Model
public class RankBetModel
- extends AbstractBetModel
A bet processing model based on the difference between the player result (its rank) and the user bet.
If the bet is successful (the bet is the player rank), points are earned.
The exact number of points depends on the rank itself, according to configuration parameters:
<param id="rank">points</param>
where "rank
" is a player rank ranging from 1 to n, and "points
" is the number of points earned for a good bet for this rank.
- Version:
- $Revision$
- Author:
- Christophe Delory
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RankBetModel
public RankBetModel()
setParameters
public void setParameters(List<PropertyDetails> params)
throws Exception
- Description copied from interface:
Model
- Initializes this processing model with the specified list of configuration parameters.
- Specified by:
setParameters
in interface Model
- Overrides:
setParameters
in class AbstractBetModel
- Parameters:
params
- a list of configuration parameters. May be empty but not null
.
- Throws:
NullPointerException
- if params
is null
.
Exception
- if any unexpected error occurs.
processEventBets
public void processEventBets(LocalEvent dbEvent)
throws Exception
- Description copied from interface:
BetModel
- 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)
Copyright © 2008-2009 Christophe Delory. All Rights Reserved.