001package io.ebean.event;
002
003import java.util.Set;
004
005/**
006 * Provides a base implementation of BeanPersistListener.
007 * <p>
008 * Objects extending this should override the methods then are interested in.
009 * The default inserted() updated() and deleted() methods return false and as such
010 * means other servers in the cluster are not notified.
011 * </p>
012 */
013public abstract class AbstractBeanPersistListener implements BeanPersistListener {
014
015  /**
016   * Notified that a bean has been inserted.
017   *
018   * @param bean The bean that was inserted.
019   */
020  @Override
021  public void inserted(Object bean) {
022  }
023
024  /**
025   * Notified that a bean has been updated.
026   *
027   * @param bean              The bean that was updated.
028   * @param updatedProperties The properties that were modified by this update.
029   */
030  @Override
031  public void updated(Object bean, Set<String> updatedProperties) {
032  }
033
034  /**
035   * Notified that a bean has been deleted.
036   *
037   * @param bean The bean that was deleted.
038   */
039  @Override
040  public void deleted(Object bean) {
041  }
042
043  /**
044   * Notified that a bean has been soft deleted.
045   *
046   * @param bean The bean that was deleted.
047   */
048  @Override
049  public void softDeleted(Object bean) {
050  }
051}