Betty v1.1.0

christophedelory.betty.model.bet
Class VersusBetModel

java.lang.Object
  extended by christophedelory.betty.model.bet.AbstractBetModel
      extended by christophedelory.betty.model.bet.VersusBetModel
All Implemented Interfaces:
BetModel, Model

public class VersusBetModel
extends AbstractBetModel

A bet processing model based on the result of a confrontation of two players. Points can be earned in two cases:

The number of points earned depends on two configuration parameters:
        <param id="exact-player-results">points</param>
        <param id="exact-event-result">points</param>
 
where "points" is of course the number of points earned in the two cases.

Version:
$Revision$
Author:
Christophe Delory

Constructor Summary
VersusBetModel()
           
 
Method Summary
 void processEventBets(LocalEvent dbEvent)
          Processes all bets in the specified event.
 void setParameters(List<PropertyDetails> params)
          Initializes this processing model with the specified list of configuration parameters.
 
Methods inherited from class christophedelory.betty.model.bet.AbstractBetModel
getNbBets
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VersusBetModel

public VersusBetModel()
Method Detail

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)

© 2008-2009 Christophe Delory

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