Package org.apache.cayenne.query
Enum QueryCacheStrategy
- All Implemented Interfaces:
- Serializable,- Comparable<QueryCacheStrategy>,- java.lang.constant.Constable
Defines query result caching policy.
- Since:
- 3.0
- 
Nested Class SummaryNested classes/interfaces inherited from class java.lang.EnumEnum.EnumDesc<E extends Enum<E>>
- 
Enum Constant SummaryEnum ConstantsEnum ConstantDescriptionA cache policy stating that query results shall be cached by the ObjectContext that originated the query, independent from any other ObjectContexts.A cache policy stating that query results shall be cached by the ObjectContext that originated the query, independent from any other ObjectContexts, however the query that uses this policy should treat current cache state as expired, and force the database fetch.A default cache policy stating that the query results should not be cached.A cache policy ruling that query results shall be cached in a shared location accessible by all ObjectContexts.A cache policy ruling that query results shall be cached in a shared location accessible by all ObjectContexts, however the query that uses this policy should treat current cache state as expired, and force the database fetch.
- 
Method SummaryModifier and TypeMethodDescriptionstatic QueryCacheStrategyReturns the default strategy -NO_CACHE.static QueryCacheStrategysafeValueOf(String string) Returns QueryCacheStrategy for the specified string name or default strategy for invalid names.static QueryCacheStrategyReturns the enum constant of this type with the specified name.static QueryCacheStrategy[]values()Returns an array containing the constants of this enum type, in the order they are declared.
- 
Enum Constant Details- 
NO_CACHEA default cache policy stating that the query results should not be cached.
- 
LOCAL_CACHEA cache policy stating that query results shall be cached by the ObjectContext that originated the query, independent from any other ObjectContexts.
- 
LOCAL_CACHE_REFRESHA cache policy stating that query results shall be cached by the ObjectContext that originated the query, independent from any other ObjectContexts, however the query that uses this policy should treat current cache state as expired, and force the database fetch.
- 
SHARED_CACHEA cache policy ruling that query results shall be cached in a shared location accessible by all ObjectContexts.
- 
SHARED_CACHE_REFRESHA cache policy ruling that query results shall be cached in a shared location accessible by all ObjectContexts, however the query that uses this policy should treat current cache state as expired, and force the database fetch.
 
- 
- 
Method Details- 
valuesReturns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
 
- 
valueOfReturns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
- name- the name of the enum constant to be returned.
- Returns:
- the enum constant with the specified name
- Throws:
- IllegalArgumentException- if this enum type has no constant with the specified name
- NullPointerException- if the argument is null
 
- 
safeValueOfReturns QueryCacheStrategy for the specified string name or default strategy for invalid names.
- 
getDefaultStrategyReturns the default strategy -NO_CACHE.
 
-