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