Betty v1.1.0

christophedelory.interfaces
Interface DbEntity

All Known Subinterfaces:
DbCountryEntity, DbIdEntity, LocalBet, LocalChampionship, LocalEvent, LocalLocation, LocalMetadata, LocalModel, LocalPhase, LocalPlayer, LocalPlayerScore, LocalProperty, LocalResource, LocalUser, LocalUserRole
All Known Implementing Classes:
BetBean, ChampionshipBean, EventBean, LocationBean, MetadataBean, ModelBean, PhaseBean, PlayerBean, PlayerScoreBean, PropertyBean, ResourceBean, UserBean, UserRoleBean

public interface DbEntity

The base definition of an entity bean, acting as a child class of BaseBean.

Version:
$Revision$
Author:
Christophe Delory

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.
 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.
 void setBase(LocalBase dbBase)
          Initializes the associated EJB object.
 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.
 

Method Detail

getBase

LocalBase getBase()
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.

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

setBase

void setBase(LocalBase dbBase)
Initializes the associated EJB object.

Parameters:
dbBase - an EJB object. Shall not be null.
Throws:
EJBException - if any exception occured during the execution of this method.
See Also:
getBase()

getUpdateDate

Date getUpdateDate()
Returns the update date of this EJB object.

Returns:
a date. Shall not be null.
Throws:
EJBException - if any exception occured during the execution of this method.
See Also:
setUpdateDate(java.util.Date), getUpdateUserId()

setUpdateDate

void setUpdateDate(Date date)
Initializes the update date of this EJB object.

Parameters:
date - a date. Shall not be null.
Throws:
EJBException - if any exception occured during the execution of this method.
See Also:
getUpdateDate(), setUpdateUserId(String)

getUpdateUserId

String getUpdateUserId()
Returns the identifier of the user having performed the last update on this EJB object.

Returns:
a user identifier. Shall not be null.
Throws:
EJBException - if any exception occured during the execution of this method.
See Also:
setUpdateUserId(String), getUpdateDate()

setUpdateUserId

void setUpdateUserId(String userId)
Initializes the identifier of the user having performed the last update on this EJB object.

Parameters:
userId - a user identifier. Shall not be null.
Throws:
EJBException - if any exception occured during the execution of this method.
See Also:
getUpdateUserId(), setUpdateDate(java.util.Date)

getCreationDate

Date getCreationDate()
Returns the creation date of this EJB object.

Returns:
a date. Shall not be null.
Throws:
EJBException - if any exception occured during the execution of this method.

getCreationUserId

String getCreationUserId()
Returns the identifier of the user having created this EJB object.

Returns:
a user identifier. Shall not be null.
Throws:
EJBException - if any exception occured during the execution of this method.

© 2008-2009 Christophe Delory

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