Class AbstractCallbacks<BeanType>
java.lang.Object
rife.database.querymanagers.generic.AbstractCallbacks<BeanType>
- All Implemented Interfaces:
Callbacks<BeanType>
Abstract convenience class that provides a positive no-op implementation of
all the methods of the
Callbacks interface.- Since:
- 1.0
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanafterDelete(int objectId, boolean success) Is called afterGenericQueryManager.delete(int).booleanafterInsert(BeanType object, boolean success) Is called afterGenericQueryManager.insert(Object), or at the end ofGenericQueryManager.save(Object)if a new bean was saved.booleanafterRestore(BeanType object) Is called afterGenericQueryManager.restore(int)andGenericQueryManager.restoreFirst(RestoreQuery), and for every instance restored duringGenericQueryManager.restore()andGenericQueryManager.restore(RestoreQuery).booleanIs called afterGenericQueryManager.save(Object).booleanafterUpdate(BeanType object, boolean success) Is called afterGenericQueryManager.update(Object), or at the end ofGenericQueryManager.save(Object)if an existing bean was saved.booleanafterValidate(BeanType object) Is called afterValidationContext.validate(Validated).booleanbeforeDelete(int objectId) Is called beforeGenericQueryManager.delete(int).booleanbeforeInsert(BeanType object) Is called beforeGenericQueryManager.insert(Object), or in the beginning ofGenericQueryManager.save(Object)if a new bean is being saved.booleanbeforeSave(BeanType object) Is called beforeGenericQueryManager.save(Object).booleanbeforeUpdate(BeanType object) Is called beforeGenericQueryManager.update(Object), or in the beginning ofGenericQueryManager.save(Object)if an existing bean is being saved.booleanbeforeValidate(BeanType object) Is called beforeValidationContext.validate(Validated).
-
Constructor Details
-
AbstractCallbacks
public AbstractCallbacks()
-
-
Method Details
-
beforeValidate
Description copied from interface:CallbacksIs called beforeValidationContext.validate(Validated).- Specified by:
beforeValidatein interfaceCallbacks<BeanType>- Parameters:
object- the bean instance that will be validated- Returns:
trueif the execution should continue as normal; orfalseif the execution should be interrupted
-
beforeInsert
Description copied from interface:CallbacksIs called beforeGenericQueryManager.insert(Object), or in the beginning ofGenericQueryManager.save(Object)if a new bean is being saved.- Specified by:
beforeInsertin interfaceCallbacks<BeanType>- Parameters:
object- the bean instance that will be inserted- Returns:
trueif the execution should continue as normal; orfalseif the execution should be interrupted
-
beforeDelete
public boolean beforeDelete(int objectId) Description copied from interface:CallbacksIs called beforeGenericQueryManager.delete(int).- Specified by:
beforeDeletein interfaceCallbacks<BeanType>- Parameters:
objectId- the id of the bean that will be deleted- Returns:
trueif the execution should continue as normal; orfalseif the execution should be interrupted
-
beforeSave
Description copied from interface:CallbacksIs called beforeGenericQueryManager.save(Object).- Specified by:
beforeSavein interfaceCallbacks<BeanType>- Parameters:
object- the bean instance that will be saved- Returns:
trueif the execution should continue as normal; orfalseif the execution should be interrupted
-
beforeUpdate
Description copied from interface:CallbacksIs called beforeGenericQueryManager.update(Object), or in the beginning ofGenericQueryManager.save(Object)if an existing bean is being saved.- Specified by:
beforeUpdatein interfaceCallbacks<BeanType>- Parameters:
object- the bean instance that will be updated- Returns:
trueif the execution should continue as normal; orfalseif the execution should be interrupted
-
afterValidate
Description copied from interface:CallbacksIs called afterValidationContext.validate(Validated).- Specified by:
afterValidatein interfaceCallbacks<BeanType>- Parameters:
object- the bean instance that was validated- Returns:
trueif the execution should continue as normal; orfalseif the execution should be interrupted
-
afterInsert
Description copied from interface:CallbacksIs called afterGenericQueryManager.insert(Object), or at the end ofGenericQueryManager.save(Object)if a new bean was saved.- Specified by:
afterInsertin interfaceCallbacks<BeanType>- Parameters:
object- the bean instance that was insertedsuccess-trueif the insert was successful; orfalseotherwise- Returns:
trueif the execution should continue as normal; orfalseif the execution should be interrupted
-
afterDelete
public boolean afterDelete(int objectId, boolean success) Description copied from interface:CallbacksIs called afterGenericQueryManager.delete(int).- Specified by:
afterDeletein interfaceCallbacks<BeanType>- Parameters:
objectId- the id of the bean instance that was deletedsuccess-trueif the delete was successful; orfalseotherwise- Returns:
trueif the execution should continue as normal; orfalseif the execution should be interrupted
-
afterSave
Description copied from interface:CallbacksIs called afterGenericQueryManager.save(Object). -
afterUpdate
Description copied from interface:CallbacksIs called afterGenericQueryManager.update(Object), or at the end ofGenericQueryManager.save(Object)if an existing bean was saved.- Specified by:
afterUpdatein interfaceCallbacks<BeanType>- Parameters:
object- the bean instance that was updatedsuccess-trueif the update was successful; orfalseotherwise- Returns:
trueif the execution should continue as normal; orfalseif the execution should be interrupted
-
afterRestore
Description copied from interface:CallbacksIs called afterGenericQueryManager.restore(int)andGenericQueryManager.restoreFirst(RestoreQuery), and for every instance restored duringGenericQueryManager.restore()andGenericQueryManager.restore(RestoreQuery).- Specified by:
afterRestorein interfaceCallbacks<BeanType>- Parameters:
object- the bean instance that was restored- Returns:
trueif the execution should continue as normal; orfalseif the execution should be interrupted
-