Package io.ebean.event
Class BeanPersistAdapter
- java.lang.Object
-
- io.ebean.event.BeanPersistAdapter
-
- All Implemented Interfaces:
BeanPersistController
public abstract class BeanPersistAdapter extends Object implements BeanPersistController
A no operation implementation of BeanPersistController. Objects extending this need to only override the methods they want to.A BeanPersistAdapter is either found automatically via class path search or can be added programmatically via
DatabaseConfig.add(BeanPersistController)orDatabaseConfig.setPersistControllers(java.util.List).
-
-
Constructor Summary
Constructors Constructor Description BeanPersistAdapter()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description intgetExecutionOrder()Returns 10 - override this to control the order in which BeanPersistController's are executed when there is multiple of them registered for a given entity type (class).abstract booleanisRegisterFor(Class<?> cls)Return true if this BeanPersistController should be registered for events on this entity type.voidpostDelete(BeanPersistRequest<?> request)Does nothing by default.voidpostInsert(BeanPersistRequest<?> request)Does nothing by default.voidpostSoftDelete(BeanPersistRequest<?> request)Does nothing by default.voidpostUpdate(BeanPersistRequest<?> request)Does nothing by default.voidpreDelete(BeanDeleteIdRequest request)Does nothing by default.booleanpreDelete(BeanPersistRequest<?> request)Returns true indicating normal processing should continue.booleanpreInsert(BeanPersistRequest<?> request)Returns true indicating normal processing should continue.booleanpreSoftDelete(BeanPersistRequest<?> request)Returns true indicating normal processing should continue.booleanpreUpdate(BeanPersistRequest<?> request)Returns true indicating normal processing should continue.
-
-
-
Constructor Detail
-
BeanPersistAdapter
public BeanPersistAdapter()
-
-
Method Detail
-
isRegisterFor
public abstract boolean isRegisterFor(Class<?> cls)
Description copied from interface:BeanPersistControllerReturn true if this BeanPersistController should be registered for events on this entity type.- Specified by:
isRegisterForin interfaceBeanPersistController
-
getExecutionOrder
public int getExecutionOrder()
Returns 10 - override this to control the order in which BeanPersistController's are executed when there is multiple of them registered for a given entity type (class).- Specified by:
getExecutionOrderin interfaceBeanPersistController- Returns:
- an int used to control the order BeanPersistController's are executed
-
preDelete
public boolean preDelete(BeanPersistRequest<?> request)
Returns true indicating normal processing should continue.- Specified by:
preDeletein interfaceBeanPersistController
-
preInsert
public boolean preInsert(BeanPersistRequest<?> request)
Returns true indicating normal processing should continue.- Specified by:
preInsertin interfaceBeanPersistController
-
preUpdate
public boolean preUpdate(BeanPersistRequest<?> request)
Returns true indicating normal processing should continue.- Specified by:
preUpdatein interfaceBeanPersistController
-
preSoftDelete
public boolean preSoftDelete(BeanPersistRequest<?> request)
Returns true indicating normal processing should continue.- Specified by:
preSoftDeletein interfaceBeanPersistController
-
postDelete
public void postDelete(BeanPersistRequest<?> request)
Does nothing by default.- Specified by:
postDeletein interfaceBeanPersistController
-
postInsert
public void postInsert(BeanPersistRequest<?> request)
Does nothing by default.- Specified by:
postInsertin interfaceBeanPersistController
-
postUpdate
public void postUpdate(BeanPersistRequest<?> request)
Does nothing by default.- Specified by:
postUpdatein interfaceBeanPersistController
-
postSoftDelete
public void postSoftDelete(BeanPersistRequest<?> request)
Does nothing by default.- Specified by:
postSoftDeletein interfaceBeanPersistController
-
preDelete
public void preDelete(BeanDeleteIdRequest request)
Does nothing by default.- Specified by:
preDeletein interfaceBeanPersistController
-
-