001package io.ebeanservice.docstore.api; 002 003import io.ebean.docstore.DocQueryContext; 004import io.ebean.text.json.JsonReadOptions; 005import io.ebeaninternal.api.SpiQuery; 006import io.ebeaninternal.api.SpiTransaction; 007 008/** 009 * A Query request for the document store. 010 */ 011public interface DocQueryRequest<T> extends DocQueryContext<T> { 012 013 /** 014 * Return the transaction for this request (can be null for document store only queries). 015 */ 016 SpiTransaction getTransaction(); 017 018 /** 019 * Set the (document store) transaction to use for this query. 020 */ 021 void setTransaction(SpiTransaction transaction); 022 023 /** 024 * Return the query for this request. 025 */ 026 SpiQuery<T> getQuery(); 027 028 /** 029 * Create JsonReadOptions taking into account persistence context and lazy loading support. 030 */ 031 JsonReadOptions createJsonReadOptions(); 032 033 /** 034 * Execute secondary queries. 035 */ 036 void executeSecondaryQueries(boolean forEach); 037 038}