java.lang.Object
io.ebean.event.BeanPersistAdapter
- All Implemented Interfaces:
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)
or
DatabaseConfig.setPersistControllers(java.util.List)
.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
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 boolean
isRegisterFor
(Class<?> cls) Return true if this BeanPersistController should be registered for events on this entity type.void
postDelete
(BeanPersistRequest<?> request) Does nothing by default.void
postInsert
(BeanPersistRequest<?> request) Does nothing by default.void
postSoftDelete
(BeanPersistRequest<?> request) Does nothing by default.void
postUpdate
(BeanPersistRequest<?> request) Does nothing by default.void
preDelete
(BeanDeleteIdRequest request) Does nothing by default.boolean
preDelete
(BeanPersistRequest<?> request) Returns true indicating normal processing should continue.boolean
preInsert
(BeanPersistRequest<?> request) Returns true indicating normal processing should continue.boolean
preSoftDelete
(BeanPersistRequest<?> request) Returns true indicating normal processing should continue.boolean
preUpdate
(BeanPersistRequest<?> request) Returns true indicating normal processing should continue.
-
Constructor Details
-
BeanPersistAdapter
public BeanPersistAdapter()
-
-
Method Details
-
isRegisterFor
Description copied from interface:BeanPersistController
Return true if this BeanPersistController should be registered for events on this entity type.- Specified by:
isRegisterFor
in 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:
getExecutionOrder
in interfaceBeanPersistController
- Returns:
- an int used to control the order BeanPersistController's are executed
-
preDelete
Returns true indicating normal processing should continue.- Specified by:
preDelete
in interfaceBeanPersistController
-
preInsert
Returns true indicating normal processing should continue.- Specified by:
preInsert
in interfaceBeanPersistController
-
preUpdate
Returns true indicating normal processing should continue.- Specified by:
preUpdate
in interfaceBeanPersistController
-
preSoftDelete
Returns true indicating normal processing should continue.- Specified by:
preSoftDelete
in interfaceBeanPersistController
-
postDelete
Does nothing by default.- Specified by:
postDelete
in interfaceBeanPersistController
-
postInsert
Does nothing by default.- Specified by:
postInsert
in interfaceBeanPersistController
-
postUpdate
Does nothing by default.- Specified by:
postUpdate
in interfaceBeanPersistController
-
postSoftDelete
Does nothing by default.- Specified by:
postSoftDelete
in interfaceBeanPersistController
-
preDelete
Does nothing by default.- Specified by:
preDelete
in interfaceBeanPersistController
-