Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JDBC entity Event #191

Open
TAKETODAY opened this issue Dec 26, 2022 · 0 comments
Open

JDBC entity Event #191

TAKETODAY opened this issue Dec 26, 2022 · 0 comments
Milestone

Comments

@TAKETODAY
Copy link
Owner

public class HibernateEventListener
        implements LoadEventListener, ResolveNaturalIdEventListener, InitializeCollectionEventListener, SaveOrUpdateEventListener, PersistEventListener, MergeEventListener, DeleteEventListener,
        ReplicateEventListener, FlushEventListener, AutoFlushEventListener, DirtyCheckEventListener, FlushEntityEventListener, ClearEventListener, EvictEventListener, LockEventListener,
        RefreshEventListener, PreLoadEventListener, PreDeleteEventListener, PreUpdateEventListener, PreInsertEventListener, PostLoadEventListener, PostDeleteEventListener, PostUpdateEventListener,
        PostInsertEventListener, PreCollectionRecreateEventListener, PreCollectionRemoveEventListener, PreCollectionUpdateEventListener, PostCollectionRecreateEventListener,
        PostCollectionRemoveEventListener, PostCollectionUpdateEventListener {
  @Override
  public void onAutoFlush(AutoFlushEvent event) throws HibernateException {

  }

  @Override
  public void onClear(ClearEvent event) {

  }

  @Override
  public void onDelete(DeleteEvent event) throws HibernateException {
    Object entity = event.getObject();
    if (entity instanceof ProjectProcess) {
      ProjectProcess projectProcess = (ProjectProcess) entity;
      //TODO handle logic...
    }

  }

  @Override
  public void onDelete(DeleteEvent event, Set transientEntities) throws HibernateException {
    Object entity = event.getObject();
    if (entity instanceof ProjectProcess) {
      ProjectProcess projectProcess = (ProjectProcess) entity;
      //TODO handle logic...
    }

  }

  @Override
  public void onDirtyCheck(DirtyCheckEvent event) throws HibernateException {

  }

  @Override
  public void onEvict(EvictEvent event) throws HibernateException {
    Object entity = event.getObject();
    if (entity instanceof ProjectProcess) {
      ProjectProcess projectProcess = (ProjectProcess) entity;
      //TODO handle logic...
    }

  }

  @Override
  public void onFlushEntity(FlushEntityEvent event) throws HibernateException {
    Object entity = event.getEntity();
    if (entity instanceof ProjectProcess) {
      ProjectProcess projectProcess = (ProjectProcess) entity;
      //TODO handle logic...
    }

  }

  @Override
  public void onFlush(FlushEvent event) throws HibernateException {

  }

  @Override
  public void onInitializeCollection(InitializeCollectionEvent event) throws HibernateException {
    Object entity = event.getAffectedOwnerOrNull();
    if (entity instanceof ProjectProcess) {
      ProjectProcess projectProcess = (ProjectProcess) entity;
      //TODO handle logic...
    }

  }

  @Override
  public void onLoad(LoadEvent event, LoadType loadType) throws HibernateException {

  }

  @Override
  public void onLock(LockEvent event) throws HibernateException {
    Object entity = event.getObject();
    if (entity instanceof ProjectProcess) {
      ProjectProcess projectProcess = (ProjectProcess) entity;
      //TODO handle logic...
    }

  }

  @Override
  public void onMerge(MergeEvent event) throws HibernateException {
    Object entity = event.getEntity();
    if (entity instanceof ProjectProcess) {
      ProjectProcess projectProcess = (ProjectProcess) entity;
      //TODO handle logic...
    }

  }

  @Override
  public void onMerge(MergeEvent event, Map copiedAlready) throws HibernateException {
    Object entity = event.getEntity();
    if (entity instanceof ProjectProcess) {
      ProjectProcess projectProcess = (ProjectProcess) entity;
      //TODO handle logic...
    }

  }

  @Override
  public void onPersist(PersistEvent event) throws HibernateException {
    Object entity = event.getObject();
    if (entity instanceof ProjectProcess) {
      ProjectProcess projectProcess = (ProjectProcess) entity;
      //TODO handle logic...
    }

  }

  @Override
  public void onPersist(PersistEvent event, Map createdAlready) throws HibernateException {
    Object entity = event.getObject();
    if (entity instanceof ProjectProcess) {
      ProjectProcess projectProcess = (ProjectProcess) entity;
      //TODO handle logic...
    }

  }

  @Override
  public void onPostRecreateCollection(PostCollectionRecreateEvent event) {
    Object entity = event.getAffectedOwnerOrNull();
    if (entity instanceof ProjectProcess) {
      ProjectProcess projectProcess = (ProjectProcess) entity;
      //TODO handle logic...
    }

  }

  @Override
  public void onPostRemoveCollection(PostCollectionRemoveEvent event) {
    Object entity = event.getAffectedOwnerOrNull();
    if (entity instanceof ProjectProcess) {
      ProjectProcess projectProcess = (ProjectProcess) entity;
      //TODO handle logic...
    }

  }

  @Override
  public void onPostUpdateCollection(PostCollectionUpdateEvent event) {
    Object entity = event.getAffectedOwnerOrNull();
    if (entity instanceof ProjectProcess) {
      ProjectProcess projectProcess = (ProjectProcess) entity;
      //TODO handle logic...
    }

  }

  @Override
  public void onPostDelete(PostDeleteEvent event) {
    Object entity = event.getEntity();
    if (entity instanceof ProjectProcess) {
      ProjectProcess projectProcess = (ProjectProcess) entity;
      //TODO handle logic...
    }

  }

  @Override
  public void onPostInsert(PostInsertEvent event) {
    Object entity = event.getEntity();
    if (entity instanceof ProjectProcess) {
      ProjectProcess projectProcess = (ProjectProcess) entity;
      //TODO handle logic...
    }

  }

  @Override
  public void onPostUpdate(PostUpdateEvent event) {
    Object entity = event.getEntity();
    if (entity instanceof ProjectProcess) {
      ProjectProcess projectProcess = (ProjectProcess) entity;
      //TODO handle logic...
    }

  }

  @Override
  public boolean requiresPostCommitHanding(EntityPersister persister) {
    return false;
  }

  @Override
  public void onPostLoad(PostLoadEvent event) {
    Object entity = event.getEntity();
    if (entity instanceof ProjectProcess) {
      ProjectProcess projectProcess = (ProjectProcess) entity;
      //TODO handle logic...
    }

  }

  @Override
  public void onPreRecreateCollection(PreCollectionRecreateEvent event) {
    Object entity = event.getAffectedOwnerOrNull();
    if (entity instanceof ProjectProcess) {
      ProjectProcess projectProcess = (ProjectProcess) entity;
      //TODO handle logic...
    }

  }

  @Override
  public void onPreRemoveCollection(PreCollectionRemoveEvent event) {
    Object entity = event.getAffectedOwnerOrNull();
    if (entity instanceof ProjectProcess) {
      ProjectProcess projectProcess = (ProjectProcess) entity;
      //TODO handle logic...
    }

  }

  @Override
  public void onPreUpdateCollection(PreCollectionUpdateEvent event) {
    Object entity = event.getAffectedOwnerOrNull();
    if (entity instanceof ProjectProcess) {
      ProjectProcess projectProcess = (ProjectProcess) entity;
      //TODO handle logic...
    }

  }

  @Override
  public boolean onPreDelete(PreDeleteEvent event) {
    Object entity = event.getEntity();
    if (entity instanceof ProjectProcess) {
      ProjectProcess projectProcess = (ProjectProcess) entity;
      //TODO handle logic...
    }
    return false;
  }

  @Override
  public boolean onPreInsert(PreInsertEvent event) {
    Object entity = event.getEntity();
    if (entity instanceof ProjectProcess) {
      ProjectProcess projectProcess = (ProjectProcess) entity;
      //TODO handle logic...
    }
    return false;
  }

  @Override
  public void onPreLoad(PreLoadEvent event) {
    Object entity = event.getEntity();
    if (entity instanceof ProjectProcess) {
      ProjectProcess projectProcess = (ProjectProcess) entity;
      //TODO handle logic...
    }

  }

  @Override
  public boolean onPreUpdate(PreUpdateEvent event) {
    Object entity = event.getEntity();
    if (entity instanceof ProjectProcess) {
      ProjectProcess projectProcess = (ProjectProcess) entity;
      //TODO handle logic...
    }
    return false;
  }

  @Override
  public void onRefresh(RefreshEvent event) throws HibernateException {
    Object entity = event.getObject();
    if (entity instanceof ProjectProcess) {
      ProjectProcess projectProcess = (ProjectProcess) entity;
      //TODO handle logic...
    }

  }

  @Override
  public void onRefresh(RefreshEvent event, Map refreshedAlready) throws HibernateException {
    Object entity = event.getObject();
    if (entity instanceof ProjectProcess) {
      ProjectProcess projectProcess = (ProjectProcess) entity;
      //TODO handle logic...
    }

  }

  @Override
  public void onReplicate(ReplicateEvent event) throws HibernateException {
    Object entity = event.getObject();
    if (entity instanceof ProjectProcess) {
      ProjectProcess projectProcess = (ProjectProcess) entity;
      //TODO handle logic...
    }

  }

  @Override
  public void onResolveNaturalId(ResolveNaturalIdEvent event) throws HibernateException {

  }

  @Override
  public void onSaveOrUpdate(SaveOrUpdateEvent event) throws HibernateException {
    Object entity = event.getObject();
    if (entity instanceof ProjectProcess) {
      ProjectProcess projectProcess = (ProjectProcess) entity;
      //TODO handle logic...
    }

  }
}
@TAKETODAY TAKETODAY added this to the 4.0 milestone Mar 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Todo
Development

No branches or pull requests

1 participant