@Target(value=TYPE) @Retention(value=RUNTIME) public @interface CacheStrategy
| Modifier and Type | Optional Element and Description |
|---|---|
String |
naturalKey
A single property that is a natural unique identifier for the bean.
|
boolean |
readOnly
When set to true the beans returned from a query will default to be
readOnly.
|
boolean |
useBeanCache
When set to true the bean cache will be used unless explicitly stated not
to in a query via
Query.setUseCache(boolean). |
String |
warmingQuery
Specify a query that can be used to warm the cache.
|
public abstract boolean useBeanCache
Query.setUseCache(boolean).public abstract String naturalKey
When a findUnique query is used with this property as the sole expression then there will be a lookup into the L2 natural key cache.
public abstract boolean readOnly
If the bean is readOnly and has no relationships then it may be sharable.
If you try to modify a readOnly bean it will throw an IllegalStateException.
public abstract String warmingQuery
All the beans fetched by this query will be loaded into the bean cache and the query itself will be loaded into the query cache.
The warming query will typically be executed at startup time after a short delay (defaults to a 30 seconds delay).
Copyright © 2015. All rights reserved.