javax.persistence.SharedCacheMode - JPA enum
javax.persistence
Enum SharedCacheMode
java.lang.Object java.lang.Enum<javax.persistence.SharedCacheMode> javax.persistence.SharedCacheMode
- Implemented Interfaces:
Serializable
,Comparable<SharedCacheMode>
persistence.xml
shared-cache-mode
element, and returned as the result of javax.persistence.spi.PersistenceUnitInfo.getSharedCacheMode()
.- Since:
- JPA 2.0
- Since:
- JPA 2.0
Caching is enabled for all entities except those for which Cacheable(false) is specified. Entities for which Cacheable(false) is specified are not cached.
Since:
JPA 2.0
Caching is enabled for all entities for Cacheable(true)
is specified. All other entities are not cached.
Since:
JPA 2.0
Caching is disabled for the persistence unit.
Since:
JPA 2.0
Caching behavior is undefined: provider-specific defaults may apply.
Since:
JPA 2.0
SharedCacheMode valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type.
Parameters:
name
- the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified name
java.lang.NullPointerException
- if the argument is null
Returns an array containing the constants of this enum type.
This method may be used to iterate over the constants as follows:
for (SharedCacheMode c : SharedCacheMode.values())
System.out.println(c)
Returns:
an array containing the constants of this enum type, in the order they are declared