|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.mycompany.messages.EmployeeRegistryBean
This class is an example of an application specific interface to a data source (faked here, but it could be a database). It contains methods for authenticating a user, and retrieving and updating user information.
Field Summary | |
private java.util.Map |
dataSource
|
Constructor Summary | |
EmployeeRegistryBean()
|
Method Summary | |
EmployeeBean |
authenticate(java.lang.String username,
java.lang.String password)
Returns an EmployeeBean if the specified user name and password match an employee in the database, otherwise null. |
EmployeeBean |
getEmployee(java.lang.String username)
Returns an EmployeeBean initialized with the information found in the database for the specified employee, or null if not found. |
void |
saveEmployee(EmployeeBean empInfo)
Inserts the information about the specified employee, or updates the information if it's already defined. |
void |
setDataSource(java.util.Map dataSource)
Sets the dataSource property value. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private java.util.Map dataSource
Constructor Detail |
public EmployeeRegistryBean()
Method Detail |
public void setDataSource(java.util.Map dataSource)
public EmployeeBean authenticate(java.lang.String username, java.lang.String password)
public EmployeeBean getEmployee(java.lang.String username)
public void saveEmployee(EmployeeBean empInfo)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |