|
FantasySportsModule 0.0.2-dev | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--org.fanfoot.db.Players
Provides access to the player information in the database.
| Field Summary | |
static java.lang.String |
COLLECTION_NAME
The name of the collection in the database that stores the players data |
static java.lang.String |
POSITION_CENTREBACK
The goalkeeper playing position |
static java.lang.String |
POSITION_FORWARD
The goalkeeper playing position |
static java.lang.String |
POSITION_FULLBACK
The goalkeeper playing position |
static java.lang.String |
POSITION_GOALKEEPER
The goalkeeper playing position |
static java.lang.String |
POSITION_MIDFIELD
The goalkeeper playing position |
| Constructor Summary | |
Players()
Create a players object to connect to the default players database and default collection |
|
Players(java.lang.String uri)
Create a players object to connect to the indicated players database with the default colelction |
|
| Method Summary | |
void |
addInfo(java.lang.String strPlayerID,
org.w3c.dom.Element elemInfo)
Add some info to a pl;ayer record. |
void |
addPlayer(java.lang.String firstName,
java.lang.String surname,
java.lang.String registeredTeam,
java.lang.String team,
java.lang.String position)
Add the supplied player to the database. |
void |
addScoringEvents(java.lang.String strPlayerID,
org.w3c.dom.Element event)
Add a scoring event to a player. |
org.w3c.dom.Element |
getPlayer(java.lang.String id)
Get the player associated with the supplied id. |
java.lang.Integer |
getTotalScore(java.lang.String id)
Get the total score of a player. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static java.lang.String COLLECTION_NAME
public static java.lang.String POSITION_GOALKEEPER
public static java.lang.String POSITION_CENTREBACK
public static java.lang.String POSITION_FULLBACK
public static java.lang.String POSITION_MIDFIELD
public static java.lang.String POSITION_FORWARD
| Constructor Detail |
public Players()
throws DBException
DBException - Description of the Exception
public Players(java.lang.String uri)
throws DBException
uri - the uri of the DB to use
DBException - Description of the Exception| Method Detail |
public org.w3c.dom.Element getPlayer(java.lang.String id)
throws DBException
id - the ID of the plaer required
DBException - if there is more than one player with the
supplied ID or is the resource cannot be parsed for any
reason.
public java.lang.Integer getTotalScore(java.lang.String id)
throws DBException,
UnknownPlayerException
id - id of player
DBException - if there is an error accessing the DB
UnknownPlayerException - if the player is not found
public void addScoringEvents(java.lang.String strPlayerID,
org.w3c.dom.Element event)
throws DBException
strPlayerID - ide of player to add event toevent - an element representing the event
DBException - Description of the Exception
DBExeption - if there is a problem updating the DB
public void addPlayer(java.lang.String firstName,
java.lang.String surname,
java.lang.String registeredTeam,
java.lang.String team,
java.lang.String position)
throws DBException
firstName - is the first name of the playersurname - is the surname of the playerregisteredTeam - is the team the player withteam - is the team the player is currently playing forposition - is the players normal position
DBException - Description of the Exception
public void addInfo(java.lang.String strPlayerID,
org.w3c.dom.Element elemInfo)
throws DBException
elemInfo - the info to be addedstrPlayerID - The feature to be added to the Info attribute
DBException - Description of the Exception
|
FantasySportsModule 0.0.2-dev | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||