Interface AbstractRepositoryBase.Listener<T>

  • Type Parameters:
    T - the entity type
    Enclosing class:
    AbstractRepositoryBase<ID,​T,​M>

    public static interface AbstractRepositoryBase.Listener<T>
    An interface that should be implemented by the clients interested in repository events.
    • Method Detail

      • onInserted

        default void onInserted​(T entity)
        An event callback that will be called when a new entity is inserted into the repository.
        Parameters:
        entity - inserted entity
      • onUpdated

        default void onUpdated​(T oldEntity,
                               T newEntity)
        An event callback that will be called when an entity is updated.
        Parameters:
        oldEntity - previous entity
        newEntity - new entity
      • onRemoved

        default void onRemoved​(T entity)
        An event callback that will be called when an entity is removed from the repository.
        Parameters:
        entity - removed entity