Package io.ebeaninternal.server.deploy
Class ChainedBeanPersistController
- java.lang.Object
-
- io.ebeaninternal.server.deploy.ChainedBeanPersistController
-
- All Implemented Interfaces:
BeanPersistController
public class ChainedBeanPersistController extends Object implements BeanPersistController
Chains multiple BeanPersistController's together.Used when multiple BeanPersistController register for the same bean type.
-
-
Constructor Summary
Constructors Constructor Description ChainedBeanPersistController(BeanPersistController c1, BeanPersistController c2)
Construct adding 2 BeanPersistController's.ChainedBeanPersistController(List<BeanPersistController> list)
Construct given the list of BeanPersistController's.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ChainedBeanPersistController
deregister(BeanPersistController c)
De-register a BeanPersistController and return the resulting chain.int
getExecutionOrder()
Always returns 0 (not used for this object).boolean
isRegisterFor(Class<?> cls)
Always returns false (not used for this object).void
postDelete(BeanPersistRequest<?> request)
Called after the delete was performed.void
postInsert(BeanPersistRequest<?> request)
Called after the insert was performed.void
postSoftDelete(BeanPersistRequest<?> request)
Called after the soft delete was performed.void
postUpdate(BeanPersistRequest<?> request)
Called after the update was performed.void
preDelete(BeanDeleteIdRequest request)
Prior to a delete by id perform some action.boolean
preDelete(BeanPersistRequest<?> request)
Prior to the delete perform some action.boolean
preInsert(BeanPersistRequest<?> request)
Prior to the insert perform some action.boolean
preSoftDelete(BeanPersistRequest<?> request)
Prior to a soft delete perform some action.boolean
preUpdate(BeanPersistRequest<?> request)
Prior to the update perform some action.ChainedBeanPersistController
register(BeanPersistController c)
Register a new BeanPersistController and return the resulting chain.
-
-
-
Constructor Detail
-
ChainedBeanPersistController
public ChainedBeanPersistController(BeanPersistController c1, BeanPersistController c2)
Construct adding 2 BeanPersistController's.
-
ChainedBeanPersistController
public ChainedBeanPersistController(List<BeanPersistController> list)
Construct given the list of BeanPersistController's.
-
-
Method Detail
-
register
public ChainedBeanPersistController register(BeanPersistController c)
Register a new BeanPersistController and return the resulting chain.
-
deregister
public ChainedBeanPersistController deregister(BeanPersistController c)
De-register a BeanPersistController and return the resulting chain.
-
getExecutionOrder
public int getExecutionOrder()
Always returns 0 (not used for this object).- Specified by:
getExecutionOrder
in interfaceBeanPersistController
- Returns:
- an int used to control the order BeanPersistController's are executed
-
isRegisterFor
public boolean isRegisterFor(Class<?> cls)
Always returns false (not used for this object).- Specified by:
isRegisterFor
in interfaceBeanPersistController
-
postDelete
public void postDelete(BeanPersistRequest<?> request)
Description copied from interface:BeanPersistController
Called after the delete was performed.- Specified by:
postDelete
in interfaceBeanPersistController
-
postInsert
public void postInsert(BeanPersistRequest<?> request)
Description copied from interface:BeanPersistController
Called after the insert was performed.- Specified by:
postInsert
in interfaceBeanPersistController
-
postUpdate
public void postUpdate(BeanPersistRequest<?> request)
Description copied from interface:BeanPersistController
Called after the update was performed.- Specified by:
postUpdate
in interfaceBeanPersistController
-
postSoftDelete
public void postSoftDelete(BeanPersistRequest<?> request)
Description copied from interface:BeanPersistController
Called after the soft delete was performed.- Specified by:
postSoftDelete
in interfaceBeanPersistController
-
preDelete
public boolean preDelete(BeanPersistRequest<?> request)
Description copied from interface:BeanPersistController
Prior to the delete perform some action. Return true if you want the default functionality to continue.Return false if you have completely replaced the delete functionality and do not want the default delete to be performed.
- Specified by:
preDelete
in interfaceBeanPersistController
-
preSoftDelete
public boolean preSoftDelete(BeanPersistRequest<?> request)
Description copied from interface:BeanPersistController
Prior to a soft delete perform some action. Return true if you want the default functionality to continue.- Specified by:
preSoftDelete
in interfaceBeanPersistController
-
preDelete
public void preDelete(BeanDeleteIdRequest request)
Description copied from interface:BeanPersistController
Prior to a delete by id perform some action.- Specified by:
preDelete
in interfaceBeanPersistController
-
preInsert
public boolean preInsert(BeanPersistRequest<?> request)
Description copied from interface:BeanPersistController
Prior to the insert perform some action. Return true if you want the default functionality to continue.Return false if you have completely replaced the insert functionality and do not want the default insert to be performed.
- Specified by:
preInsert
in interfaceBeanPersistController
-
preUpdate
public boolean preUpdate(BeanPersistRequest<?> request)
Description copied from interface:BeanPersistController
Prior to the update perform some action. Return true if you want the default functionality to continue.Return false if you have completely replaced the update functionality and do not want the default update to be performed.
- Specified by:
preUpdate
in interfaceBeanPersistController
-
-