public final class RevenjQueryComposerCache extends Object
| Constructor and Description |
|---|
RevenjQueryComposerCache() |
| Modifier and Type | Method and Description |
|---|---|
Optional<JinqPostgresQuery<?>> |
cacheFindAll(String dataSource,
Optional<JinqPostgresQuery<?>> queryToCache)
Caches a query for finding all the entities of a certain type
|
Optional<JinqPostgresQuery<?>> |
cacheQuery(JinqPostgresQuery<?> base,
String transformationType,
String[] lambdaSources,
Optional<JinqPostgresQuery<?>> resultingQuery)
Inserts a transformed query into the cache.
|
Optional<JinqPostgresQuery<?>> |
findCachedFindAll(String dataSource)
Checks if a query for finding all the entities of a certain type has
already been cached
|
Optional<JinqPostgresQuery<?>> |
findInCache(JinqPostgresQuery<?> base,
String transformationType,
String[] lambdaSources)
Looks up whether a certain transformation is already in the cache or not.
|
public Optional<JinqPostgresQuery<?>> findInCache(JinqPostgresQuery<?> base, String transformationType, String[] lambdaSources)
base - query being transformedtransformationType - type of transformation being applied to the querylambdaSources - array of descriptions of the lambdas used in the querypublic Optional<JinqPostgresQuery<?>> cacheQuery(JinqPostgresQuery<?> base, String transformationType, String[] lambdaSources, Optional<JinqPostgresQuery<?>> resultingQuery)
base - query being transformedtransformationType - type of transformation applied to the querylambdaSources - array of descriptions of the lambdas used in the queryresultingQuery - result of the transformation that should be cachedpublic Optional<JinqPostgresQuery<?>> findCachedFindAll(String dataSource)
dataSource - name of the type of entity the query should returnpublic Optional<JinqPostgresQuery<?>> cacheFindAll(String dataSource, Optional<JinqPostgresQuery<?>> queryToCache)
dataSource - the name of the entity the query returnsqueryToCache - a query that returns all of the entities of the given type.
queryToCache can be null if the programmer just wants to see if
a certain query is already in the cache but doesn't want to
insert a new query.Copyright © 2016. All rights reserved.