|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectuserManager.dbManager.DBManager
public class DBManager
DBManagerInterface.java - communicates with user class to authenticate a given user. Additionally it provides operations to manage a user object for CON-ECT system.
Field Summary | |
---|---|
Active |
active
|
Method Summary | |
---|---|
String |
getFirstName(String username)
Method will retreive firstname of the user from the database. |
int |
getId(String username)
Method will retreive unique system id of the user from the database. |
static DBManager |
getInstance()
Method will return existing DBManager class. |
String |
getLastName(String username)
Method will retreive lastname of the user from the database. |
int |
getStatus(String username)
Method will retreive status of the user with the given username. |
static void |
print()
|
void |
setFirstName(String username)
|
void |
setLastName(String username)
|
void |
setPassword(int id,
String password)
|
void |
setStatus(String username,
int stat)
Method will set the current online status of the user to the database. |
boolean |
validateUser(String username,
String pwd)
This method will validate if user's existance in the database by searching the given username and matching it with the password. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public Active active
Method Detail |
---|
public static DBManager getInstance()
public boolean validateUser(String username, String pwd)
validateUser
in interface DBManagerInterface
username
- username to be searched in the databasepassword
- password to be matched with username
public void setFirstName(String username)
public void setLastName(String username)
public void setPassword(int id, String password)
public void setStatus(String username, int stat)
DBManagerInterface
setStatus
in interface DBManagerInterface
username
- username of students whose status will be setpublic String getFirstName(String username)
DBManagerInterface
getFirstName
in interface DBManagerInterface
username
- of user whose firstname is looked for
public String getLastName(String username)
DBManagerInterface
getLastName
in interface DBManagerInterface
username
- of user whose lastname is looked for
public int getId(String username)
DBManagerInterface
getId
in interface DBManagerInterface
username
- of user whose lastname is looked for
public int getStatus(String username)
DBManagerInterface
getStatus
in interface DBManagerInterface
username
- username of user whose status is returned
public static void print()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |