Top Description Methods
org.hibernate.annotations

public @Interface NaturalIdCache

extends Annotation
Annotations
@Target:TYPE
@Retention:RUNTIME
Imports
java.lang.annotation.Retention, .Target

Specifies that mappings from the natural id values of the annotated entity to the corresponding entity id values should be cached in the shared second-level cache. This allows Hibernate to sometimes avoid round trip to the database when a cached entity is retrieved by its natural id.

This annotation is usually used in combination with Cache, since a round trip may only be avoided if the entity itself is also available in the cache.

Authors
Eric Dalquist, Steve Ebersole
See Also
NaturalId

Method Summary

Modifier and TypeMethod and Description
public String
region()

Specifies an explicit cache region name.

Inherited from java.lang.annotation.Annotation:
annotationTypeequalshashCodetoString

Method Detail

regionback to summary
public String region()

Specifies an explicit cache region name.

By default, the region name is EntityName##NaturalId.