Annotation Type Noncacheable


  • @Target({METHOD,FIELD})
    @Retention(RUNTIME)
    public @interface Noncacheable
    The NonCacheable annotation is used to configure caching behavior 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 data-source. 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 relationship the Entity B's cache effectively become a FullIdentityMap.
    Author:
    Gordon Yorke
    Since:
    EclipseLink 2.2