Examples of appendListeners()


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

    final EventListenerRegistry listenerRegistry = activationContext.getServiceRegistry()
        .getService( EventListenerRegistry.class );

    listenerRegistry.addDuplicationStrategy( DuplicationStrategyImpl.INSTANCE );

    listenerRegistry.appendListeners( EventType.PRE_INSERT, listener );
    listenerRegistry.appendListeners( EventType.PRE_UPDATE, listener );
    listenerRegistry.appendListeners( EventType.PRE_DELETE, listener );

    listener.initialize( activationContext.getConfiguration() );
  }
View Full Code Here

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

        .getService( EventListenerRegistry.class );

    listenerRegistry.addDuplicationStrategy( DuplicationStrategyImpl.INSTANCE );

    listenerRegistry.appendListeners( EventType.PRE_INSERT, listener );
    listenerRegistry.appendListeners( EventType.PRE_UPDATE, listener );
    listenerRegistry.appendListeners( EventType.PRE_DELETE, listener );

    listener.initialize( activationContext.getConfiguration() );
  }
View Full Code Here

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

    listenerRegistry.addDuplicationStrategy( DuplicationStrategyImpl.INSTANCE );

    listenerRegistry.appendListeners( EventType.PRE_INSERT, listener );
    listenerRegistry.appendListeners( EventType.PRE_UPDATE, listener );
    listenerRegistry.appendListeners( EventType.PRE_DELETE, listener );

    listener.initialize( activationContext.getConfiguration() );
  }

  @SuppressWarnings({"unchecked", "UnusedParameters"})
View Full Code Here

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

    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

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

    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

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

    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

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

        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

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

        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 ) );
        }
  }

  @Override
View Full Code Here

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

        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 ) );
        }
  }

  @Override
  public void disintegrate(SessionFactoryImplementor sessionFactory, SessionFactoryServiceRegistry serviceRegistry) {
View Full Code Here

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

    _listener = doCreateListener(sessionFactoryImpl, batchedEventProcessor);

    if (_listener instanceof PostInsertEventListener) {
      if (registerPostCommitListeneres) {
        registry.appendListeners(EventType.POST_COMMIT_INSERT, (PostInsertEventListener) _listener);
      } else {
        registry.appendListeners(EventType.POST_INSERT, (PostInsertEventListener) _listener);
      }
    }
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.