Betty v1.1.0

christophedelory.betty.model.score
Class RankScoreModel

java.lang.Object
  extended by christophedelory.betty.model.score.RankScoreModel
All Implemented Interfaces:
Model, ScoreModel

public class RankScoreModel
extends Object
implements ScoreModel

A score processing model based on the player rank in an event. The player result is a rank, and this player is assigned points (the score) according to this rank. The score depends on the rank according to configuration parameters:

  <param id="rank"<score</param>
 
where "rank" is a player rank ranging from 1 to n, and "score" is the associated player score.

Version:
$Revision$
Author:
Christophe Delory

Constructor Summary
RankScoreModel()
           
 
Method Summary
 void processEventPlayerScores(LocalEvent dbEvent)
          Processes all player scores in the specified event.
 void setParameters(List<PropertyDetails> params)
          Initializes this processing model with the specified list of configuration parameters.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RankScoreModel

public RankScoreModel()
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
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.

processEventPlayerScores

public void processEventPlayerScores(LocalEvent dbEvent)
                              throws Exception
Description copied from interface: ScoreModel
Processes all player scores in the specified event.

Specified by:
processEventPlayerScores in interface ScoreModel
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:
LocalPlayerScore.setScore(int)

© 2008-2009 Christophe Delory

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