Betty v1.1.0

christophedelory.betty.xml
Class UserDetails

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

public class UserDetails
extends IdDetails
implements XmlRoot

The definition of a user.

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

Constructor Summary
UserDetails()
           
 
Method Summary
 void accept(XmlVisitor visitor)
          Accepts the specified XML visitor.
 Boolean getIsAdmin()
          Specifies that this user is an administrator or not.
 Boolean getIsBetter()
          Specifies that this user is a better or not.
 String getPassword()
          Returns the user password.
 int getRank()
          Returns the better rank value.
 Integer getRankInteger()
          Returns the better rank value.
 Integer getResultInteger()
          Returns the better result.
 int getScore()
          Returns the better score.
 Integer getScoreInteger()
          Returns the better score.
 boolean isAdmin()
          Specifies that this user is an administrator or not.
 boolean isBetter()
          Specifies that this user is a better or not.
 void setIsAdmin(boolean isAdmin)
          Specifies if this user is an administrator or not.
 void setIsAdmin(Boolean isAdmin)
          Specifies if this user is an administrator or not.
 void setIsBetter(boolean isBetter)
          Specifies if this user is a better or not.
 void setIsBetter(Boolean isBetter)
          Specifies if this user is a better or not.
 void setPassword(String password)
          Initializes the user password.
 void setRank(int rank)
          Initializes the better rank value.
 void setRankInteger(Integer rank)
          Initializes the better rank value.
 void setResult(int result)
          Initializes the result value.
 void setResultInteger(Integer result)
          Initializes the result value.
 void setScore(int score)
          Initializes the score value.
 void setScoreInteger(Integer score)
          Initializes the score value.
 
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

UserDetails

public UserDetails()
Method Detail

getIsBetter

public Boolean getIsBetter()
Specifies that this user is a better or not.

Returns:
Boolean.TRUE if this user is a better, Boolean.FALSE otherwise. May be null.
See Also:
setIsBetter(Boolean), isBetter()

setIsBetter

public void setIsBetter(Boolean isBetter)
Specifies if this user is a better or not.

Parameters:
isBetter - Boolean.TRUE if this user is a better, Boolean.FALSE otherwise. May be null.
See Also:
getIsBetter(), setIsBetter(boolean)

isBetter

public boolean isBetter()
Specifies that this user is a better or not. Defaults is false.

Returns:
true if this user is a better, false otherwise.
See Also:
setIsBetter(boolean), getIsBetter()

setIsBetter

public void setIsBetter(boolean isBetter)
Specifies if this user is a better or not.

Parameters:
isBetter - true if this user is a better, false otherwise.
See Also:
isBetter(), setIsBetter(Boolean)

getIsAdmin

public Boolean getIsAdmin()
Specifies that this user is an administrator or not.

Returns:
Boolean.TRUE if this user is an administrator, Boolean.FALSE otherwise. May be null.
See Also:
setIsAdmin(Boolean), isAdmin()

setIsAdmin

public void setIsAdmin(Boolean isAdmin)
Specifies if this user is an administrator or not.

Parameters:
isAdmin - Boolean.TRUE if this user is an administrator, Boolean.FALSE otherwise. May be null.
See Also:
getIsAdmin(), setIsAdmin(boolean)

isAdmin

public boolean isAdmin()
Specifies that this user is an administrator or not. Defaults is false.

Returns:
true if this user is an administrator, false otherwise.
See Also:
setIsAdmin(boolean), getIsAdmin()

setIsAdmin

public void setIsAdmin(boolean isAdmin)
Specifies if this user is an administrator or not.

Parameters:
isAdmin - true if this user is an administrator, false otherwise.
See Also:
isAdmin(), setIsAdmin(Boolean)

getPassword

public String getPassword()
Returns the user password.

Returns:
a password. May be null.
See Also:
setPassword(String)

setPassword

public void setPassword(String password)
Initializes the user password.

Parameters:
password - a password. May be null.
See Also:
getPassword()

setScoreInteger

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

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

getScoreInteger

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

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

setScore

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

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

getScore

public int getScore()
Returns the better score. There is no constraint on its value. Defaults to Integer.MIN_VALUE.

Returns:
a score value.
See Also:
setScore(int), getScoreInteger()

setRankInteger

public void setRankInteger(Integer rank)
Initializes the better 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 better rank value.

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

setRank

public void setRank(int rank)
Initializes the better 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), getRank()

getRank

public int getRank()
Returns the better rank value.

Returns:
a rank value. Shall be strictly greater than 0.
See Also:
setRank(int), getRankInteger()

setResult

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

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

setResultInteger

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

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

getResultInteger

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

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

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.