EclipseLink 2.2.0, build 'v20110202-r8913' API Reference

org.eclipse.persistence.annotations
Annotation Type Noncacheable


@Target(value={METHOD,FIELD})
@Retention(value=RUNTIME)
public @interface Noncacheable

The NonCacheable annotation is used to configure caching behaviour for relationships. If this annotation is set on a relationship that relationship will not be cached even though the parent Entity may be cached. Each time the Entity is retrieved the relationship will be reloaded from the datasource. This may be useful for situations where caching of relationships is not desired or when using different EclipseLink IdentityMap types and having cached references extends the cache lifetime of related Entities using a different caching scheme. For instance Entity A references Entity B, Entity A is FullIdentityMap and Entity B is WeakIdentityMap. Without removing the caching of the relationsip the Entity B's cache effectively become a FullIdentityMap.

Author:
Gordon Yorke
Since:
EclipseLink 2.2


EclipseLink 2.2.0, build 'v20110202-r8913' API Reference