public class IgniteRepositoryQuery extends Object implements org.springframework.data.repository.query.RepositoryQuery
Features:
#entityName - the simple class name of the domain entity@Query(value = "SELECT * from #{#entityName} where email = :email") User searchUserByEmail(@Param("email") String email);@Query(value = "SELECT * from #{#entityName} where country = ?#{[0]} and city = ?#{[1]}") ListsearchUsersByCity( @Param("country") String country,@Param("city") String city, Pageable pageable);@Query(value = "SELECT * from #{#entityName} where email = ?") User searchUserByEmail(String email);@Query(value = "SELECT * from #{#entityName} where lucene = ?#{ luceneQueryBuilder.search().refresh(true).filter(luceneQueryBuilder.match('city',#city)).build()}") ListsearchUsersByCity( @Param("city") String city, Pageable pageable);
TextQuery). Examples:
@Query(textQuery = true, value = "email: #{#email}") User searchUserByEmail(@Param("email") String email);@Query(textQuery = true, value = "#{#textToSearch}") ListsearchUsersByText( @Param("textToSearch") String text, Pageable pageable);@Query(textQuery = true, value = "#{[0]}") ListsearchUsersByText(String textToSearch, Pageable pageable); @Query(textQuery = true, value = "#{luceneQueryBuilder.search().refresh(true).filter(luceneQueryBuilder .match('city', #city)).build()}") ListsearchUserByCity( @Param("city") String city, Pageable pageable);
DynamicQueryConfig method parameter. Examples:
@Query(value = "SELECT * from #{#entityName} where email = :email") User searchUserByEmailWithQueryTuning(@Param("email") String email,@Param("ignoredUsedAsQueryTuning") DynamicQueryConfig config);@Query(dynamicQuery = true) ListsearchUsersByCityWithDynamicQuery( @Param("country") String country,@Param("city") String city,@Param("ignoredUsedAsDynamicQueryAndTuning") DynamicQueryConfig config, Pageable pageable); ... DynamicQueryConfig onlyTunning = new DynamicQueryConfig().setCollocated(true); repo.searchUserByEmailWithQueryTuning("user@mail.com", onlyTunning); DynamicQueryConfig withDynamicQuery = new DynamicQueryConfig().value("SELECT * from #{#entityName} where country = ?#{[0] and city = ?#{[1]}").setForceFieldsQuery(true).setLazy(true).setCollocated(true); repo.searchUsersByCityWithDynamicQuery("Spain", "Madrid", withDynamicQuery, new PageRequest(0, 100));
| Modifier and Type | Class and Description |
|---|---|
static class |
IgniteRepositoryQuery.QueryCursorWrapper<T,V>
Ignite QueryCursor wrapper.
|
| Constructor and Description |
|---|
IgniteRepositoryQuery(org.springframework.data.repository.core.RepositoryMetadata metadata,
@Nullable IgniteQuery staticQuery,
Method mtd,
org.springframework.data.projection.ProjectionFactory factory,
IgniteCacheProxy<?,?> cache,
@Nullable DynamicQueryConfig staticQueryConfiguration,
org.springframework.data.repository.query.QueryMethodEvaluationContextProvider queryMethodEvaluationContextProvider)
Instantiates a new Ignite repository query.
|
| Modifier and Type | Method and Description |
|---|---|
Object |
execute(Object[] values)
@param values the values
|
org.springframework.data.repository.query.QueryMethod |
getQueryMethod() |
public IgniteRepositoryQuery(org.springframework.data.repository.core.RepositoryMetadata metadata,
@Nullable
@Nullable IgniteQuery staticQuery,
Method mtd,
org.springframework.data.projection.ProjectionFactory factory,
IgniteCacheProxy<?,?> cache,
@Nullable
@Nullable DynamicQueryConfig staticQueryConfiguration,
org.springframework.data.repository.query.QueryMethodEvaluationContextProvider queryMethodEvaluationContextProvider)
metadata - Metadata.staticQuery - Query.mtd - Method.factory - Factory.cache - Cache.staticQueryConfiguration - the query configurationqueryMethodEvaluationContextProvider - the query method evaluation context providerpublic Object execute(Object[] values)
execute in interface org.springframework.data.repository.query.RepositoryQuerypublic org.springframework.data.repository.query.QueryMethod getQueryMethod()
getQueryMethod in interface org.springframework.data.repository.query.RepositoryQuery
GridGain In-Memory Computing Platform : ver. 8.9.26 Release Date : October 16 2025