Betty v1.1.0

christophedelory.betty.interfaces
Interface LocalBet

All Superinterfaces:
DbEntity, EJBLocalObject

public interface LocalBet
extends EJBLocalObject, DbEntity

Local interface for BetEJB.

Version:
1.1.0
Author:
Christophe Delory
See Also:
UserDetails

Method Summary
 LocalBase getBase()
          Returns the base EJB object attached to this EJB object.
 Date getCreationDate()
          Returns the creation date of this EJB object.
 String getCreationUserId()
          Returns the identifier of the user having created this EJB object.
 LocalPlayerScore getPlayerScore()
          Returns the player score object, target of the bet.
 int getResult()
          Returns the current result.
 int getScore()
          Returns the current score.
 Date getUpdateDate()
          Returns the update date of this EJB object.
 String getUpdateUserId()
          Returns the identifier of the user having performed the last update on this EJB object.
 LocalUser getUser()
          Returns the user EJB object associated with this element.
 void setBase(LocalBase dbBase)
          Initializes the associated EJB object.
 void setPlayerScore(LocalPlayerScore dbPlayerScore)
          Initializes the player score object, target of the bet.
 void setResult(int result)
          Initializes the result value.
 void setScore(int score)
          Initializes the score value.
 void setUpdateDate(Date date)
          Initializes the update date of this EJB object.
 void setUpdateUserId(String userId)
          Initializes the identifier of the user having performed the last update on this EJB object.
 void setUser(LocalUser dbUser)
          Initializes the user EJB object associated with this element.
 
Methods inherited from interface javax.ejb.EJBLocalObject
getEJBLocalHome, getPrimaryKey, isIdentical, remove
 

Method Detail

getScore

int getScore()
Returns the current score. There is no constraint on its value.

Returns:
a score value.
Throws:
EJBException - if any exception occured during the execution of this method.
See Also:
setScore(int)

setScore

void setScore(int score)
Initializes the score value.

Parameters:
score - a score value.
Throws:
EJBException - if any exception occured during the execution of this method.
See Also:
getScore()

getResult

int getResult()
Returns the current result. There is no constraint on its value.

Returns:
a result value.
Throws:
EJBException - if any exception occured during the execution of this method.
See Also:
setResult(int)

setResult

void setResult(int result)
Initializes the result value.

Parameters:
result - a result value.
Throws:
EJBException - if any exception occured during the execution of this method.
See Also:
getResult()

getPlayerScore

LocalPlayerScore getPlayerScore()
Returns the player score object, target of the bet.
Foreign key fields must be nullable by default. This is because the CMP specification requires an insert into the database after the ejbCreate method and an update to it after to pick up CMR changes made in ejbPostCreate. Since the EJB specification does not allow a relationship to be modified until ejbPostCreate, a foreign key will be initially set to null.

Returns:
a player score EJB object. Shall not be null.
Throws:
EJBException - if any exception occured during the execution of this method.
See Also:
setPlayerScore(christophedelory.betty.interfaces.LocalPlayerScore)

setPlayerScore

void setPlayerScore(LocalPlayerScore dbPlayerScore)
Initializes the player score object, target of the bet.

Parameters:
dbPlayerScore - a player score EJB object. Shall not be null.
Throws:
EJBException - if any exception occured during the execution of this method.
See Also:
getPlayerScore()

getUser

LocalUser getUser()
Returns the user EJB object associated with this element.
Foreign key fields must be nullable by default. This is because the CMP specification requires an insert into the database after the ejbCreate method and an update to it after to pick up CMR changes made in ejbPostCreate. Since the EJB specification does not allow a relationship to be modified until ejbPostCreate, a foreign key will be initially set to null.

Returns:
a user EJB object. Shall not be null.
Throws:
EJBException - if any exception occured during the execution of this method.
See Also:
setUser(christophedelory.betty.interfaces.LocalUser)

setUser

void setUser(LocalUser dbUser)
Initializes the user EJB object associated with this element.

Parameters:
dbUser - a user EJB object. Shall not be null.
Throws:
EJBException - if any exception occured during the execution of this method.
See Also:
getUser()

getCreationDate

Date getCreationDate()
Description copied from interface: DbEntity
Returns the creation date of this EJB object.

Specified by:
getCreationDate in interface DbEntity
Returns:
a date. Shall not be null.

getCreationUserId

String getCreationUserId()
Description copied from interface: DbEntity
Returns the identifier of the user having created this EJB object.

Specified by:
getCreationUserId in interface DbEntity
Returns:
a user identifier. Shall not be null.

getUpdateDate

Date getUpdateDate()
Description copied from interface: DbEntity
Returns the update date of this EJB object.

Specified by:
getUpdateDate in interface DbEntity
Returns:
a date. Shall not be null.
See Also:
DbEntity.setUpdateDate(java.util.Date), DbEntity.getUpdateUserId()

setUpdateDate

void setUpdateDate(Date date)
Description copied from interface: DbEntity
Initializes the update date of this EJB object.

Specified by:
setUpdateDate in interface DbEntity
Parameters:
date - a date. Shall not be null.
See Also:
DbEntity.getUpdateDate(), DbEntity.setUpdateUserId(String)

getUpdateUserId

String getUpdateUserId()
Description copied from interface: DbEntity
Returns the identifier of the user having performed the last update on this EJB object.

Specified by:
getUpdateUserId in interface DbEntity
Returns:
a user identifier. Shall not be null.
See Also:
DbEntity.setUpdateUserId(String), DbEntity.getUpdateDate()

setUpdateUserId

void setUpdateUserId(String userId)
Description copied from interface: DbEntity
Initializes the identifier of the user having performed the last update on this EJB object.

Specified by:
setUpdateUserId in interface DbEntity
Parameters:
userId - a user identifier. Shall not be null.
See Also:
DbEntity.getUpdateUserId(), DbEntity.setUpdateDate(java.util.Date)

getBase

LocalBase getBase()
Description copied from interface: DbEntity
Returns the base EJB object attached to this EJB object.
Foreign key fields must be nullable by default. This is because the CMP specification requires an insert into the database after the ejbCreate method and an update to it after to pick up CMR changes made in ejbPostCreate. Since the EJB specification does not allow a relationship to be modified until ejbPostCreate, a foreign key will be initially set to null.

Specified by:
getBase in interface DbEntity
Returns:
a base EJB object. Shall not be null.
See Also:
DbEntity.setBase(christophedelory.interfaces.LocalBase)

setBase

void setBase(LocalBase dbBase)
Description copied from interface: DbEntity
Initializes the associated EJB object.

Specified by:
setBase in interface DbEntity
Parameters:
dbBase - an EJB object. Shall not be null.
See Also:
DbEntity.getBase()

© 2008-2009 Christophe Delory

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