org.grails.datastore.gorm.events
Class DomainEventInterceptor
java.lang.Object
org.springframework.datastore.engine.EmptyInterceptor
org.grails.datastore.gorm.events.DomainEventInterceptor
- All Implemented Interfaces:
- DatastoreAware, EntityInterceptor
public class DomainEventInterceptor
- extends EmptyInterceptor
An interceptor that provides support for GORM domain events
- Since:
- 1.0
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ZERO_PARAMS
public static final Class[] ZERO_PARAMS
EVENT_BEFORE_INSERT
public static final String EVENT_BEFORE_INSERT
- See Also:
- Constant Field Values
DomainEventInterceptor
public DomainEventInterceptor()
beforeInsert
public boolean beforeInsert(PersistentEntity entity,
EntityAccess ea)
- Description copied from interface:
EntityInterceptor
- Called before an entity is inserted
- Specified by:
beforeInsert
in interface EntityInterceptor
- Overrides:
beforeInsert
in class EmptyInterceptor
- Parameters:
entity
- The entityea
- The object
- Returns:
- False if the operation should be cancelled
beforeUpdate
public boolean beforeUpdate(PersistentEntity entity,
EntityAccess ea)
- Description copied from interface:
EntityInterceptor
- Called before an entity is updated
- Specified by:
beforeUpdate
in interface EntityInterceptor
- Overrides:
beforeUpdate
in class EmptyInterceptor
- Parameters:
entity
- The entityea
- The object
- Returns:
- False if the operation should be cancelled
beforeDelete
public boolean beforeDelete(PersistentEntity entity,
EntityAccess ea)
- Description copied from interface:
EntityInterceptor
- Called before an entity is deleted
- Specified by:
beforeDelete
in interface EntityInterceptor
- Overrides:
beforeDelete
in class EmptyInterceptor
- Parameters:
entity
- The entityea
- The object
- Returns:
- False if the operation should be cancelled
setDatastore
public void setDatastore(Datastore datastore)
- Description copied from interface:
DatastoreAware
- Sets the datastore on this instance
- Specified by:
setDatastore
in interface DatastoreAware
- Overrides:
setDatastore
in class EmptyInterceptor
- Parameters:
datastore
- The datastore