Class AccountHbmDAO
- All Implemented Interfaces:
Serializable
,AccountDAO
,org.europa.together.business.GenericDAO<AccountDO,
String>
@Repository
@Transactional
public class AccountHbmDAO
extends org.europa.together.application.GenericHbmDAO<AccountDO,String>
implements AccountDAO
Implementation of the AccountDAO.
- See Also:
-
Field Summary
Fields inherited from class org.europa.together.application.GenericHbmDAO
mainEntityManagerFactory
Fields inherited from interface org.europa.together.business.GenericDAO
FEATURE_ID
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
deactivateAccount
(String email) Deactivates an Account.findAccountByVerificationCode
(String verificationCode) Fetch an account by his verification code, to enanble the activation / registration procedure.listAccountsOfRole
(String roleName) Get all Accounts for a specified role.Get all activated Accounts.Get all deactivated Accounts.Get all accounts, which are not verified.Get all Accounts which registered after a given date.Get all Accounts which registered before a given date.boolean
verifyAccount
(String email) Set an Account to verified.Methods inherited from class org.europa.together.application.GenericHbmDAO
countAllElements, create, delete, deserializeJsonAsList, deserializeJsonAsObject, find, getPrimaryKeyOfObject, listAllElements, serializeAsJson, update
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.europa.together.business.GenericDAO
countAllElements, create, delete, deserializeJsonAsList, deserializeJsonAsObject, find, getPrimaryKeyOfObject, listAllElements, serializeAsJson, update
-
Constructor Details
-
AccountHbmDAO
public AccountHbmDAO()Default Constructor.
-
-
Method Details
-
findAccountByVerificationCode
Description copied from interface:AccountDAO
Fetch an account by his verification code, to enanble the activation / registration procedure.- Specified by:
findAccountByVerificationCode
in interfaceAccountDAO
- Parameters:
verificationCode
- as String- Returns:
- account as AccountDO
-
deactivateAccount
Description copied from interface:AccountDAO
Deactivates an Account. The Account PrimaryKey (ID) is the email address.- Specified by:
deactivateAccount
in interfaceAccountDAO
- Parameters:
email
- as String- Returns:
- true on success
-
verifyAccount
Description copied from interface:AccountDAO
Set an Account to verified. The Account PrimaryKey (ID) is the email address.- Specified by:
verifyAccount
in interfaceAccountDAO
- Parameters:
email
- as String- Returns:
- true on success
-
listActivatedAccounts
Description copied from interface:AccountDAO
Get all activated Accounts.- Specified by:
listActivatedAccounts
in interfaceAccountDAO
- Returns:
- List of AccountDO
-
listDeactivatedAccounts
Description copied from interface:AccountDAO
Get all deactivated Accounts.- Specified by:
listDeactivatedAccounts
in interfaceAccountDAO
- Returns:
- List of AccountDO
-
listNotConfirmedAccounts
Description copied from interface:AccountDAO
Get all accounts, which are not verified.- Specified by:
listNotConfirmedAccounts
in interfaceAccountDAO
- Returns:
- List of AccountDO
-
listAccountsOfRole
Description copied from interface:AccountDAO
Get all Accounts for a specified role.- Specified by:
listAccountsOfRole
in interfaceAccountDAO
- Parameters:
roleName
- as String- Returns:
- List of AccountDO
-
listRegisterdAcountsBeforeDate
Description copied from interface:AccountDAO
Get all Accounts which registered before a given date.- Specified by:
listRegisterdAcountsBeforeDate
in interfaceAccountDAO
- Parameters:
date
- as Timestamp- Returns:
- List of AccountDO
-
listRegisterdAcountsAfterDate
Description copied from interface:AccountDAO
Get all Accounts which registered after a given date.- Specified by:
listRegisterdAcountsAfterDate
in interfaceAccountDAO
- Parameters:
date
- as Timestamp- Returns:
- List of AccountDO
-