001package com.avaje.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 locally. Return true if you want the 017 * cluster to be notified of the event. 018 * 019 * @param bean The bean that was inserted. 020 */ 021 @Override 022 public void inserted(Object bean) { 023 } 024 025 /** 026 * Notified that a bean has been updated locally. Return true if you want the 027 * cluster to be notified of the event. 028 * 029 * @param bean The bean that was updated. 030 * @param updatedProperties The properties that were modified by this update. 031 */ 032 @Override 033 public void updated(Object bean, Set<String> updatedProperties) { 034 } 035 036 /** 037 * Notified that a bean has been deleted locally. Return true if you want the 038 * cluster to be notified of the event. 039 * 040 * @param bean The bean that was deleted. 041 */ 042 @Override 043 public void deleted(Object bean) { 044 } 045 046}