Package org.hibernate.event.service.spi

Examples of org.hibernate.event.service.spi.EventListenerRegistry.appendListeners()


      }
    }

    if (_listener instanceof PostUpdateEventListener) {
      if (registerPostCommitListeneres) {
        registry.appendListeners(EventType.POST_COMMIT_UPDATE, (PostUpdateEventListener) _listener);
      } else {
        registry.appendListeners(EventType.POST_UPDATE, (PostUpdateEventListener) _listener);
      }
    }
View Full Code Here


    if (_listener instanceof PostUpdateEventListener) {
      if (registerPostCommitListeneres) {
        registry.appendListeners(EventType.POST_COMMIT_UPDATE, (PostUpdateEventListener) _listener);
      } else {
        registry.appendListeners(EventType.POST_UPDATE, (PostUpdateEventListener) _listener);
      }
    }

    if (_listener instanceof PostDeleteEventListener) {
      if (registerPostCommitListeneres) {
View Full Code Here

      }
    }

    if (_listener instanceof PostDeleteEventListener) {
      if (registerPostCommitListeneres) {
        registry.appendListeners(EventType.POST_COMMIT_DELETE, (PostDeleteEventListener) _listener);
      } else {
        registry.appendListeners(EventType.POST_DELETE, (PostDeleteEventListener) _listener);
      }
    }
View Full Code Here

    if (_listener instanceof PostDeleteEventListener) {
      if (registerPostCommitListeneres) {
        registry.appendListeners(EventType.POST_COMMIT_DELETE, (PostDeleteEventListener) _listener);
      } else {
        registry.appendListeners(EventType.POST_DELETE, (PostDeleteEventListener) _listener);
      }
    }

    // collections
    if (!registerPostCommitListeneres) {
View Full Code Here

    }

    // collections
    if (!registerPostCommitListeneres) {
      if (_listener instanceof PostCollectionRecreateEventListener) {
        registry.appendListeners(EventType.POST_COLLECTION_RECREATE,
            (PostCollectionRecreateEventListener) _listener);
      }

      if (_listener instanceof PostCollectionRemoveEventListener) {
        registry.appendListeners(EventType.POST_COLLECTION_REMOVE,
View Full Code Here

        registry.appendListeners(EventType.POST_COLLECTION_RECREATE,
            (PostCollectionRecreateEventListener) _listener);
      }

      if (_listener instanceof PostCollectionRemoveEventListener) {
        registry.appendListeners(EventType.POST_COLLECTION_REMOVE,
            (PostCollectionRemoveEventListener) _listener);
      }

      if (_listener instanceof PostCollectionUpdateEventListener) {
        registry.appendListeners(EventType.POST_COLLECTION_UPDATE,
View Full Code Here

        registry.appendListeners(EventType.POST_COLLECTION_REMOVE,
            (PostCollectionRemoveEventListener) _listener);
      }

      if (_listener instanceof PostCollectionUpdateEventListener) {
        registry.appendListeners(EventType.POST_COLLECTION_UPDATE,
            (PostCollectionUpdateEventListener) _listener);
      }
    }
  }
View Full Code Here

    listenerRegistry.addDuplicationStrategy( EnversListenerDuplicationStrategy.INSTANCE );

    final AuditConfiguration enversConfiguration = AuditConfiguration.getFor( configuration );

        if (enversConfiguration.getEntCfg().hasAuditedEntities()) {
        listenerRegistry.appendListeners( EventType.POST_DELETE, new EnversPostDeleteEventListenerImpl( enversConfiguration ) );
        listenerRegistry.appendListeners( EventType.POST_INSERT, new EnversPostInsertEventListenerImpl( enversConfiguration ) );
        listenerRegistry.appendListeners( EventType.POST_UPDATE, new EnversPostUpdateEventListenerImpl( enversConfiguration ) );
        listenerRegistry.appendListeners( EventType.POST_COLLECTION_RECREATE, new EnversPostCollectionRecreateEventListenerImpl( enversConfiguration ) );
        listenerRegistry.appendListeners( EventType.PRE_COLLECTION_REMOVE, new EnversPreCollectionRemoveEventListenerImpl( enversConfiguration ) );
        listenerRegistry.appendListeners( EventType.PRE_COLLECTION_UPDATE, new EnversPreCollectionUpdateEventListenerImpl( enversConfiguration ) );
View Full Code Here

    final AuditConfiguration enversConfiguration = AuditConfiguration.getFor( configuration );

        if (enversConfiguration.getEntCfg().hasAuditedEntities()) {
        listenerRegistry.appendListeners( EventType.POST_DELETE, new EnversPostDeleteEventListenerImpl( enversConfiguration ) );
        listenerRegistry.appendListeners( EventType.POST_INSERT, new EnversPostInsertEventListenerImpl( enversConfiguration ) );
        listenerRegistry.appendListeners( EventType.POST_UPDATE, new EnversPostUpdateEventListenerImpl( enversConfiguration ) );
        listenerRegistry.appendListeners( EventType.POST_COLLECTION_RECREATE, new EnversPostCollectionRecreateEventListenerImpl( enversConfiguration ) );
        listenerRegistry.appendListeners( EventType.PRE_COLLECTION_REMOVE, new EnversPreCollectionRemoveEventListenerImpl( enversConfiguration ) );
        listenerRegistry.appendListeners( EventType.PRE_COLLECTION_UPDATE, new EnversPreCollectionUpdateEventListenerImpl( enversConfiguration ) );
        }
View Full Code Here

    final AuditConfiguration enversConfiguration = AuditConfiguration.getFor( configuration );

        if (enversConfiguration.getEntCfg().hasAuditedEntities()) {
        listenerRegistry.appendListeners( EventType.POST_DELETE, new EnversPostDeleteEventListenerImpl( enversConfiguration ) );
        listenerRegistry.appendListeners( EventType.POST_INSERT, new EnversPostInsertEventListenerImpl( enversConfiguration ) );
        listenerRegistry.appendListeners( EventType.POST_UPDATE, new EnversPostUpdateEventListenerImpl( enversConfiguration ) );
        listenerRegistry.appendListeners( EventType.POST_COLLECTION_RECREATE, new EnversPostCollectionRecreateEventListenerImpl( enversConfiguration ) );
        listenerRegistry.appendListeners( EventType.PRE_COLLECTION_REMOVE, new EnversPreCollectionRemoveEventListenerImpl( enversConfiguration ) );
        listenerRegistry.appendListeners( EventType.PRE_COLLECTION_UPDATE, new EnversPreCollectionUpdateEventListenerImpl( enversConfiguration ) );
        }
  }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.