add missing @Override annotations
Signed-off-by: Gavin King <gavin@hibernate.org>
This commit is contained in:
parent
40343e4f79
commit
93b2fc2bbd
|
@ -36,6 +36,7 @@ public class DefaultAutoFlushEventListener extends AbstractFlushingEventListener
|
||||||
*
|
*
|
||||||
* @param event The auto-flush event to be handled.
|
* @param event The auto-flush event to be handled.
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void onAutoFlush(AutoFlushEvent event) throws HibernateException {
|
public void onAutoFlush(AutoFlushEvent event) throws HibernateException {
|
||||||
final EventSource source = event.getSession();
|
final EventSource source = event.getSession();
|
||||||
final SessionEventListenerManager eventListenerManager = source.getEventListenerManager();
|
final SessionEventListenerManager eventListenerManager = source.getEventListenerManager();
|
||||||
|
|
|
@ -28,6 +28,7 @@ public class DefaultDirtyCheckEventListener extends AbstractFlushingEventListene
|
||||||
*
|
*
|
||||||
* @param event The dirty-check event to be handled.
|
* @param event The dirty-check event to be handled.
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void onDirtyCheck(DirtyCheckEvent event) throws HibernateException {
|
public void onDirtyCheck(DirtyCheckEvent event) throws HibernateException {
|
||||||
final ActionQueue actionQueue = event.getSession().getActionQueue();
|
final ActionQueue actionQueue = event.getSession().getActionQueue();
|
||||||
int oldSize = actionQueue.numberOfCollectionRemovals();
|
int oldSize = actionQueue.numberOfCollectionRemovals();
|
||||||
|
|
|
@ -41,6 +41,7 @@ public class DefaultEvictEventListener implements EvictEventListener {
|
||||||
* @param event The evict event to be handled.
|
* @param event The evict event to be handled.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void onEvict(EvictEvent event) throws HibernateException {
|
public void onEvict(EvictEvent event) throws HibernateException {
|
||||||
final EventSource source = event.getSession();
|
final EventSource source = event.getSession();
|
||||||
final PersistenceContext persistenceContext = source.getPersistenceContextInternal();
|
final PersistenceContext persistenceContext = source.getPersistenceContextInternal();
|
||||||
|
|
|
@ -35,6 +35,7 @@ public class DefaultInitializeCollectionEventListener implements InitializeColle
|
||||||
/**
|
/**
|
||||||
* called by a collection that wants to initialize itself
|
* called by a collection that wants to initialize itself
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void onInitializeCollection(InitializeCollectionEvent event) throws HibernateException {
|
public void onInitializeCollection(InitializeCollectionEvent event) throws HibernateException {
|
||||||
final PersistentCollection<?> collection = event.getCollection();
|
final PersistentCollection<?> collection = event.getCollection();
|
||||||
final SessionImplementor source = event.getSession();
|
final SessionImplementor source = event.getSession();
|
||||||
|
|
|
@ -59,6 +59,7 @@ public class DefaultLoadEventListener implements LoadEventListener {
|
||||||
*
|
*
|
||||||
* @param event The load event to be handled.
|
* @param event The load event to be handled.
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void onLoad(LoadEvent event, LoadType loadType) throws HibernateException {
|
public void onLoad(LoadEvent event, LoadType loadType) throws HibernateException {
|
||||||
final EntityPersister persister = getPersister( event );
|
final EntityPersister persister = getPersister( event );
|
||||||
if ( persister == null ) {
|
if ( persister == null ) {
|
||||||
|
|
|
@ -42,6 +42,7 @@ public class DefaultLockEventListener extends AbstractLockUpgradeEventListener i
|
||||||
*
|
*
|
||||||
* @param event The lock event to be handled.
|
* @param event The lock event to be handled.
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void onLock(LockEvent event) throws HibernateException {
|
public void onLock(LockEvent event) throws HibernateException {
|
||||||
|
|
||||||
if ( event.getObject() == null ) {
|
if ( event.getObject() == null ) {
|
||||||
|
|
|
@ -78,6 +78,7 @@ public class DefaultMergeEventListener
|
||||||
* @param event The merge event to be handled.
|
* @param event The merge event to be handled.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void onMerge(MergeEvent event) throws HibernateException {
|
public void onMerge(MergeEvent event) throws HibernateException {
|
||||||
final EventSource session = event.getSession();
|
final EventSource session = event.getSession();
|
||||||
final EntityCopyObserver entityCopyObserver = createEntityCopyObserver( session );
|
final EntityCopyObserver entityCopyObserver = createEntityCopyObserver( session );
|
||||||
|
@ -102,6 +103,7 @@ public class DefaultMergeEventListener
|
||||||
* @param event The merge event to be handled.
|
* @param event The merge event to be handled.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void onMerge(MergeEvent event, MergeContext copiedAlready) throws HibernateException {
|
public void onMerge(MergeEvent event, MergeContext copiedAlready) throws HibernateException {
|
||||||
final Object original = event.getOriginal();
|
final Object original = event.getOriginal();
|
||||||
// NOTE : `original` is the value being merged
|
// NOTE : `original` is the value being merged
|
||||||
|
|
|
@ -50,6 +50,7 @@ public class DefaultPersistEventListener
|
||||||
* @param event The create event to be handled.
|
* @param event The create event to be handled.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void onPersist(PersistEvent event) throws HibernateException {
|
public void onPersist(PersistEvent event) throws HibernateException {
|
||||||
onPersist( event, PersistContext.create() );
|
onPersist( event, PersistContext.create() );
|
||||||
}
|
}
|
||||||
|
@ -60,6 +61,7 @@ public class DefaultPersistEventListener
|
||||||
* @param event The create event to be handled.
|
* @param event The create event to be handled.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void onPersist(PersistEvent event, PersistContext createCache) throws HibernateException {
|
public void onPersist(PersistEvent event, PersistContext createCache) throws HibernateException {
|
||||||
final Object object = event.getObject();
|
final Object object = event.getObject();
|
||||||
final LazyInitializer lazyInitializer = HibernateProxy.extractLazyInitializer( object );
|
final LazyInitializer lazyInitializer = HibernateProxy.extractLazyInitializer( object );
|
||||||
|
|
|
@ -17,7 +17,8 @@ import org.hibernate.persister.entity.EntityPersister;
|
||||||
* @author Gavin King
|
* @author Gavin King
|
||||||
*/
|
*/
|
||||||
public class DefaultPreLoadEventListener implements PreLoadEventListener {
|
public class DefaultPreLoadEventListener implements PreLoadEventListener {
|
||||||
|
|
||||||
|
@Override
|
||||||
public void onPreLoad(PreLoadEvent event) {
|
public void onPreLoad(PreLoadEvent event) {
|
||||||
final EntityPersister persister = event.getPersister();
|
final EntityPersister persister = event.getPersister();
|
||||||
event.getSession().getInterceptor().onLoad(
|
event.getSession().getInterceptor().onLoad(
|
||||||
|
|
|
@ -50,6 +50,7 @@ import static org.hibernate.pretty.MessageHelper.infoString;
|
||||||
public class DefaultRefreshEventListener implements RefreshEventListener {
|
public class DefaultRefreshEventListener implements RefreshEventListener {
|
||||||
private static final CoreMessageLogger LOG = CoreLogging.messageLogger( DefaultRefreshEventListener.class );
|
private static final CoreMessageLogger LOG = CoreLogging.messageLogger( DefaultRefreshEventListener.class );
|
||||||
|
|
||||||
|
@Override
|
||||||
public void onRefresh(RefreshEvent event) throws HibernateException {
|
public void onRefresh(RefreshEvent event) throws HibernateException {
|
||||||
onRefresh( event, RefreshContext.create() );
|
onRefresh( event, RefreshContext.create() );
|
||||||
}
|
}
|
||||||
|
@ -59,6 +60,7 @@ public class DefaultRefreshEventListener implements RefreshEventListener {
|
||||||
*
|
*
|
||||||
* @param event The refresh event to be handled.
|
* @param event The refresh event to be handled.
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void onRefresh(RefreshEvent event, RefreshContext refreshedAlready) {
|
public void onRefresh(RefreshEvent event, RefreshContext refreshedAlready) {
|
||||||
final EventSource source = event.getSession();
|
final EventSource source = event.getSession();
|
||||||
final PersistenceContext persistenceContext = source.getPersistenceContextInternal();
|
final PersistenceContext persistenceContext = source.getPersistenceContextInternal();
|
||||||
|
|
|
@ -49,6 +49,7 @@ public class DefaultReplicateEventListener
|
||||||
*
|
*
|
||||||
* @throws TransientObjectException An invalid attempt to replicate a transient entity.
|
* @throws TransientObjectException An invalid attempt to replicate a transient entity.
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void onReplicate(ReplicateEvent event) {
|
public void onReplicate(ReplicateEvent event) {
|
||||||
final EventSource source = event.getSession();
|
final EventSource source = event.getSession();
|
||||||
final PersistenceContext persistenceContext = source.getPersistenceContextInternal();
|
final PersistenceContext persistenceContext = source.getPersistenceContextInternal();
|
||||||
|
|
|
@ -23,6 +23,7 @@ import org.hibernate.event.spi.SaveOrUpdateEvent;
|
||||||
@Deprecated(since="6")
|
@Deprecated(since="6")
|
||||||
public class DefaultSaveEventListener extends DefaultSaveOrUpdateEventListener {
|
public class DefaultSaveEventListener extends DefaultSaveOrUpdateEventListener {
|
||||||
|
|
||||||
|
@Override
|
||||||
protected Object performSaveOrUpdate(SaveOrUpdateEvent event) {
|
protected Object performSaveOrUpdate(SaveOrUpdateEvent event) {
|
||||||
// this implementation is supposed to tolerate incorrect unsaved-value
|
// this implementation is supposed to tolerate incorrect unsaved-value
|
||||||
// mappings, for the purpose of backward-compatibility
|
// mappings, for the purpose of backward-compatibility
|
||||||
|
@ -32,6 +33,7 @@ public class DefaultSaveEventListener extends DefaultSaveOrUpdateEventListener {
|
||||||
: entityIsTransient( event );
|
: entityIsTransient( event );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
protected boolean reassociateIfUninitializedProxy(Object object, SessionImplementor source) {
|
protected boolean reassociateIfUninitializedProxy(Object object, SessionImplementor source) {
|
||||||
if ( !Hibernate.isInitialized( object ) ) {
|
if ( !Hibernate.isInitialized( object ) ) {
|
||||||
throw new PersistentObjectException("uninitialized proxy passed to save()");
|
throw new PersistentObjectException("uninitialized proxy passed to save()");
|
||||||
|
|
|
@ -53,6 +53,7 @@ public class DefaultSaveOrUpdateEventListener
|
||||||
*
|
*
|
||||||
* @param event The update event to be handled.
|
* @param event The update event to be handled.
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void onSaveOrUpdate(SaveOrUpdateEvent event) {
|
public void onSaveOrUpdate(SaveOrUpdateEvent event) {
|
||||||
final Object object = event.getObject();
|
final Object object = event.getObject();
|
||||||
final Object requestedId = event.getRequestedId();
|
final Object requestedId = event.getRequestedId();
|
||||||
|
|
|
@ -24,6 +24,7 @@ import org.hibernate.persister.entity.EntityPersister;
|
||||||
@Deprecated(since="6")
|
@Deprecated(since="6")
|
||||||
public class DefaultUpdateEventListener extends DefaultSaveOrUpdateEventListener {
|
public class DefaultUpdateEventListener extends DefaultSaveOrUpdateEventListener {
|
||||||
|
|
||||||
|
@Override
|
||||||
protected Object performSaveOrUpdate(SaveOrUpdateEvent event) {
|
protected Object performSaveOrUpdate(SaveOrUpdateEvent event) {
|
||||||
// this implementation is supposed to tolerate incorrect unsaved-value
|
// this implementation is supposed to tolerate incorrect unsaved-value
|
||||||
// mappings, for the purpose of backward-compatibility
|
// mappings, for the purpose of backward-compatibility
|
||||||
|
@ -46,6 +47,7 @@ public class DefaultUpdateEventListener extends DefaultSaveOrUpdateEventListener
|
||||||
* If the user specified an id, assign it to the instance and use that,
|
* If the user specified an id, assign it to the instance and use that,
|
||||||
* otherwise use the id already assigned to the instance
|
* otherwise use the id already assigned to the instance
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
protected Object getUpdateId(Object entity, EntityPersister persister, Object requestedId, SessionImplementor session)
|
protected Object getUpdateId(Object entity, EntityPersister persister, Object requestedId, SessionImplementor session)
|
||||||
throws HibernateException {
|
throws HibernateException {
|
||||||
if ( requestedId == null ) {
|
if ( requestedId == null ) {
|
||||||
|
|
Loading…
Reference in New Issue