Betty v1.1.0

christophedelory.betty.xml
Class PlayerIdDetails

java.lang.Object
  extended by christophedelory.betty.xml.Child
      extended by christophedelory.betty.xml.IdDetails
          extended by christophedelory.betty.xml.PlayerIdDetails
All Implemented Interfaces:
Serializable

public class PlayerIdDetails
extends IdDetails

The definition of a player reference.

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

Constructor Summary
PlayerIdDetails()
           
 
Method Summary
 void accept(XmlVisitor visitor)
          Accepts the specified XML visitor.
 String getDependencyPhaseId()
          Returns the dependency phase identifier allowing to choose the player (which is not known now in this case).
 int getDependencyPhaseRank()
          Returns the rank in the dependency phase allowing to choose the player (which is not known now in this case).
 Integer getDependencyPhaseRankInteger()
          Returns the rank in the dependency phase allowing to choose the player (which is not known now in this case).
 Integer getRankInteger()
          Returns the player rank value.
 Integer getResultInteger()
          Returns the current player result.
 String getResultString()
          Returns the current player result, as a string.
 Integer getScoreInteger()
          Returns the player score.
 UsersDetails getUsers()
          Returns a list of users optionally attached to this player reference.
 void setDependencyPhaseId(String id)
          Initializes the dependency phase identifier allowing to choose the player (which is not known now in this case).
 void setDependencyPhaseRankInteger(Integer rank)
          Initializes the rank in the dependency phase allowing to choose the player (which is not known now in this case).
 void setRank(int rank)
          Initializes the player rank value.
 void setRankInteger(Integer rank)
          Initializes the player rank value.
 void setResult(int result)
          Initializes the player result value.
 void setResultInteger(Integer result)
          Initializes the player result value.
 void setResultString(String result)
          Initializes the player result value, as a string.
 void setScore(int score)
          Initializes the player score value.
 void setScoreInteger(Integer score)
          Initializes the player score value.
 void setUsers(UsersDetails users)
          Initializes the list of users optionally attached to this player reference.
 
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
 

Constructor Detail

PlayerIdDetails

public PlayerIdDetails()
Method Detail

getDependencyPhaseId

public String getDependencyPhaseId()
Returns the dependency phase identifier allowing to choose the player (which is not known now in this case).

Returns:
a phase identifier. May be null.
See Also:
setDependencyPhaseId(String), getDependencyPhaseRankInteger()

setDependencyPhaseId

public void setDependencyPhaseId(String id)
Initializes the dependency phase identifier allowing to choose the player (which is not known now in this case).

Parameters:
id - a phase identifier. May be null.
See Also:
getDependencyPhaseId(), setDependencyPhaseRankInteger(Integer)

getDependencyPhaseRankInteger

public Integer getDependencyPhaseRankInteger()
Returns the rank in the dependency phase allowing to choose the player (which is not known now in this case).

Returns:
a rank value. May be null. If not, shall be strictly greater than 0.
See Also:
setDependencyPhaseRankInteger(Integer), getDependencyPhaseRank(), getDependencyPhaseId()

setDependencyPhaseRankInteger

public void setDependencyPhaseRankInteger(Integer rank)
Initializes the rank in the dependency phase allowing to choose the player (which is not known now in this case).

Parameters:
rank - a rank value. May be null. If not, shall be strictly greater than 0.
Throws:
IllegalArgumentException - if rank is not null, but its value is not strictly greater than 0.
See Also:
getDependencyPhaseRankInteger(), setDependencyPhaseId(String)

getDependencyPhaseRank

public int getDependencyPhaseRank()
Returns the rank in the dependency phase allowing to choose the player (which is not known now in this case). Defaults to 1.

Returns:
a rank value. Shall be strictly greater than 0.
See Also:
getDependencyPhaseRankInteger()

setScoreInteger

public void setScoreInteger(Integer score)
Initializes the player score value.

Parameters:
score - a score value. May be null.
See Also:
getScoreInteger(), setScore(int)

getScoreInteger

public Integer getScoreInteger()
Returns the player score. There is no constraint on its value.

Returns:
a score value. May be null.
See Also:
setScoreInteger(Integer)

setScore

public void setScore(int score)
Initializes the player score value.

Parameters:
score - a score value.
See Also:
setScoreInteger(Integer)

setRankInteger

public void setRankInteger(Integer rank)
Initializes the player rank value.

Parameters:
rank - a rank value. May be null. If not, shall be strictly greater than 0.
Throws:
IllegalArgumentException - if rank is not null, but its value is not strictly greater than 0.
See Also:
getRankInteger(), setRank(int)

getRankInteger

public Integer getRankInteger()
Returns the player rank value.

Returns:
a rank value. May be null. If not, shall be strictly greater than 0.
See Also:
setRankInteger(Integer)

setRank

public void setRank(int rank)
Initializes the player rank value.

Parameters:
rank - a rank value. Shall be strictly greater than 0.
Throws:
IllegalArgumentException - if rank is not strictly greater than 0.
See Also:
setRankInteger(Integer)

setResult

public void setResult(int result)
Initializes the player result value.

Parameters:
result - a result value.
See Also:
setResultInteger(Integer), setResultString(String)

setResultInteger

public void setResultInteger(Integer result)
Initializes the player result value.

Parameters:
result - a result value. May be null.
See Also:
getResultInteger(), setResult(int), setResultString(String)

getResultInteger

public Integer getResultInteger()
Returns the current player result. There is no constraint on its value.

Returns:
a result value. May be null.
See Also:
setResultInteger(Integer), getResultString()

setResultString

public void setResultString(String result)
Initializes the player result value, as a string.

Parameters:
result - a result value. May be null.
Throws:
NumberFormatException - if the string cannot be parsed as an integer.
Since:
0.9.2
See Also:
getResultString(), setResultInteger(Integer), setResult(int)

getResultString

public String getResultString()
Returns the current player result, as a string. There is no constraint on its value.

Returns:
a result value. May be null.
Since:
0.9.2
See Also:
setResultString(String), getResultInteger()

getUsers

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

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 player reference.

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

accept

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

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.