public enum QueryCacheStrategy extends Enum<QueryCacheStrategy>
| Enum Constant and Description | 
|---|
| 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. | 
| NO_CACHEA default cache policy stating that the query results should not be cached. | 
| 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. | 
| Modifier and Type | Method and Description | 
|---|---|
| static QueryCacheStrategy | getDefaultStrategy()Returns the default strategy -  NO_CACHE. | 
| static QueryCacheStrategy | safeValueOf(String string)Returns QueryCacheStrategy for the specified string name or default strategy for
 invalid names. | 
| static QueryCacheStrategy | valueOf(String name)Returns 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. | 
public static final QueryCacheStrategy NO_CACHE
public static final QueryCacheStrategy LOCAL_CACHE
public static final QueryCacheStrategy LOCAL_CACHE_REFRESH
public static final QueryCacheStrategy SHARED_CACHE
public static final QueryCacheStrategy SHARED_CACHE_REFRESH
public static QueryCacheStrategy[] values()
for (QueryCacheStrategy c : QueryCacheStrategy.values()) System.out.println(c);
public static QueryCacheStrategy valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullpublic static QueryCacheStrategy safeValueOf(String string)
public static QueryCacheStrategy getDefaultStrategy()
NO_CACHE.Copyright © 2001–2023 Apache Cayenne. All rights reserved.