public class UsersDAOimpl extends AbstractDAO<eu.dnetlib.domain.functionality.UserProfile> implements UsersDAO
datasource, logger
Constructor and Description |
---|
UsersDAOimpl() |
Modifier and Type | Method and Description |
---|---|
boolean |
activateUser(String activation_id) |
boolean |
checkCorrectCreds(String email,
String password) |
eu.dnetlib.domain.functionality.UserProfile |
get(int id) |
eu.dnetlib.domain.functionality.UserProfile |
get(String email) |
protected PreparedStatement |
getDeleteStatement(int id,
Connection con) |
protected PreparedStatement |
getInsertStatement(eu.dnetlib.domain.functionality.UserProfile t,
Connection con) |
protected int |
getLastId() |
protected PreparedStatement |
getUpdateStatement(eu.dnetlib.domain.functionality.UserProfile t,
Connection con) |
boolean |
isActivated(String email) |
boolean |
isAdmin(String email) |
boolean |
isRepoAdmin(String email) |
void |
prepareResetPassword(String uuid,
String email) |
void |
ResetPassword(String uuid,
String password) |
boolean |
userExists(String email) |
boolean |
usernameExists(String username) |
closeConnection, delete, getConnection, getDatasource, save, setDatasource
protected PreparedStatement getUpdateStatement(eu.dnetlib.domain.functionality.UserProfile t, Connection con) throws SQLException
getUpdateStatement
in class AbstractDAO<eu.dnetlib.domain.functionality.UserProfile>
SQLException
protected PreparedStatement getInsertStatement(eu.dnetlib.domain.functionality.UserProfile t, Connection con) throws SQLException
getInsertStatement
in class AbstractDAO<eu.dnetlib.domain.functionality.UserProfile>
SQLException
protected PreparedStatement getDeleteStatement(int id, Connection con) throws SQLException
getDeleteStatement
in class AbstractDAO<eu.dnetlib.domain.functionality.UserProfile>
SQLException
protected int getLastId() throws SQLException
getLastId
in class AbstractDAO<eu.dnetlib.domain.functionality.UserProfile>
SQLException
public eu.dnetlib.domain.functionality.UserProfile get(String email) throws DaoException
get
in interface UsersDAO
DaoException
public boolean activateUser(String activation_id) throws DaoException
activateUser
in interface UsersDAO
DaoException
public eu.dnetlib.domain.functionality.UserProfile get(int id)
public boolean checkCorrectCreds(String email, String password) throws DaoException
checkCorrectCreds
in interface UsersDAO
DaoException
public boolean isAdmin(String email) throws DaoException
isAdmin
in interface UsersDAO
DaoException
public boolean isRepoAdmin(String email) throws DaoException
isRepoAdmin
in interface UsersDAO
DaoException
public boolean isActivated(String email) throws DaoException
isActivated
in interface UsersDAO
DaoException
public boolean userExists(String email) throws DaoException
userExists
in interface UsersDAO
DaoException
public boolean usernameExists(String username) throws DaoException
usernameExists
in interface UsersDAO
DaoException
public void prepareResetPassword(String uuid, String email) throws DaoException
prepareResetPassword
in interface UsersDAO
DaoException
public void ResetPassword(String uuid, String password) throws DaoException
ResetPassword
in interface UsersDAO
DaoException
Copyright © 2023. All rights reserved.