Interface SpiOrmQueryRequest<T>

    • Method Detail

      • prepareQuery

        void prepareQuery()
        Prepare the query for execution.
      • initTransIfRequired

        void initTransIfRequired()
        This will create a local (readOnly) transaction if no current transaction exists.

        A transaction may have been passed in explicitly or currently be active in the thread local. If not, then a readOnly transaction is created to execute this query.

      • endTransIfRequired

        void endTransIfRequired()
        Will end a locally created transaction.

        It ends the transaction by using a rollback() as the transaction is known to be readOnly.

      • delete

        int delete()
        Execute the query as a delete.
      • update

        int update()
        Execute the query as a update.
      • findCount

        int findCount()
        Execute the find row count query.
      • findIds

        <A> List<A> findIds()
        Execute the find ids query.
      • findEach

        void findEach​(Consumer<T> consumer)
        Execute the find returning a QueryIterator and visitor pattern.
      • findEachWhile

        void findEachWhile​(Predicate<T> consumer)
        Execute the find returning a QueryIterator and visitor pattern.
      • findSet

        Set<TfindSet()
        Execute the query as findSet.
      • findMap

        <K> Map<K,​TfindMap()
        Execute the query as findMap.
      • getFromQueryCache

        <A> A getFromQueryCache()
        Try to get the query result from the query cache.
      • getFromBeanCache

        boolean getFromBeanCache()
        Maybe hit the bean cache returning true if everything was obtained from the cache (that there were no misses). Do this for findList() on many natural keys or many Ids.
      • getBeanCacheHitsAsMap

        <K> Map<K,​TgetBeanCacheHitsAsMap()
        Return the bean cache hits for findMap (when all hits / no misses).
      • resetBeanCacheAutoMode

        void resetBeanCacheAutoMode​(boolean findOne)
        Reset Bean cache mode AUTO - require explicit setting for bean cache use with findList().
      • getDBLikeClause

        String getDBLikeClause​(boolean rawLikeExpression)
        Return the Database platform like clause.
      • markNotQueryOnly

        void markNotQueryOnly()
        Mark the underlying transaction as not being query only.
      • isUseDocStore

        boolean isUseDocStore()
        Return true if this query is expected to use the doc store.
      • isDeleteByStatement

        boolean isDeleteByStatement()
        Return true if delete by statement is allowed for this type given cascade rules etc.
      • setIterateSingleContext

        void setIterateSingleContext()
        Set when we want to use a single persistence context for all beans returned in the query (so all beans are held in memory)