- All Known Implementing Classes:
AccountDAOImpl
public interface AccountDAO
-
Method Summary
| Modifier and Type |
Method |
Description |
Account |
findAccountByEmail(java.lang.String email) |
this function can search if the email is
just registered into the db.
|
java.lang.String |
getAccountDocumentIdByEmail(java.lang.String email) |
This DAO method looks for the document id of an account.
|
java.util.ArrayList<Account> |
getAccounts() |
This function read the saved accounts into the db.
|
boolean |
saveAccount(Account utente) |
this function save the account into the db.
|
boolean |
updatePassword(java.lang.String email,
java.lang.String password) |
This DAO method changes the password of an account.
|
-
Method Details
-
saveAccount
boolean saveAccount(
Account utente)
throws
java.io.IOException
this function save the account into the db.
- Parameters:
utente - the user
- Returns:
- true or false
- Throws:
java.io.IOException
-
findAccountByEmail
Account findAccountByEmail(
java.lang.String email)
throws
java.io.IOException,
java.util.concurrent.ExecutionException,
java.lang.InterruptedException
this function can search if the email is
just registered into the db.
- Parameters:
email - is the pk to find the user into the db
- Returns:
- the Account if the email is registered,
or "null" if the email isn't registered.
- Throws:
java.io.IOException
java.util.concurrent.ExecutionException
java.lang.InterruptedException
-
updatePassword
boolean updatePassword(java.lang.String email,
java.lang.String password)
throws java.io.IOException,
java.util.concurrent.ExecutionException,
java.lang.InterruptedException
This DAO method changes the password of an account.
- Parameters:
email - of the account
password - updated
- Returns:
- true after the change has taken place
- Throws:
java.io.IOException
java.util.concurrent.ExecutionException
java.lang.InterruptedException
-
getAccountDocumentIdByEmail
java.lang.String getAccountDocumentIdByEmail(java.lang.String email)
throws java.io.IOException,
java.util.concurrent.ExecutionException,
java.lang.InterruptedException
This DAO method looks for the document id of an account.
- Parameters:
email - of the account
- Returns:
- the document Id
- Throws:
java.io.IOException
java.util.concurrent.ExecutionException
java.lang.InterruptedException
-
getAccounts
java.util.ArrayList<Account> getAccounts()
throws
java.io.IOException,
java.util.concurrent.ExecutionException,
java.lang.InterruptedException
This function read the saved accounts into the db.
- Returns:
- List of the accounts
- Throws:
java.io.IOException
java.util.concurrent.ExecutionException
java.lang.InterruptedException