コード例 #1
0
  public void onPostInsert(PostInsertEvent event) {
    final Object entity = event.getEntity();
    AbstractSavePersistentMethod.clearDisabledValidations(entity);
    if (postInsertEventListener == null) {
      return;
    }

    doWithManualSession(
        event,
        new Closure(this) {
          @Override
          public Object call() {
            postInsertEventListener.call(entity);
            return null;
          }
        });
  }
コード例 #2
0
  @Override
  public void onPostInsert(final PostInsertEvent event) {
    Object entity = event.getEntity();
    if (!(entity instanceof HTextFlowTarget)) {
      return;
    }
    try {
      new Work<Void>() {

        @Override
        protected Void work() throws Exception {
          HTextFlowTarget target = HTextFlowTarget.class.cast(event.getEntity());
          prepareTransUnitUpdatedEvent(0, ContentState.New, target);
          return null;
        }
      }.workInTransaction();
    } catch (Exception e) {
      log.error("fail to publish TransUnitUpdate event", e);
    }
  }
コード例 #3
0
 @Override
 public void onPostInsert(PostInsertEvent event) {
   Object entity = event.getEntity();
   callbackRegistry.postCreate(entity);
 }
コード例 #4
0
 @Override
 public void onPostInsert(PostInsertEvent event) {
   evictCache(event.getEntity(), event.getPersister(), event.getSession(), null);
 }