Class JdbcAccountArchivePersistenceServiceImpl
java.lang.Object
net.anotheria.portalkit.services.common.persistence.jdbc.BasePersistenceServiceJDBCImpl
net.anotheria.portalkit.services.accountarchive.persistence.jdbc.JdbcAccountArchivePersistenceServiceImpl
- All Implemented Interfaces:
net.anotheria.anoprise.metafactory.Service,AccountArchivePersistenceService,net.anotheria.portalkit.services.common.persistence.jdbc.BasePersistenceService
public class JdbcAccountArchivePersistenceServiceImpl
extends net.anotheria.portalkit.services.common.persistence.jdbc.BasePersistenceServiceJDBCImpl
implements AccountArchivePersistenceService
AccountArchivePersistenceService factory for JDBC implementation.- Since:
- 22.04.14 11:36
- Author:
- VKoulakov
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddeleteAccount(net.anotheria.portalkit.services.common.AccountId id) Deletes the account with submitted id.getAccount(net.anotheria.portalkit.services.common.AccountId id) Returns the account with that account id.getAccounts(List<net.anotheria.portalkit.services.common.AccountId> identities) Returns the list ofAccountIdwith specified identities.Get accounts by query.List<net.anotheria.portalkit.services.common.AccountId> getAccountsByType(int type) Collection<net.anotheria.portalkit.services.common.AccountId> Get all account id's.getCustomNote(net.anotheria.portalkit.services.common.AccountId id) Returns the custom note of the account with the given id.net.anotheria.portalkit.services.common.AccountIdgetIdByEmail(String email) Returns the id of the account with the given email.net.anotheria.portalkit.services.common.AccountIdgetIdByName(String name) Returns the id of the account with the given name.voidsaveAccount(ArchivedAccount account) Saves the account.voidsaveCustomNote(net.anotheria.portalkit.services.common.AccountId id, String customNote) Save custom note.Methods inherited from class net.anotheria.portalkit.services.common.persistence.jdbc.BasePersistenceServiceJDBCImpl
addDaos, cleanupFromUnitTests, getConnection, getDataSource, getPackagePartsToExcludeFromFlywayTableName, init
-
Constructor Details
-
JdbcAccountArchivePersistenceServiceImpl
public JdbcAccountArchivePersistenceServiceImpl()
-
-
Method Details
-
getAccount
public ArchivedAccount getAccount(net.anotheria.portalkit.services.common.AccountId id) throws ArchivedAccountPersistenceServiceException Description copied from interface:AccountArchivePersistenceServiceReturns the account with that account id.- Specified by:
getAccountin interfaceAccountArchivePersistenceService- Parameters:
id- account identity- Returns:
ArchivedAccount- Throws:
ArchivedAccountPersistenceServiceException- if some error occurred
-
getAccounts
public List<ArchivedAccount> getAccounts(List<net.anotheria.portalkit.services.common.AccountId> identities) throws ArchivedAccountPersistenceServiceException Description copied from interface:AccountArchivePersistenceServiceReturns the list ofAccountIdwith specified identities.- Specified by:
getAccountsin interfaceAccountArchivePersistenceService- Parameters:
identities- list of identities to find.- Returns:
- list of
AccountId - Throws:
ArchivedAccountPersistenceServiceException- if some error occurred
-
getAllAccounts
- Specified by:
getAllAccountsin interfaceAccountArchivePersistenceService- Returns:
- list of
AccountId - Throws:
ArchivedAccountPersistenceServiceException
-
saveAccount
Description copied from interface:AccountArchivePersistenceServiceSaves the account.- Specified by:
saveAccountin interfaceAccountArchivePersistenceService- Parameters:
account-ArchivedAccountto be saved- Throws:
ArchivedAccountPersistenceServiceException- if some error occurred
-
deleteAccount
public void deleteAccount(net.anotheria.portalkit.services.common.AccountId id) throws ArchivedAccountPersistenceServiceException Description copied from interface:AccountArchivePersistenceServiceDeletes the account with submitted id.- Specified by:
deleteAccountin interfaceAccountArchivePersistenceService- Parameters:
id- account identity- Throws:
ArchivedAccountPersistenceServiceException- if some error occurred
-
getIdByName
public net.anotheria.portalkit.services.common.AccountId getIdByName(String name) throws ArchivedAccountPersistenceServiceException Description copied from interface:AccountArchivePersistenceServiceReturns the id of the account with the given name.- Specified by:
getIdByNamein interfaceAccountArchivePersistenceService- Parameters:
name- account name to find- Returns:
AccountId- Throws:
ArchivedAccountPersistenceServiceException- if some error occurred
-
getCustomNote
public String getCustomNote(net.anotheria.portalkit.services.common.AccountId id) throws ArchivedAccountPersistenceServiceException Description copied from interface:AccountArchivePersistenceServiceReturns the custom note of the account with the given id.- Specified by:
getCustomNotein interfaceAccountArchivePersistenceService- Parameters:
id- account id to find- Returns:
- custom note
- Throws:
ArchivedAccountPersistenceServiceException- if some error occurred
-
saveCustomNote
public void saveCustomNote(net.anotheria.portalkit.services.common.AccountId id, String customNote) throws ArchivedAccountPersistenceServiceException Description copied from interface:AccountArchivePersistenceServiceSave custom note.- Specified by:
saveCustomNotein interfaceAccountArchivePersistenceService- Parameters:
id- account idcustomNote- custom note- Throws:
ArchivedAccountPersistenceServiceException- if some error occurred
-
getIdByEmail
public net.anotheria.portalkit.services.common.AccountId getIdByEmail(String email) throws ArchivedAccountPersistenceServiceException Description copied from interface:AccountArchivePersistenceServiceReturns the id of the account with the given email.- Specified by:
getIdByEmailin interfaceAccountArchivePersistenceService- Parameters:
email- account email to find- Returns:
- AccountId
- Throws:
ArchivedAccountPersistenceServiceException- if some error occurred
-
getAllAccountIds
public Collection<net.anotheria.portalkit.services.common.AccountId> getAllAccountIds() throws ArchivedAccountPersistenceServiceExceptionDescription copied from interface:AccountArchivePersistenceServiceGet all account id's.- Specified by:
getAllAccountIdsin interfaceAccountArchivePersistenceService- Returns:
CollectionofAccountId- Throws:
ArchivedAccountPersistenceServiceException- if some error occurred
-
getAccountsByType
public List<net.anotheria.portalkit.services.common.AccountId> getAccountsByType(int type) throws ArchivedAccountPersistenceServiceException - Specified by:
getAccountsByTypein interfaceAccountArchivePersistenceService- Parameters:
type- account id.- Returns:
- list of
AccountId - Throws:
ArchivedAccountPersistenceServiceException- if some error occurred
-
getAccountsByQuery
public List<ArchivedAccount> getAccountsByQuery(ArchivedAccountQuery query) throws ArchivedAccountPersistenceServiceException Description copied from interface:AccountArchivePersistenceServiceGet accounts by query.- Specified by:
getAccountsByQueryin interfaceAccountArchivePersistenceService- Parameters:
query-ArchivedAccountQuery- Returns:
ListofArchivedAccount- Throws:
ArchivedAccountPersistenceServiceException- if some error occurred
-