public interface NaturalIdDataAccess extends CachedDomainDataAccess
insert(org.hibernate.engine.spi.SharedSessionContractImplementor, java.lang.Object, java.lang.Object)
-> afterInsert(org.hibernate.engine.spi.SharedSessionContractImplementor, java.lang.Object, java.lang.Object)
CachedDomainDataAccess.lockItem(org.hibernate.engine.spi.SharedSessionContractImplementor, java.lang.Object, java.lang.Object)
-> CachedDomainDataAccess.remove(org.hibernate.engine.spi.SharedSessionContractImplementor, java.lang.Object)
-> update(org.hibernate.engine.spi.SharedSessionContractImplementor, java.lang.Object, java.lang.Object)
-> afterUpdate(org.hibernate.engine.spi.SharedSessionContractImplementor, java.lang.Object, java.lang.Object, org.hibernate.cache.spi.access.SoftLock)
CachedDomainDataAccess.lockItem(org.hibernate.engine.spi.SharedSessionContractImplementor, java.lang.Object, java.lang.Object)
-> CachedDomainDataAccess.remove(org.hibernate.engine.spi.SharedSessionContractImplementor, java.lang.Object)
-> CachedDomainDataAccess.unlockItem(org.hibernate.engine.spi.SharedSessionContractImplementor, java.lang.Object, org.hibernate.cache.spi.access.SoftLock)
@putFromLoad
CachedDomainDataAccess.lockRegion()
-> CachedDomainDataAccess.removeAll(org.hibernate.engine.spi.SharedSessionContractImplementor)
-> CachedDomainDataAccess.unlockRegion(org.hibernate.cache.spi.access.SoftLock)
IMPORTANT : NaturalIds are not versioned so null
will always be passed to the version parameter to:Modifier and Type | Method and Description |
---|---|
boolean |
afterInsert(SharedSessionContractImplementor session,
Object key,
Object value)
Called afterQuery an item has been inserted (afterQuery the transaction completes),
instead of calling release().
|
boolean |
afterUpdate(SharedSessionContractImplementor session,
Object key,
Object value,
SoftLock lock)
Called afterQuery an item has been updated (afterQuery the transaction completes),
instead of calling release().
|
Object |
generateCacheKey(Object[] naturalIdValues,
EntityPersister rootEntityDescriptor,
SharedSessionContractImplementor session)
To create instances of NaturalIdCacheKey for this region, Hibernate will invoke this method
exclusively so that generated implementations can generate optimised keys.
|
Object[] |
getNaturalIdValues(Object cacheKey)
Performs reverse operation to
generateCacheKey(java.lang.Object[], org.hibernate.persister.entity.EntityPersister, org.hibernate.engine.spi.SharedSessionContractImplementor) , returning
the original naturalIdValues. |
boolean |
insert(SharedSessionContractImplementor session,
Object key,
Object value)
Called afterQuery an item has been inserted (beforeQuery the transaction completes),
instead of calling evict().
|
boolean |
update(SharedSessionContractImplementor session,
Object key,
Object value)
Called afterQuery an item has been updated (beforeQuery the transaction completes),
instead of calling evict().
|
contains, evict, evictAll, get, getAccessType, getRegion, lockItem, lockRegion, putFromLoad, putFromLoad, remove, removeAll, unlockItem, unlockRegion
Object generateCacheKey(Object[] naturalIdValues, EntityPersister rootEntityDescriptor, SharedSessionContractImplementor session)
naturalIdValues
- the sequence of values which unequivocally identifies a cached element on this regionrootEntityDescriptor
- the persister of the element being cachedObject[] getNaturalIdValues(Object cacheKey)
generateCacheKey(java.lang.Object[], org.hibernate.persister.entity.EntityPersister, org.hibernate.engine.spi.SharedSessionContractImplementor)
, returning
the original naturalIdValues.cacheKey
- key returned from generateCacheKey(java.lang.Object[], org.hibernate.persister.entity.EntityPersister, org.hibernate.engine.spi.SharedSessionContractImplementor)
boolean insert(SharedSessionContractImplementor session, Object key, Object value)
session
- Current sessionkey
- The item keyvalue
- The itemCacheException
- Propagated from underlying cache providerboolean afterInsert(SharedSessionContractImplementor session, Object key, Object value)
session
- Current sessionkey
- The item keyvalue
- The itemCacheException
- Propagated from underlying cache providerboolean update(SharedSessionContractImplementor session, Object key, Object value)
session
- Current sessionkey
- The item keyvalue
- The itemCacheException
- Propagated from underlying cache providerboolean afterUpdate(SharedSessionContractImplementor session, Object key, Object value, SoftLock lock)
session
- Current sessionkey
- The item keyvalue
- The itemlock
- The lock previously obtained from CachedDomainDataAccess.lockItem(org.hibernate.engine.spi.SharedSessionContractImplementor, java.lang.Object, java.lang.Object)
CacheException
- Propagated from underlying cache providerCopyright © 2019 JBoss by Red Hat. All rights reserved.