com.uwyn.rife.database.querymanagers.generic
Class AbstractCallbacks<BeanType>

java.lang.Object
  extended by com.uwyn.rife.database.querymanagers.generic.AbstractCallbacks<BeanType>
All Implemented Interfaces:
Callbacks<BeanType>

public abstract class AbstractCallbacks<BeanType>
extends Object
implements Callbacks<BeanType>

Abstract convenience class that provides a postive no-op implementation of all the methods of the Callbacks interface.

Since:
1.0
Version:
$Revision: 3634 $
Author:
Geert Bevin (gbevin[remove] at uwyn dot com)
See Also:
Callbacks

Constructor Summary
AbstractCallbacks()
           
 
Method Summary
 boolean afterDelete(int objectId, boolean success)
          Is called after GenericQueryManager.delete(int).
 boolean afterInsert(BeanType object, boolean success)
          Is called after GenericQueryManager.insert(Object), or at the end of GenericQueryManager.save(Object) if a new bean was saved.
 boolean afterRestore(BeanType object)
          Is called after GenericQueryManager.restore(int) and GenericQueryManager.restoreFirst(RestoreQuery), and for every instance restored during GenericQueryManager.restore() and GenericQueryManager.restore(RestoreQuery).
 boolean afterSave(BeanType object, boolean success)
          Is called after GenericQueryManager.save(Object).
 boolean afterUpdate(BeanType object, boolean success)
          Is called after GenericQueryManager.update(Object), or at the end of GenericQueryManager.save(Object) if an existing bean was saved.
 boolean afterValidate(BeanType object)
          Is called after ValidationContext.validate(Validated).
 boolean beforeDelete(int objectId)
          Is called before GenericQueryManager.delete(int).
 boolean beforeInsert(BeanType object)
          Is called before GenericQueryManager.insert(Object), or in the beginning of GenericQueryManager.save(Object) if a new bean is being saved.
 boolean beforeSave(BeanType object)
          Is called before GenericQueryManager.save(Object).
 boolean beforeUpdate(BeanType object)
          Is called before GenericQueryManager.update(Object), or in the beginning of GenericQueryManager.save(Object) if an existing bean is being saved.
 boolean beforeValidate(BeanType object)
          Is called before ValidationContext.validate(Validated).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractCallbacks

public AbstractCallbacks()
Method Detail

beforeValidate

public boolean beforeValidate(BeanType object)
Description copied from interface: Callbacks
Is called before ValidationContext.validate(Validated).

Specified by:
beforeValidate in interface Callbacks<BeanType>
Parameters:
object - the bean instance that will be validated
Returns:
true if the execution should continue as normal; or

false if the execution should be interrupted


beforeInsert

public boolean beforeInsert(BeanType object)
Description copied from interface: Callbacks
Is called before GenericQueryManager.insert(Object), or in the beginning of GenericQueryManager.save(Object) if a new bean is being saved.

Specified by:
beforeInsert in interface Callbacks<BeanType>
Parameters:
object - the bean instance that will be inserted
Returns:
true if the execution should continue as normal; or

false if the execution should be interrupted


beforeDelete

public boolean beforeDelete(int objectId)
Description copied from interface: Callbacks
Is called before GenericQueryManager.delete(int).

Specified by:
beforeDelete in interface Callbacks<BeanType>
Parameters:
objectId - the id of the bean that will be deleted
Returns:
true if the execution should continue as normal; or

false if the execution should be interrupted


beforeSave

public boolean beforeSave(BeanType object)
Description copied from interface: Callbacks
Is called before GenericQueryManager.save(Object).

Specified by:
beforeSave in interface Callbacks<BeanType>
Parameters:
object - the bean instance that will be saved
Returns:
true if the execution should continue as normal; or

false if the execution should be interrupted


beforeUpdate

public boolean beforeUpdate(BeanType object)
Description copied from interface: Callbacks
Is called before GenericQueryManager.update(Object), or in the beginning of GenericQueryManager.save(Object) if an existing bean is being saved.

Specified by:
beforeUpdate in interface Callbacks<BeanType>
Parameters:
object - the bean instance that will be updated
Returns:
true if the execution should continue as normal; or

false if the execution should be interrupted


afterValidate

public boolean afterValidate(BeanType object)
Description copied from interface: Callbacks
Is called after ValidationContext.validate(Validated).

Specified by:
afterValidate in interface Callbacks<BeanType>
Parameters:
object - the bean instance that was validated
Returns:
true if the execution should continue as normal; or

false if the execution should be interrupted


afterInsert

public boolean afterInsert(BeanType object,
                           boolean success)
Description copied from interface: Callbacks
Is called after GenericQueryManager.insert(Object), or at the end of GenericQueryManager.save(Object) if a new bean was saved.

Specified by:
afterInsert in interface Callbacks<BeanType>
Parameters:
object - the bean instance that was inserted
success - true if the insert was successful; or

false otherwise

Returns:
true if the execution should continue as normal; or

false if the execution should be interrupted


afterDelete

public boolean afterDelete(int objectId,
                           boolean success)
Description copied from interface: Callbacks
Is called after GenericQueryManager.delete(int).

Specified by:
afterDelete in interface Callbacks<BeanType>
Parameters:
objectId - the id of the bean instance that was deleted
success - true if the delete was successful; or

false otherwise

Returns:
true if the execution should continue as normal; or

false if the execution should be interrupted


afterSave

public boolean afterSave(BeanType object,
                         boolean success)
Description copied from interface: Callbacks
Is called after GenericQueryManager.save(Object).

Specified by:
afterSave in interface Callbacks<BeanType>
Parameters:
object - the bean instance that was saved
success - true if the save was successful; or

false otherwise

Returns:
true if the execution should continue as normal; or

false if the execution should be interrupted


afterUpdate

public boolean afterUpdate(BeanType object,
                           boolean success)
Description copied from interface: Callbacks
Is called after GenericQueryManager.update(Object), or at the end of GenericQueryManager.save(Object) if an existing bean was saved.

Specified by:
afterUpdate in interface Callbacks<BeanType>
Parameters:
object - the bean instance that was updated
success - true if the update was successful; or

false otherwise

Returns:
true if the execution should continue as normal; or

false if the execution should be interrupted


afterRestore

public boolean afterRestore(BeanType object)
Description copied from interface: Callbacks
Is called after GenericQueryManager.restore(int) and GenericQueryManager.restoreFirst(RestoreQuery), and for every instance restored during GenericQueryManager.restore() and GenericQueryManager.restore(RestoreQuery).

Specified by:
afterRestore in interface Callbacks<BeanType>
Parameters:
object - the bean instance that was restored
Returns:
true if the execution should continue as normal; or

false if the execution should be interrupted



Copyright © 2001-2007 Uwyn sprl/bvba. All Rights Reserved.