Groovy Documentation

org.codehaus.groovy.grails.orm.hibernate
[Java] Class EventTriggeringInterceptor

java.lang.Object
  org.grails.datastore.mapping.engine.event.AbstractPersistenceEventListener
      org.codehaus.groovy.grails.orm.hibernate.EventTriggeringInterceptor

public class EventTriggeringInterceptor
extends org.grails.datastore.mapping.engine.event.AbstractPersistenceEventListener

Invokes closure events on domain entities such as beforeInsert, beforeUpdate and beforeDelete.

Authors:
Graeme Rocher
Lari Hotari
Burt Beckwith
Since:
2.0


Field Summary
 
Fields inherited from class org.grails.datastore.mapping.engine.event.AbstractPersistenceEventListener
DEFAULT_ORDER, HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
 
Constructor Summary
EventTriggeringInterceptor(HibernateDatastore datastore, groovy.util.ConfigObject co)

 
Method Summary
protected void onPersistenceEvent(org.grails.datastore.mapping.engine.event.AbstractPersistenceEvent event)

void onPostDelete(org.hibernate.event.PostDeleteEvent event)

void onPostInsert(org.hibernate.event.PostInsertEvent event)

void onPostLoad(org.hibernate.event.PostLoadEvent event)

void onPostUpdate(org.hibernate.event.PostUpdateEvent event)

boolean onPreDelete(org.hibernate.event.PreDeleteEvent event)

boolean onPreInsert(org.hibernate.event.PreInsertEvent event)

void onPreLoad(org.hibernate.event.PreLoadEvent event)

boolean onPreUpdate(org.hibernate.event.PreUpdateEvent event)

void onSaveOrUpdate(org.hibernate.event.SaveOrUpdateEvent event)

void onValidate(org.grails.datastore.mapping.engine.event.ValidationEvent event)

boolean supportsEventType(java.lang.Class eventType)

{@inheritDoc}

 
Methods inherited from class org.grails.datastore.mapping.engine.event.AbstractPersistenceEventListener
org.grails.datastore.mapping.engine.event.AbstractPersistenceEventListener#getOrder(), org.grails.datastore.mapping.engine.event.AbstractPersistenceEventListener#onApplicationEvent(org.springframework.context.ApplicationEvent), org.grails.datastore.mapping.engine.event.AbstractPersistenceEventListener#supportsSourceType(java.lang.Class), org.grails.datastore.mapping.engine.event.AbstractPersistenceEventListener#wait(), org.grails.datastore.mapping.engine.event.AbstractPersistenceEventListener#wait(long), org.grails.datastore.mapping.engine.event.AbstractPersistenceEventListener#wait(long, int), org.grails.datastore.mapping.engine.event.AbstractPersistenceEventListener#equals(java.lang.Object), org.grails.datastore.mapping.engine.event.AbstractPersistenceEventListener#toString(), org.grails.datastore.mapping.engine.event.AbstractPersistenceEventListener#hashCode(), org.grails.datastore.mapping.engine.event.AbstractPersistenceEventListener#getClass(), org.grails.datastore.mapping.engine.event.AbstractPersistenceEventListener#notify(), org.grails.datastore.mapping.engine.event.AbstractPersistenceEventListener#notifyAll(), org.grails.datastore.mapping.engine.event.AbstractPersistenceEventListener#supportsEventType(java.lang.Class)
 
Methods inherited from class java.lang.Object
java.lang.Object#wait(), java.lang.Object#wait(long), java.lang.Object#wait(long, int), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll()
 

Constructor Detail

EventTriggeringInterceptor

public EventTriggeringInterceptor(HibernateDatastore datastore, groovy.util.ConfigObject co)


 
Method Detail

onPersistenceEvent

@Override
protected void onPersistenceEvent(org.grails.datastore.mapping.engine.event.AbstractPersistenceEvent event)


onPostDelete

public void onPostDelete(org.hibernate.event.PostDeleteEvent event)


onPostInsert

public void onPostInsert(org.hibernate.event.PostInsertEvent event)


onPostLoad

public void onPostLoad(org.hibernate.event.PostLoadEvent event)


onPostUpdate

public void onPostUpdate(org.hibernate.event.PostUpdateEvent event)


onPreDelete

public boolean onPreDelete(org.hibernate.event.PreDeleteEvent event)


onPreInsert

public boolean onPreInsert(org.hibernate.event.PreInsertEvent event)


onPreLoad

public void onPreLoad(org.hibernate.event.PreLoadEvent event)


onPreUpdate

public boolean onPreUpdate(org.hibernate.event.PreUpdateEvent event)


onSaveOrUpdate

public void onSaveOrUpdate(org.hibernate.event.SaveOrUpdateEvent event)


onValidate

public void onValidate(org.grails.datastore.mapping.engine.event.ValidationEvent event)


supportsEventType

public boolean supportsEventType(java.lang.Class eventType)
{@inheritDoc}
See Also:
org.springframework.context.event.SmartApplicationListener#supportsEventType


 

Groovy Documentation