HHH-11755 Drop "Serializable" from the Event Listener interfaces

This commit is contained in:
Krzysztof Debski 2021-07-27 19:16:11 +02:00 committed by Sanne Grinovero
parent 6af44dd6cf
commit 3eaafaf2f3
38 changed files with 34 additions and 101 deletions

View File

@ -6,7 +6,6 @@
*/
package org.hibernate.event.internal;
import java.io.Serializable;
import java.util.IdentityHashMap;
import java.util.Map;
@ -47,7 +46,7 @@ import org.jboss.logging.Logger;
*
* @author Steve Ebersole
*/
public abstract class AbstractFlushingEventListener implements JpaBootstrapSensitive, Serializable {
public abstract class AbstractFlushingEventListener implements JpaBootstrapSensitive {
private static final CoreMessageLogger LOG = Logger.getMessageLogger( CoreMessageLogger.class, AbstractFlushingEventListener.class.getName() );

View File

@ -6,8 +6,6 @@
*/
package org.hibernate.event.internal;
import java.io.Serializable;
import org.hibernate.LockMode;
import org.hibernate.engine.internal.Versioning;
import org.hibernate.engine.spi.EntityEntry;
@ -29,7 +27,7 @@ import org.jboss.logging.Logger;
*
* @author Gavin King
*/
public abstract class AbstractReassociateEventListener implements Serializable {
public abstract class AbstractReassociateEventListener {
private static final Logger log = CoreLogging.logger( AbstractReassociateEventListener.class );
/**

View File

@ -6,7 +6,6 @@
*/
package org.hibernate.event.internal;
import java.io.Serializable;
import java.util.Map;
import org.hibernate.LockMode;

View File

@ -6,7 +6,6 @@
*/
package org.hibernate.event.internal;
import java.io.Serializable;
import java.util.Set;
import org.hibernate.CacheMode;

View File

@ -6,7 +6,6 @@
*/
package org.hibernate.event.internal;
import java.io.Serializable;
import org.hibernate.AssertionFailure;
import org.hibernate.LockMode;

View File

@ -6,8 +6,6 @@
*/
package org.hibernate.event.internal;
import java.io.Serializable;
import org.hibernate.event.spi.PreLoadEvent;
import org.hibernate.event.spi.PreLoadEventListener;
import org.hibernate.persister.entity.EntityPersister;

View File

@ -6,7 +6,6 @@
*/
package org.hibernate.event.service.spi;
import java.io.Serializable;
import java.util.concurrent.CompletionStage;
import java.util.function.BiConsumer;
import java.util.function.BiFunction;
@ -21,7 +20,7 @@ import org.hibernate.event.spi.EventType;
*
* @author Steve Ebersole
*/
public interface EventListenerGroup<T> extends Serializable {
public interface EventListenerGroup<T> {
/**
* Retrieve the event type associated with this groups of listeners.

View File

@ -6,8 +6,6 @@
*/
package org.hibernate.event.service.spi;
import java.io.Serializable;
import org.hibernate.boot.spi.MetadataImplementor;
import org.hibernate.event.spi.EventType;
import org.hibernate.service.Service;
@ -18,7 +16,7 @@ import org.hibernate.service.Service;
*
* @author Steve Ebersole
*/
public interface EventListenerRegistry extends Service, Serializable {
public interface EventListenerRegistry extends Service {
/**
* @deprecated this method was only ever used to initialize the CallbackRegistry
* which is now managed as part of the EventEngine

View File

@ -6,8 +6,6 @@
*/
package org.hibernate.event.spi;
import java.io.Serializable;
import org.hibernate.HibernateException;
/**
@ -15,7 +13,7 @@ import org.hibernate.HibernateException;
*
* @author Steve Ebersole
*/
public interface AutoFlushEventListener extends Serializable {
public interface AutoFlushEventListener {
/** Handle the given auto-flush event.
*

View File

@ -6,14 +6,12 @@
*/
package org.hibernate.event.spi;
import java.io.Serializable;
/**
* Listener for notification of {@link org.hibernate.Session#clear()}
*
* @author Steve Ebersole
*/
public interface ClearEventListener extends Serializable {
public interface ClearEventListener {
/**
* Callback for {@link org.hibernate.Session#clear()} notification
*

View File

@ -6,7 +6,6 @@
*/
package org.hibernate.event.spi;
import java.io.Serializable;
import java.util.Set;
import org.hibernate.HibernateException;
@ -16,7 +15,7 @@ import org.hibernate.HibernateException;
*
* @author Steve Ebersole
*/
public interface DeleteEventListener extends Serializable {
public interface DeleteEventListener {
/** Handle the given delete event.
*

View File

@ -6,8 +6,6 @@
*/
package org.hibernate.event.spi;
import java.io.Serializable;
import org.hibernate.HibernateException;
/**
@ -15,7 +13,7 @@ import org.hibernate.HibernateException;
*
* @author Steve Ebersole
*/
public interface DirtyCheckEventListener extends Serializable {
public interface DirtyCheckEventListener {
/** Handle the given dirty-check event.
*

View File

@ -6,8 +6,6 @@
*/
package org.hibernate.event.spi;
import java.io.Serializable;
import org.hibernate.HibernateException;
/**
@ -15,7 +13,7 @@ import org.hibernate.HibernateException;
*
* @author Steve Ebersole
*/
public interface EvictEventListener extends Serializable {
public interface EvictEventListener {
/**
* Handle the given evict event.

View File

@ -6,13 +6,11 @@
*/
package org.hibernate.event.spi;
import java.io.Serializable;
import org.hibernate.HibernateException;
/**
* @author Gavin King
*/
public interface FlushEntityEventListener extends Serializable {
public interface FlushEntityEventListener {
public void onFlushEntity(FlushEntityEvent event) throws HibernateException;
}

View File

@ -6,8 +6,6 @@
*/
package org.hibernate.event.spi;
import java.io.Serializable;
import org.hibernate.HibernateException;
/**
@ -15,7 +13,7 @@ import org.hibernate.HibernateException;
*
* @author Steve Ebersole
*/
public interface FlushEventListener extends Serializable {
public interface FlushEventListener {
/**
* Handle the given flush event.
*

View File

@ -6,8 +6,6 @@
*/
package org.hibernate.event.spi;
import java.io.Serializable;
import org.hibernate.HibernateException;
/**
@ -16,6 +14,6 @@ import org.hibernate.HibernateException;
*
* @author Gavin King
*/
public interface InitializeCollectionEventListener extends Serializable {
public interface InitializeCollectionEventListener {
void onInitializeCollection(InitializeCollectionEvent event) throws HibernateException;
}

View File

@ -6,8 +6,6 @@
*/
package org.hibernate.event.spi;
import java.io.Serializable;
import org.hibernate.HibernateException;
/**
@ -15,7 +13,7 @@ import org.hibernate.HibernateException;
*
* @author Steve Ebersole
*/
public interface LoadEventListener extends Serializable {
public interface LoadEventListener {
/**
* Handle the given load event.

View File

@ -6,8 +6,6 @@
*/
package org.hibernate.event.spi;
import java.io.Serializable;
import org.hibernate.HibernateException;
/**
@ -15,7 +13,7 @@ import org.hibernate.HibernateException;
*
* @author Steve Ebersole
*/
public interface LockEventListener extends Serializable {
public interface LockEventListener {
/** Handle the given lock event.
*

View File

@ -6,7 +6,6 @@
*/
package org.hibernate.event.spi;
import java.io.Serializable;
import java.util.Map;
import org.hibernate.HibernateException;
@ -16,7 +15,7 @@ import org.hibernate.HibernateException;
*
* @author Gavin King
*/
public interface MergeEventListener extends Serializable {
public interface MergeEventListener {
/**
* Handle the given merge event.

View File

@ -6,7 +6,6 @@
*/
package org.hibernate.event.spi;
import java.io.Serializable;
import java.util.Map;
import org.hibernate.HibernateException;
@ -16,7 +15,7 @@ import org.hibernate.HibernateException;
*
* @author Gavin King
*/
public interface PersistEventListener extends Serializable {
public interface PersistEventListener {
/**
* Handle the given create event.

View File

@ -6,13 +6,11 @@
*/
package org.hibernate.event.spi;
import java.io.Serializable;
/**
* Called after recreating a collection
*
* @author Gail Badner
*/
public interface PostCollectionRecreateEventListener extends Serializable {
public interface PostCollectionRecreateEventListener {
public void onPostRecreateCollection(PostCollectionRecreateEvent event);
}

View File

@ -6,13 +6,11 @@
*/
package org.hibernate.event.spi;
import java.io.Serializable;
/**
* Called after removing a collection
*
* @author Gail Badner
*/
public interface PostCollectionRemoveEventListener extends Serializable {
public interface PostCollectionRemoveEventListener {
public void onPostRemoveCollection(PostCollectionRemoveEvent event);
}

View File

@ -6,13 +6,11 @@
*/
package org.hibernate.event.spi;
import java.io.Serializable;
/**
* Called after updating a collection
*
* @author Gail Badner
*/
public interface PostCollectionUpdateEventListener extends Serializable {
public interface PostCollectionUpdateEventListener {
public void onPostUpdateCollection(PostCollectionUpdateEvent event);
}

View File

@ -6,13 +6,11 @@
*/
package org.hibernate.event.spi;
import java.io.Serializable;
/**
* Called after deleting an item from the datastore
*
* @author Gavin King
*/
public interface PostDeleteEventListener extends Serializable, PostActionEventListener {
public interface PostDeleteEventListener extends PostActionEventListener {
void onPostDelete(PostDeleteEvent event);
}

View File

@ -6,14 +6,12 @@
*/
package org.hibernate.event.spi;
import java.io.Serializable;
/**
* Called after inserting an item in the datastore
*
* @author Gavin King
* @author Steve Ebersole
*/
public interface PostInsertEventListener extends Serializable, PostActionEventListener {
public interface PostInsertEventListener extends PostActionEventListener {
void onPostInsert(PostInsertEvent event);
}

View File

@ -6,13 +6,11 @@
*/
package org.hibernate.event.spi;
import java.io.Serializable;
/**
* Occurs after an entity instance is fully loaded.
*
* @author <a href="mailto:kabir.khan@jboss.org">Kabir Khan</a>
*/
public interface PostLoadEventListener extends Serializable {
public interface PostLoadEventListener {
public void onPostLoad(PostLoadEvent event);
}

View File

@ -6,13 +6,11 @@
*/
package org.hibernate.event.spi;
import java.io.Serializable;
/**
* Called after updating the datastore
*
* @author Gavin King
*/
public interface PostUpdateEventListener extends Serializable, PostActionEventListener {
public interface PostUpdateEventListener extends PostActionEventListener {
void onPostUpdate(PostUpdateEvent event);
}

View File

@ -6,13 +6,11 @@
*/
package org.hibernate.event.spi;
import java.io.Serializable;
/**
* Called before recreating a collection
*
* @author Gail Badner
*/
public interface PreCollectionRecreateEventListener extends Serializable {
public interface PreCollectionRecreateEventListener {
public void onPreRecreateCollection(PreCollectionRecreateEvent event);
}

View File

@ -6,13 +6,11 @@
*/
package org.hibernate.event.spi;
import java.io.Serializable;
/**
* Called before removing a collection
*
* @author Gail Badner
*/
public interface PreCollectionRemoveEventListener extends Serializable {
public interface PreCollectionRemoveEventListener {
public void onPreRemoveCollection(PreCollectionRemoveEvent event);
}

View File

@ -6,13 +6,11 @@
*/
package org.hibernate.event.spi;
import java.io.Serializable;
/**
* Called before updating a collection
*
* @author Gail Badner
*/
public interface PreCollectionUpdateEventListener extends Serializable {
public interface PreCollectionUpdateEventListener {
public void onPreUpdateCollection(PreCollectionUpdateEvent event);
}

View File

@ -6,14 +6,12 @@
*/
package org.hibernate.event.spi;
import java.io.Serializable;
/**
* Called before deleting an item from the datastore
*
* @author Gavin King
*/
public interface PreDeleteEventListener extends Serializable {
public interface PreDeleteEventListener {
/**
* Return true if the operation should be vetoed
*/

View File

@ -6,14 +6,12 @@
*/
package org.hibernate.event.spi;
import java.io.Serializable;
/**
* Called before inserting an item in the datastore
*
* @author Gavin King
*/
public interface PreInsertEventListener extends Serializable {
public interface PreInsertEventListener {
/**
* Return true if the operation should be vetoed
*/

View File

@ -6,14 +6,12 @@
*/
package org.hibernate.event.spi;
import java.io.Serializable;
/**
* Called before injecting property values into a newly
* loaded entity instance.
*
* @author Gavin King
*/
public interface PreLoadEventListener extends Serializable {
public interface PreLoadEventListener {
public void onPreLoad(PreLoadEvent event);
}

View File

@ -6,14 +6,12 @@
*/
package org.hibernate.event.spi;
import java.io.Serializable;
/**
* Called before updating the datastore
*
* @author Gavin King
*/
public interface PreUpdateEventListener extends Serializable {
public interface PreUpdateEventListener {
/**
* Return true if the operation should be vetoed
*/

View File

@ -6,7 +6,6 @@
*/
package org.hibernate.event.spi;
import java.io.Serializable;
import java.util.Map;
import org.hibernate.HibernateException;
@ -16,7 +15,7 @@ import org.hibernate.HibernateException;
*
* @author Steve Ebersole
*/
public interface RefreshEventListener extends Serializable {
public interface RefreshEventListener {
/**
* Handle the given refresh event.

View File

@ -6,8 +6,6 @@
*/
package org.hibernate.event.spi;
import java.io.Serializable;
import org.hibernate.HibernateException;
/**
@ -15,7 +13,7 @@ import org.hibernate.HibernateException;
*
* @author Steve Ebersole
*/
public interface ReplicateEventListener extends Serializable {
public interface ReplicateEventListener {
/** Handle the given replicate event.
*

View File

@ -6,8 +6,6 @@
*/
package org.hibernate.event.spi;
import java.io.Serializable;
import org.hibernate.HibernateException;
/**
@ -16,7 +14,7 @@ import org.hibernate.HibernateException;
* @author Eric Dalquist
* @author Steve Ebersole
*/
public interface ResolveNaturalIdEventListener extends Serializable {
public interface ResolveNaturalIdEventListener {
/**
* Handle the given resolve natural id event.

View File

@ -6,8 +6,6 @@
*/
package org.hibernate.event.spi;
import java.io.Serializable;
import org.hibernate.HibernateException;
/**
@ -15,7 +13,7 @@ import org.hibernate.HibernateException;
*
* @author Steve Ebersole
*/
public interface SaveOrUpdateEventListener extends Serializable {
public interface SaveOrUpdateEventListener {
/**
* Handle the given update event.