mirror of
https://github.com/hibernate/hibernate-orm
synced 2025-03-06 17:59:39 +00:00
add missing finals
This commit is contained in:
parent
ee3b3390e5
commit
dd7fb9cab8
@ -181,7 +181,7 @@ protected void putCacheIfNecessary() {
|
||||
}
|
||||
|
||||
protected boolean cacheInsert(EntityPersister persister, Object ck) {
|
||||
SharedSessionContractImplementor session = getSession();
|
||||
final SharedSessionContractImplementor session = getSession();
|
||||
final EventManager eventManager = session.getEventManager();
|
||||
final HibernateMonitoringEvent cachePutEvent = eventManager.beginCachePutEvent();
|
||||
final EntityDataAccess cacheAccessStrategy = persister.getCacheAccessStrategy();
|
||||
@ -227,8 +227,8 @@ protected void postCommitInsert(boolean success) {
|
||||
}
|
||||
|
||||
private void postCommitOnFailure(PostInsertEventListener listener, PostInsertEvent event) {
|
||||
if ( listener instanceof PostCommitInsertEventListener ) {
|
||||
((PostCommitInsertEventListener) listener).onPostInsertCommitFailed( event );
|
||||
if ( listener instanceof PostCommitInsertEventListener postCommitInsertEventListener ) {
|
||||
postCommitInsertEventListener.onPostInsertCommitFailed( event );
|
||||
}
|
||||
else {
|
||||
//default to the legacy implementation that always fires the event
|
||||
@ -257,7 +257,7 @@ public void doAfterTransactionCompletion(boolean success, SharedSessionContractI
|
||||
final EntityPersister persister = getPersister();
|
||||
if ( success && isCachePutEnabled( persister, getSession() ) ) {
|
||||
final EntityDataAccess cache = persister.getCacheAccessStrategy();
|
||||
SessionFactoryImplementor factory = session.getFactory();
|
||||
final SessionFactoryImplementor factory = session.getFactory();
|
||||
final Object ck = cache.generateCacheKey( getId(), persister, factory, session.getTenantIdentifier() );
|
||||
final boolean put = cacheAfterInsert( cache, ck );
|
||||
|
||||
@ -273,7 +273,7 @@ public void doAfterTransactionCompletion(boolean success, SharedSessionContractI
|
||||
}
|
||||
|
||||
protected boolean cacheAfterInsert(EntityDataAccess cache, Object ck) {
|
||||
SharedSessionContractImplementor session = getSession();
|
||||
final SharedSessionContractImplementor session = getSession();
|
||||
final SessionEventListenerManager eventListenerManager = session.getEventListenerManager();
|
||||
final EventManager eventManager = session.getEventManager();
|
||||
final HibernateMonitoringEvent cachePutEvent = eventManager.beginCachePutEvent();
|
||||
|
Loading…
x
Reference in New Issue
Block a user