|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.opensha.refFaultParamDb.dao.db.ContributorDB_DAO
public class ContributorDB_DAO
Title:ContributorDB_DAO.java
Description: This class connects with database to access the Contributor table
Copyright: Copyright (c) 2002
Company:
| Field Summary | |
|---|---|
static String |
CONTRIBUTOR_NAME
|
static String |
EMAIL
|
static String |
PASSWORD
|
static String |
TABLE_NAME
|
| Constructor Summary | |
|---|---|
ContributorDB_DAO(DB_AccessAPI dbAccessAPI)
Constructor. |
|
| Method Summary | |
|---|---|
int |
addContributor(Contributor contributor,
String password)
Add a contributor to the contributor table |
ArrayList<Contributor> |
getAllContributors()
Get a list of all the contributors |
Contributor |
getContributor(int contributorId)
Get contributor corresponding to an Id |
Contributor |
getContributor(String name)
Get the contributor info for a particular contributor name |
Contributor |
getContributorByEmail(String emailAdd)
Get the contributor info for a particular contributor email address |
static String |
getEnryptedPassword(String password)
|
static String |
getPassword(int n)
|
static String |
getRandomPassword()
Get random string |
Contributor |
getValidatedContributor(String name,
String password)
Whether the provided username/password is valid |
boolean |
isContributorValid(String name,
String password)
|
static void |
main(String[] args)
|
boolean |
removeContributor(int contributorId)
Remove a contributor from the table |
void |
resetPasswordByEmail(String email)
reset the password for a contributor in the database |
void |
setDB_Connection(DB_AccessAPI dbAccessAPI)
|
boolean |
updatePassword(String userName,
String oldPassword,
String newPassword)
Update a contributor in the table |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String TABLE_NAME
public static final String CONTRIBUTOR_NAME
public static final String EMAIL
public static final String PASSWORD
| Constructor Detail |
|---|
public ContributorDB_DAO(DB_AccessAPI dbAccessAPI)
dbConnection - | Method Detail |
|---|
public void setDB_Connection(DB_AccessAPI dbAccessAPI)
public int addContributor(Contributor contributor,
String password)
throws InsertException
contributor -
InsertExceptionpublic static String getEnryptedPassword(String password)
public boolean updatePassword(String userName,
String oldPassword,
String newPassword)
throws UpdateException
contributorId - contributor -
UpdateException
public void resetPasswordByEmail(String email)
throws UpdateException
UpdateExceptionpublic static String getRandomPassword()
public static String getPassword(int n)
public Contributor getContributor(int contributorId)
throws QueryException
contributorId -
QueryException
public Contributor getContributor(String name)
throws QueryException
name - username for the contributor
QueryException
public Contributor getContributorByEmail(String emailAdd)
throws QueryException
name - username for the contributor
QueryException
public Contributor getValidatedContributor(String name,
String password)
name - password -
public boolean isContributorValid(String name,
String password)
public boolean removeContributor(int contributorId)
throws UpdateException
contributorId -
UpdateException
public ArrayList<Contributor> getAllContributors()
throws QueryException
QueryExceptionpublic static void main(String[] args)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||