Betty v1.1.0

christophedelory.betty.xml
Class ChampionshipDetails

java.lang.Object
  extended by christophedelory.betty.xml.Child
      extended by christophedelory.betty.xml.IdDetails
          extended by christophedelory.betty.xml.ChampionshipDetails
All Implemented Interfaces:
HasRankModel, HasScoreModel, XmlRoot, Serializable

public class ChampionshipDetails
extends IdDetails
implements XmlRoot, HasRankModel, HasScoreModel

The championship XML representation.

Version:
$Revision: 98 $
Author:
Christophe Delory
See Also:
ChampionshipBean, Serialized Form

Constructor Summary
ChampionshipDetails()
           
 
Method Summary
 void accept(XmlVisitor visitor)
          Accepts the specified XML visitor.
 void addPhase(PhaseDetails phase)
          Adds a phase to this championship.
 PhaseDetails findPhaseById(String id)
          Searches for a phase in this XML description that matches the input parameter.
 BetModelDetails getBetModel()
          Returns the bet processing model.
 LocationsDetails getLocations()
          Returns a list of locations optionally attached to this championship.
 List<PhaseDetails> getPhases()
          Returns the list of phases in this championship.
 PlayersDetails getPlayers()
          Returns a list of players optionally attached to this championship.
 RankModelDetails getRankModel()
          Returns the rank processing model.
 ResourcesDetails getResources()
          Returns the list of resources attached to this championship.
 ScoreModelDetails getScoreModel()
          Returns the score processing model.
 String getStartDateString()
          Returns the championship start date as a string.
 UsersDetails getUsers()
          Returns a list of users optionally attached to this championship.
 void setBetModel(BetModelDetails model)
          Initializes the bet processing model.
 void setLocations(LocationsDetails locations)
          Initializes the list of locations optionally attached to this championship.
 void setPlayers(PlayersDetails players)
          Initializes the list of players optionally attached to this championship.
 void setRankModel(RankModelDetails model)
          Initializes the rank processing model.
 void setResources(ResourcesDetails resources)
          Initializes the list of resources attached to this championship.
 void setScoreModel(ScoreModelDetails model)
          Initializes the score processing model.
 void setStartDateString(String date)
          Initializes the championship start date as a string.
 void setUsers(UsersDetails users)
          Initializes the list of users optionally attached to this championship.
 
Methods inherited from class christophedelory.betty.xml.IdDetails
addDescription, addLink, findDescriptionByLocale, findLinkByLocale, getDescriptions, getId, getLinks, setId
 
Methods inherited from class christophedelory.betty.xml.Child
getParent, getRoot, getRoot, getVersion, setParent, setVersion
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface christophedelory.betty.xml.XmlRoot
getVersion, setVersion
 

Constructor Detail

ChampionshipDetails

public ChampionshipDetails()
Method Detail

setStartDateString

public void setStartDateString(String date)
Initializes the championship start date as a string.
Format: "yyyy-MM-dd'T'HH:mm'Z'" (an ISO8601 date-time with explicit (Zulu) time zone).

Parameters:
date - a date as a string. May be null.
Since:
1.1.0
See Also:
getStartDateString()

getStartDateString

public String getStartDateString()
Returns the championship start date as a string.

Returns:
a date as a string. May be null.
Since:
1.1.0
See Also:
setStartDateString(java.lang.String)

getResources

public ResourcesDetails getResources()
Returns the list of resources attached to this championship.

Returns:
a list of resources. May be null.
See Also:
setResources(ResourcesDetails)

setResources

public void setResources(ResourcesDetails resources)
Initializes the list of resources attached to this championship.

Parameters:
resources - a list of resources. May be null.
See Also:
getResources()

getScoreModel

public ScoreModelDetails getScoreModel()
Description copied from interface: HasScoreModel
Returns the score processing model.

Specified by:
getScoreModel in interface HasScoreModel
Returns:
a score processing model. May be null.
See Also:
HasScoreModel.setScoreModel(ScoreModelDetails)

setScoreModel

public void setScoreModel(ScoreModelDetails model)
Description copied from interface: HasScoreModel
Initializes the score processing model.

Specified by:
setScoreModel in interface HasScoreModel
Parameters:
model - a score processing model. May be null.
See Also:
HasScoreModel.getScoreModel()

getRankModel

public RankModelDetails getRankModel()
Description copied from interface: HasRankModel
Returns the rank processing model.

Specified by:
getRankModel in interface HasRankModel
Returns:
a rank processing model. May be null.
See Also:
HasRankModel.setRankModel(RankModelDetails)

setRankModel

public void setRankModel(RankModelDetails model)
Description copied from interface: HasRankModel
Initializes the rank processing model.

Specified by:
setRankModel in interface HasRankModel
Parameters:
model - a rank processing model. May be null.
See Also:
HasRankModel.getRankModel()

getBetModel

public BetModelDetails getBetModel()
Returns the bet processing model.

Returns:
a bet processing model. Shall not be null.
See Also:
setBetModel(BetModelDetails)

setBetModel

public void setBetModel(BetModelDetails model)
Initializes the bet processing model.

Parameters:
model - a bet processing model. Shall not be null.
Throws:
NullPointerException - if model is null.
See Also:
getBetModel()

getLocations

public LocationsDetails getLocations()
Returns a list of locations optionally attached to this championship.

Returns:
a list of locations. May be null.
See Also:
setLocations(LocationsDetails)

setLocations

public void setLocations(LocationsDetails locations)
Initializes the list of locations optionally attached to this championship.

Parameters:
locations - a list of locations. May be null.
See Also:
getLocations()

getPlayers

public PlayersDetails getPlayers()
Returns a list of players optionally attached to this championship.

Returns:
a list of players. May be null.
See Also:
setPlayers(PlayersDetails)

setPlayers

public void setPlayers(PlayersDetails players)
Initializes the list of players optionally attached to this championship.

Parameters:
players - a list of players. May be null.
See Also:
getPlayers()

getUsers

public UsersDetails getUsers()
Returns a list of users optionally attached to this championship.

Returns:
a list of users. May be null.
See Also:
setUsers(UsersDetails)

setUsers

public void setUsers(UsersDetails users)
Initializes the list of users optionally attached to this championship.

Parameters:
users - a list of users. May be null.
See Also:
getUsers()

getPhases

public List<PhaseDetails> getPhases()
Returns the list of phases in this championship.

Returns:
a list of phases. May be empty but not null.
See Also:
addPhase(PhaseDetails)

addPhase

public void addPhase(PhaseDetails phase)
Adds a phase to this championship.

Parameters:
phase - a phase. Shall not be null.
Throws:
NullPointerException - if phase is null.
See Also:
getPhases()

findPhaseById

public PhaseDetails findPhaseById(String id)
Searches for a phase in this XML description that matches the input parameter.

Parameters:
id - a phase identifier. Must not be null.
Returns:
an XML representation of the phase, or null if none was found.
Throws:
NullPointerException - if id is null.
Since:
1.0.0

accept

public void accept(XmlVisitor visitor)
            throws Exception
Description copied from class: IdDetails
Accepts the specified XML visitor.

Specified by:
accept in interface XmlRoot
Overrides:
accept in class IdDetails
Parameters:
visitor - a visitor. Shall not be null.
Throws:
NullPointerException - if visitor is null.
Exception - if any error occurs during the visit.

© 2008-2009 Christophe Delory

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