Package org.cyclos.impl.sql.postgresql
Class PostgresqlTransactionSearchHandlerImpl
- java.lang.Object
-
- org.cyclos.impl.sql.postgresql.BasePostgresqlEntitySearchHandlerImpl<Transaction,TransactionOverviewQuery,TransactionResultVO>
-
- org.cyclos.impl.sql.postgresql.PostgresqlTransactionSearchHandlerImpl
-
- All Implemented Interfaces:
EntitySearchHandler<Transaction,TransactionOverviewQuery,TransactionResultVO>,RemovableEntitySearchHandler<Transaction,TransactionOverviewQuery,TransactionResultVO>,TransactionSearchHandler
public class PostgresqlTransactionSearchHandlerImpl extends BasePostgresqlEntitySearchHandlerImpl<Transaction,TransactionOverviewQuery,TransactionResultVO> implements TransactionSearchHandler
Database implementation for searching transactions
-
-
Field Summary
Fields Modifier and Type Field Description protected DataTranslationHandlerdataTranslationHandler-
Fields inherited from class org.cyclos.impl.sql.postgresql.BasePostgresqlEntitySearchHandlerImpl
beanHandler, conversionHandler, jdbcTemplate, rawEntityManagerHandler, searchHandler
-
-
Constructor Summary
Constructors Constructor Description PostgresqlTransactionSearchHandlerImpl(PostgresqlSearchHandlerImpl searchHandler)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description com.mysema.commons.lang.CloseableIterator<Transaction>iterateEntities(TransactionOverviewQuery params)Iterates entities which match the given querycom.mysema.commons.lang.CloseableIterator<Long>iterateIds(TransactionOverviewQuery params)Iterates ids which match the given queryvoidreindex()Reindexes all data.Page<TransactionResultVO>search(TransactionOverviewQuery params)Performs the search for a page of resultsPage<TransactionResultVO>searchTransactions(TransactionQuery params)Searches transactions from the POV of a specific ownerTransactionResultVOtoResult(SessionData sessionData, InternalAccountOwner owner, Transaction transaction)static TransactionResultVOtoResult(SessionData sessionData, InternalAccountOwner owner, Transaction transaction, ConversionHandler conversionHandler, DataTranslationHandler dataTranslationHandler)We have this static version because there are some searches that aren't implemented in Elasticsearch.-
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
-
-
-
-
Field Detail
-
dataTranslationHandler
@Autowired @Lazy protected DataTranslationHandler dataTranslationHandler
-
-
Constructor Detail
-
PostgresqlTransactionSearchHandlerImpl
public PostgresqlTransactionSearchHandlerImpl(PostgresqlSearchHandlerImpl searchHandler)
-
-
Method Detail
-
toResult
public static TransactionResultVO toResult(SessionData sessionData, InternalAccountOwner owner, Transaction transaction, ConversionHandler conversionHandler, DataTranslationHandler dataTranslationHandler)
We have this static version because there are some searches that aren't implemented in Elasticsearch. And we do not want to copy & paste the code (search for references to this method). After all searches are supported by the ES search handlers then this method can be transformed into an instance method.
-
iterateEntities
public com.mysema.commons.lang.CloseableIterator<Transaction> iterateEntities(TransactionOverviewQuery params)
Description copied from interface:EntitySearchHandlerIterates entities which match the given query- Specified by:
iterateEntitiesin interfaceEntitySearchHandler<Transaction,TransactionOverviewQuery,TransactionResultVO>
-
iterateIds
public com.mysema.commons.lang.CloseableIterator<Long> iterateIds(TransactionOverviewQuery params)
Description copied from interface:EntitySearchHandlerIterates ids which match the given query- Specified by:
iterateIdsin interfaceEntitySearchHandler<Transaction,TransactionOverviewQuery,TransactionResultVO>
-
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<Transaction,TransactionOverviewQuery,TransactionResultVO>
-
search
public Page<TransactionResultVO> search(TransactionOverviewQuery params)
Description copied from interface:EntitySearchHandlerPerforms the search for a page of results- Specified by:
searchin interfaceEntitySearchHandler<Transaction,TransactionOverviewQuery,TransactionResultVO>
-
searchTransactions
public Page<TransactionResultVO> searchTransactions(TransactionQuery params)
Description copied from interface:TransactionSearchHandlerSearches transactions from the POV of a specific owner- Specified by:
searchTransactionsin interfaceTransactionSearchHandler
-
toResult
public TransactionResultVO toResult(SessionData sessionData, InternalAccountOwner owner, Transaction transaction)
-
-