HHH-11756 - Typo in public API method name: requiresPostCommitHanding on PostInsertEventListener
This commit is contained in:
parent
c7e5174786
commit
e99eb2b7a2
|
@ -204,7 +204,7 @@ public class EntityDeleteAction extends EntityAction {
|
||||||
protected boolean hasPostCommitEventListeners() {
|
protected boolean hasPostCommitEventListeners() {
|
||||||
final EventListenerGroup<PostDeleteEventListener> group = listenerGroup( EventType.POST_COMMIT_DELETE );
|
final EventListenerGroup<PostDeleteEventListener> group = listenerGroup( EventType.POST_COMMIT_DELETE );
|
||||||
for ( PostDeleteEventListener listener : group.listeners() ) {
|
for ( PostDeleteEventListener listener : group.listeners() ) {
|
||||||
if ( listener.requiresPostCommitHanding( getPersister() ) ) {
|
if ( listener.requiresPostCommitHandling( getPersister() ) ) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -118,7 +118,7 @@ public final class EntityIdentityInsertAction extends AbstractEntityInsertAction
|
||||||
protected boolean hasPostCommitEventListeners() {
|
protected boolean hasPostCommitEventListeners() {
|
||||||
final EventListenerGroup<PostInsertEventListener> group = listenerGroup( EventType.POST_COMMIT_INSERT );
|
final EventListenerGroup<PostInsertEventListener> group = listenerGroup( EventType.POST_COMMIT_INSERT );
|
||||||
for ( PostInsertEventListener listener : group.listeners() ) {
|
for ( PostInsertEventListener listener : group.listeners() ) {
|
||||||
if ( listener.requiresPostCommitHanding( getPersister() ) ) {
|
if ( listener.requiresPostCommitHandling( getPersister() ) ) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -240,7 +240,7 @@ public final class EntityInsertAction extends AbstractEntityInsertAction {
|
||||||
protected boolean hasPostCommitEventListeners() {
|
protected boolean hasPostCommitEventListeners() {
|
||||||
final EventListenerGroup<PostInsertEventListener> group = listenerGroup( EventType.POST_COMMIT_INSERT );
|
final EventListenerGroup<PostInsertEventListener> group = listenerGroup( EventType.POST_COMMIT_INSERT );
|
||||||
for ( PostInsertEventListener listener : group.listeners() ) {
|
for ( PostInsertEventListener listener : group.listeners() ) {
|
||||||
if ( listener.requiresPostCommitHanding( getPersister() ) ) {
|
if ( listener.requiresPostCommitHandling( getPersister() ) ) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -299,7 +299,7 @@ public final class EntityUpdateAction extends EntityAction {
|
||||||
protected boolean hasPostCommitEventListeners() {
|
protected boolean hasPostCommitEventListeners() {
|
||||||
final EventListenerGroup<PostUpdateEventListener> group = listenerGroup( EventType.POST_COMMIT_UPDATE );
|
final EventListenerGroup<PostUpdateEventListener> group = listenerGroup( EventType.POST_COMMIT_UPDATE );
|
||||||
for ( PostUpdateEventListener listener : group.listeners() ) {
|
for ( PostUpdateEventListener listener : group.listeners() ) {
|
||||||
if ( listener.requiresPostCommitHanding( getPersister() ) ) {
|
if ( listener.requiresPostCommitHandling( getPersister() ) ) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,38 @@
|
||||||
|
/*
|
||||||
|
* Hibernate, Relational Persistence for Idiomatic Java
|
||||||
|
*
|
||||||
|
* License: GNU Lesser General Public License (LGPL), version 2.1 or later.
|
||||||
|
* See the lgpl.txt file in the root directory or <http://www.gnu.org/licenses/lgpl-2.1.html>.
|
||||||
|
*/
|
||||||
|
package org.hibernate.event.spi;
|
||||||
|
|
||||||
|
import org.hibernate.persister.entity.EntityPersister;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author Andrea Boriero
|
||||||
|
*/
|
||||||
|
interface PostActionEventListener {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Does this listener require that after transaction hooks be registered?
|
||||||
|
*
|
||||||
|
* @param persister The persister for the entity in question.
|
||||||
|
*
|
||||||
|
* @return {@code true} if after transaction callbacks should be added.
|
||||||
|
*
|
||||||
|
* @deprecated use {@link #requiresPostCommitHandling(EntityPersister)}
|
||||||
|
*/
|
||||||
|
@Deprecated
|
||||||
|
boolean requiresPostCommitHanding(EntityPersister persister);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Does this listener require that after transaction hooks be registered?
|
||||||
|
*
|
||||||
|
* @param persister The persister for the entity in question.
|
||||||
|
*
|
||||||
|
* @return {@code true} if after transaction callbacks should be added.
|
||||||
|
*/
|
||||||
|
default boolean requiresPostCommitHandling(EntityPersister persister) {
|
||||||
|
return requiresPostCommitHanding( persister );
|
||||||
|
}
|
||||||
|
}
|
|
@ -8,15 +8,11 @@ package org.hibernate.event.spi;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
|
||||||
import org.hibernate.persister.entity.EntityPersister;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Called after deleting an item from the datastore
|
* Called after deleting an item from the datastore
|
||||||
*
|
*
|
||||||
* @author Gavin King
|
* @author Gavin King
|
||||||
*/
|
*/
|
||||||
public interface PostDeleteEventListener extends Serializable {
|
public interface PostDeleteEventListener extends Serializable, PostActionEventListener {
|
||||||
public void onPostDelete(PostDeleteEvent event);
|
void onPostDelete(PostDeleteEvent event);
|
||||||
|
|
||||||
public boolean requiresPostCommitHanding(EntityPersister persister);
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,25 +8,12 @@ package org.hibernate.event.spi;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
|
||||||
import org.hibernate.persister.entity.EntityPersister;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Called after insterting an item in the datastore
|
* Called after insterting an item in the datastore
|
||||||
*
|
*
|
||||||
* @author Gavin King
|
* @author Gavin King
|
||||||
* @author Steve Ebersole
|
* @author Steve Ebersole
|
||||||
*/
|
*/
|
||||||
public interface PostInsertEventListener extends Serializable {
|
public interface PostInsertEventListener extends Serializable, PostActionEventListener {
|
||||||
public void onPostInsert(PostInsertEvent event);
|
void onPostInsert(PostInsertEvent event);
|
||||||
|
|
||||||
/**
|
|
||||||
* Does this listener require that after transaction hooks be registered? Typically this is {@code true}
|
|
||||||
* for post-insert event listeners, but may not be, for example, in JPA cases where there are no callbacks defined
|
|
||||||
* for the particular entity.
|
|
||||||
*
|
|
||||||
* @param persister The persister for the entity in question.
|
|
||||||
*
|
|
||||||
* @return {@code true} if after transaction callbacks should be added.
|
|
||||||
*/
|
|
||||||
public boolean requiresPostCommitHanding(EntityPersister persister);
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,15 +8,11 @@ package org.hibernate.event.spi;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
|
||||||
import org.hibernate.persister.entity.EntityPersister;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Called after updating the datastore
|
* Called after updating the datastore
|
||||||
*
|
*
|
||||||
* @author Gavin King
|
* @author Gavin King
|
||||||
*/
|
*/
|
||||||
public interface PostUpdateEventListener extends Serializable {
|
public interface PostUpdateEventListener extends Serializable, PostActionEventListener {
|
||||||
public void onPostUpdate(PostUpdateEvent event);
|
void onPostUpdate(PostUpdateEvent event);
|
||||||
|
|
||||||
public boolean requiresPostCommitHanding(EntityPersister persister);
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue