org.springframework.datastore.engine
Interface EntityInterceptor

All Superinterfaces:
DatastoreAware
All Known Implementing Classes:
AutoTimestampInterceptor, DomainEventInterceptor, EmptyInterceptor, ValidatingInterceptor

public interface EntityInterceptor
extends DatastoreAware

Used to intercept persistent operations

Since:
1.0

Method Summary
 boolean beforeDelete(PersistentEntity entity, EntityAccess entityAccess)
          Called before an entity is deleted
 boolean beforeInsert(PersistentEntity entity, EntityAccess entityAccess)
          Called before an entity is inserted
 boolean beforeUpdate(PersistentEntity entity, EntityAccess entityAccess)
          Called before an entity is updated
 
Methods inherited from interface org.springframework.datastore.core.DatastoreAware
setDatastore
 

Method Detail

beforeInsert

boolean beforeInsert(PersistentEntity entity,
                     EntityAccess entityAccess)
Called before an entity is inserted

Parameters:
entity - The entity
entityAccess - The object
Returns:
False if the operation should be cancelled

beforeUpdate

boolean beforeUpdate(PersistentEntity entity,
                     EntityAccess entityAccess)
Called before an entity is updated

Parameters:
entity - The entity
entityAccess - The object
Returns:
False if the operation should be cancelled

beforeDelete

boolean beforeDelete(PersistentEntity entity,
                     EntityAccess entityAccess)
Called before an entity is deleted

Parameters:
entity - The entity
entityAccess - The object
Returns:
False if the operation should be cancelled