|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT | |||||||||
@Target(value=TYPE) @Retention(value=RUNTIME) public @interface CacheStrategy
Specify the default cache use specific entity type.
| Optional Element Summary | |
|---|---|
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). |
Query.UseIndex |
useIndex
Default setting for using a text index if it has been defined on this bean type. |
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).
public abstract Query.UseIndex useIndex
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT | |||||||||