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
mainEntityManagerFactoryFields inherited from interface org.europa.together.business.GenericDAO
FEATURE_ID -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleandeactivateAccount(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.booleanverifyAccount(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, updateMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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:AccountDAOFetch an account by his verification code, to enanble the activation / registration procedure.- Specified by:
findAccountByVerificationCodein interfaceAccountDAO- Parameters:
verificationCode- as String- Returns:
- account as AccountDO
-
deactivateAccount
Description copied from interface:AccountDAODeactivates an Account. The Account PrimaryKey (ID) is the email address.- Specified by:
deactivateAccountin interfaceAccountDAO- Parameters:
email- as String- Returns:
- true on success
-
verifyAccount
Description copied from interface:AccountDAOSet an Account to verified. The Account PrimaryKey (ID) is the email address.- Specified by:
verifyAccountin interfaceAccountDAO- Parameters:
email- as String- Returns:
- true on success
-
listActivatedAccounts
Description copied from interface:AccountDAOGet all activated Accounts.- Specified by:
listActivatedAccountsin interfaceAccountDAO- Returns:
- List of AccountDO
-
listDeactivatedAccounts
Description copied from interface:AccountDAOGet all deactivated Accounts.- Specified by:
listDeactivatedAccountsin interfaceAccountDAO- Returns:
- List of AccountDO
-
listNotConfirmedAccounts
Description copied from interface:AccountDAOGet all accounts, which are not verified.- Specified by:
listNotConfirmedAccountsin interfaceAccountDAO- Returns:
- List of AccountDO
-
listAccountsOfRole
Description copied from interface:AccountDAOGet all Accounts for a specified role.- Specified by:
listAccountsOfRolein interfaceAccountDAO- Parameters:
roleName- as String- Returns:
- List of AccountDO
-
listRegisterdAcountsBeforeDate
Description copied from interface:AccountDAOGet all Accounts which registered before a given date.- Specified by:
listRegisterdAcountsBeforeDatein interfaceAccountDAO- Parameters:
date- as Timestamp- Returns:
- List of AccountDO
-
listRegisterdAcountsAfterDate
Description copied from interface:AccountDAOGet all Accounts which registered after a given date.- Specified by:
listRegisterdAcountsAfterDatein interfaceAccountDAO- Parameters:
date- as Timestamp- Returns:
- List of AccountDO
-