vooga.social.socialInfo
Class SocialInfoDatabase

java.lang.Object
  extended by vooga.social.socialInfo.SocialInfoDatabase

public class SocialInfoDatabase
extends java.lang.Object

Database for storing social info for all games in the arcade.

Author:
Heidi Slater

Constructor Summary
SocialInfoDatabase(IVoogaGUI gui)
           
 
Method Summary
 void addData(java.lang.String game, DataType dataType, java.lang.Object o)
          Adds an object associated with the particular dataType and game.
 java.lang.Object getData(java.lang.String game, DataType dataType)
          Retrieves data on a specific game from the server of the particular data type.
 java.lang.String getRanking(java.lang.String gameName)
          Returns a String representation of an integer between 1 and the number of games which have ratings stored in the database.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SocialInfoDatabase

public SocialInfoDatabase(IVoogaGUI gui)
Method Detail

getData

public java.lang.Object getData(java.lang.String game,
                                DataType dataType)
Retrieves data on a specific game from the server of the particular data type. Uses an IDataConverter to convert the data into the desired form. Ranking requires a special case because it is based on rating and not on a separately stored ranking list.

Parameters:
game -
dataType -
Returns:

addData

public void addData(java.lang.String game,
                    DataType dataType,
                    java.lang.Object o)
Adds an object associated with the particular dataType and game. Supports rating, comments, and scores; determination of ranking is handled internally and cannot be set.

Parameters:
game -
dataType -
o -

getRanking

public java.lang.String getRanking(java.lang.String gameName)
Returns a String representation of an integer between 1 and the number of games which have ratings stored in the database. If the game has yet to be rated "No rank" is returned. Rank is based on ratings; the game with the highest rating will have a rank of 1.

Parameters:
gameName -
Returns: