Package org.cyclos.impl.sql.postgresql
Class PostgresqlUserSearchHandlerImpl
- java.lang.Object
-
- org.cyclos.impl.sql.postgresql.BasePostgresqlEntitySearchHandlerImpl<User,UserQuery,UserWithFieldsVO>
-
- org.cyclos.impl.sql.postgresql.PostgresqlUserSearchHandlerImpl
-
- All Implemented Interfaces:
EntitySearchHandler<User,UserQuery,UserWithFieldsVO>,RemovableEntitySearchHandler<User,UserQuery,UserWithFieldsVO>,UserSearchHandler
public class PostgresqlUserSearchHandlerImpl extends BasePostgresqlEntitySearchHandlerImpl<User,UserQuery,UserWithFieldsVO> implements UserSearchHandler
Database implementation for searching users
-
-
Field Summary
-
Fields inherited from class org.cyclos.impl.sql.postgresql.BasePostgresqlEntitySearchHandlerImpl
beanHandler, conversionHandler, jdbcTemplate, rawEntityManagerHandler, searchHandler
-
-
Constructor Summary
Constructors Constructor Description PostgresqlUserSearchHandlerImpl(PostgresqlSearchHandlerImpl searchHandler)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description UsersWithBalancesOverviewgetBalancesOverview(UserWithBalanceQuery params)Returns an overview with summaries for all matching balancescom.mysema.commons.lang.CloseableIterator<User>iterateEntities(UserQuery params)Iterates entities which match the given querycom.mysema.commons.lang.CloseableIterator<Long>iterateIds(UserQuery params)Iterates ids which match the given queryvoidonBrokerChange(User user)Callback used to update the broker references for the given uservoidonGroupChange(User user)Callback used to update the group reference for the given uservoidreindex()Reindexes all data.Page<UserWithFieldsVO>search(UserQuery params)Performs the search for a page of resultsPage<UserWithBalanceVO>searchWithBalances(UserWithBalanceQuery params)Searches users with their respective balancesvoidupdateBalances(Map<UserAccount,AccountStatusUpdateResult> updates)Updates all the given account fieldsvoidupdateLastLogin(User user, Date lastLogin)Updates the last login of the given uservoidupdateUserFields(User user)Updates the user fields which can also affect searches on related data, such as advertisements and records.-
Methods inherited from class org.cyclos.impl.sql.postgresql.BasePostgresqlEntitySearchHandlerImpl
index, indexName, reindexCustomValues, remove
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.cyclos.impl.search.EntitySearchHandler
index, indexName
-
-
-
-
Constructor Detail
-
PostgresqlUserSearchHandlerImpl
public PostgresqlUserSearchHandlerImpl(PostgresqlSearchHandlerImpl searchHandler)
-
-
Method Detail
-
getBalancesOverview
public UsersWithBalancesOverview getBalancesOverview(UserWithBalanceQuery params)
Description copied from interface:UserSearchHandlerReturns an overview with summaries for all matching balances- Specified by:
getBalancesOverviewin interfaceUserSearchHandler
-
iterateEntities
public com.mysema.commons.lang.CloseableIterator<User> iterateEntities(UserQuery params)
Description copied from interface:EntitySearchHandlerIterates entities which match the given query- Specified by:
iterateEntitiesin interfaceEntitySearchHandler<User,UserQuery,UserWithFieldsVO>
-
iterateIds
public com.mysema.commons.lang.CloseableIterator<Long> iterateIds(UserQuery params)
Description copied from interface:EntitySearchHandlerIterates ids which match the given query- Specified by:
iterateIdsin interfaceEntitySearchHandler<User,UserQuery,UserWithFieldsVO>
-
onBrokerChange
public void onBrokerChange(User user)
Description copied from interface:UserSearchHandlerCallback used to update the broker references for the given user- Specified by:
onBrokerChangein interfaceUserSearchHandler
-
onGroupChange
public void onGroupChange(User user)
Description copied from interface:UserSearchHandlerCallback used to update the group reference for the given user- Specified by:
onGroupChangein interfaceUserSearchHandler
-
reindex
public void reindex()
Description copied from interface:EntitySearchHandlerReindexes all data. This is only called by scripts, in case the admin needs to reindex the data.- Specified by:
reindexin interfaceEntitySearchHandler<User,UserQuery,UserWithFieldsVO>
-
search
public Page<UserWithFieldsVO> search(UserQuery params)
Description copied from interface:EntitySearchHandlerPerforms the search for a page of results- Specified by:
searchin interfaceEntitySearchHandler<User,UserQuery,UserWithFieldsVO>
-
searchWithBalances
public Page<UserWithBalanceVO> searchWithBalances(UserWithBalanceQuery params)
Description copied from interface:UserSearchHandlerSearches users with their respective balances- Specified by:
searchWithBalancesin interfaceUserSearchHandler
-
updateBalances
public void updateBalances(Map<UserAccount,AccountStatusUpdateResult> updates)
Description copied from interface:UserSearchHandlerUpdates all the given account fields- Specified by:
updateBalancesin interfaceUserSearchHandler
-
updateLastLogin
public void updateLastLogin(User user, Date lastLogin)
Description copied from interface:UserSearchHandlerUpdates the last login of the given user- Specified by:
updateLastLoginin interfaceUserSearchHandler
-
updateUserFields
public void updateUserFields(User user)
Description copied from interface:UserSearchHandlerUpdates the user fields which can also affect searches on related data, such as advertisements and records. The affected data is, for example, group, brokers, status and profile fields.- Specified by:
updateUserFieldsin interfaceUserSearchHandler
-
-