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
-
Method Summary
Modifier and TypeMethodDescriptionboolean
afterDelete
(int objectId, boolean success) Is called afterGenericQueryManager.delete(int)
.boolean
afterInsert
(BeanType object, boolean success) Is called afterGenericQueryManager.insert(Object)
, or at the end ofGenericQueryManager.save(Object)
if a new bean was saved.boolean
afterRestore
(BeanType object) Is called afterGenericQueryManager.restore(int)
andGenericQueryManager.restoreFirst(RestoreQuery)
, and for every instance restored duringGenericQueryManager.restore()
andGenericQueryManager.restore(RestoreQuery)
.boolean
Is called afterGenericQueryManager.save(Object)
.boolean
afterUpdate
(BeanType object, boolean success) Is called afterGenericQueryManager.update(Object)
, or at the end ofGenericQueryManager.save(Object)
if an existing bean was saved.boolean
afterValidate
(BeanType object) Is called afterValidationContext.validate(Validated)
.boolean
beforeDelete
(int objectId) Is called beforeGenericQueryManager.delete(int)
.boolean
beforeInsert
(BeanType object) Is called beforeGenericQueryManager.insert(Object)
, or in the beginning ofGenericQueryManager.save(Object)
if a new bean is being saved.boolean
beforeSave
(BeanType object) Is called beforeGenericQueryManager.save(Object)
.boolean
beforeUpdate
(BeanType object) Is called beforeGenericQueryManager.update(Object)
, or in the beginning ofGenericQueryManager.save(Object)
if an existing bean is being saved.boolean
beforeValidate
(BeanType object) Is called beforeValidationContext.validate(Validated)
.
-
Constructor Details
-
AbstractCallbacks
public AbstractCallbacks()
-
-
Method Details
-
beforeValidate
Description copied from interface:Callbacks
Is called beforeValidationContext.validate(Validated)
.- Specified by:
beforeValidate
in interfaceCallbacks<BeanType>
- Parameters:
object
- the bean instance that will be validated- Returns:
true
if the execution should continue as normal; orfalse
if the execution should be interrupted
-
beforeInsert
Description copied from interface:Callbacks
Is called beforeGenericQueryManager.insert(Object)
, or in the beginning ofGenericQueryManager.save(Object)
if a new bean is being saved.- Specified by:
beforeInsert
in interfaceCallbacks<BeanType>
- Parameters:
object
- the bean instance that will be inserted- Returns:
true
if the execution should continue as normal; orfalse
if the execution should be interrupted
-
beforeDelete
public boolean beforeDelete(int objectId) Description copied from interface:Callbacks
Is called beforeGenericQueryManager.delete(int)
.- Specified by:
beforeDelete
in interfaceCallbacks<BeanType>
- Parameters:
objectId
- the id of the bean that will be deleted- Returns:
true
if the execution should continue as normal; orfalse
if the execution should be interrupted
-
beforeSave
Description copied from interface:Callbacks
Is called beforeGenericQueryManager.save(Object)
.- Specified by:
beforeSave
in interfaceCallbacks<BeanType>
- Parameters:
object
- the bean instance that will be saved- Returns:
true
if the execution should continue as normal; orfalse
if the execution should be interrupted
-
beforeUpdate
Description copied from interface:Callbacks
Is called beforeGenericQueryManager.update(Object)
, or in the beginning ofGenericQueryManager.save(Object)
if an existing bean is being saved.- Specified by:
beforeUpdate
in interfaceCallbacks<BeanType>
- Parameters:
object
- the bean instance that will be updated- Returns:
true
if the execution should continue as normal; orfalse
if the execution should be interrupted
-
afterValidate
Description copied from interface:Callbacks
Is called afterValidationContext.validate(Validated)
.- Specified by:
afterValidate
in interfaceCallbacks<BeanType>
- Parameters:
object
- the bean instance that was validated- Returns:
true
if the execution should continue as normal; orfalse
if the execution should be interrupted
-
afterInsert
Description copied from interface:Callbacks
Is called afterGenericQueryManager.insert(Object)
, or at the end ofGenericQueryManager.save(Object)
if a new bean was saved.- Specified by:
afterInsert
in interfaceCallbacks<BeanType>
- Parameters:
object
- the bean instance that was insertedsuccess
-true
if the insert was successful; orfalse
otherwise- Returns:
true
if the execution should continue as normal; orfalse
if the execution should be interrupted
-
afterDelete
public boolean afterDelete(int objectId, boolean success) Description copied from interface:Callbacks
Is called afterGenericQueryManager.delete(int)
.- Specified by:
afterDelete
in interfaceCallbacks<BeanType>
- Parameters:
objectId
- the id of the bean instance that was deletedsuccess
-true
if the delete was successful; orfalse
otherwise- Returns:
true
if the execution should continue as normal; orfalse
if the execution should be interrupted
-
afterSave
Description copied from interface:Callbacks
Is called afterGenericQueryManager.save(Object)
. -
afterUpdate
Description copied from interface:Callbacks
Is called afterGenericQueryManager.update(Object)
, or at the end ofGenericQueryManager.save(Object)
if an existing bean was saved.- Specified by:
afterUpdate
in interfaceCallbacks<BeanType>
- Parameters:
object
- the bean instance that was updatedsuccess
-true
if the update was successful; orfalse
otherwise- Returns:
true
if the execution should continue as normal; orfalse
if the execution should be interrupted
-
afterRestore
Description copied from interface:Callbacks
Is called afterGenericQueryManager.restore(int)
andGenericQueryManager.restoreFirst(RestoreQuery)
, and for every instance restored duringGenericQueryManager.restore()
andGenericQueryManager.restore(RestoreQuery)
.- Specified by:
afterRestore
in interfaceCallbacks<BeanType>
- Parameters:
object
- the bean instance that was restored- Returns:
true
if the execution should continue as normal; orfalse
if the execution should be interrupted
-