Overview | Package | Class | Deprecated | Index | Help
| Groovy Documentation
| FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.codehaus.groovy.grails.orm.hibernate.support
[Java] Class ClosureEventTriggeringInterceptor

    java.lang.Object
      org.hibernate.event.def.DefaultSaveOrUpdateEventListener
          org.codehaus.groovy.grails.orm.hibernate.events.SaveOrUpdateEventListener
              org.codehaus.groovy.grails.orm.hibernate.support.ClosureEventTriggeringInterceptor

All Implemented Interfaces:
  ApplicationContextAware

    public class ClosureEventTriggeringInterceptor
    extends SaveOrUpdateEventListener

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

Also deals with auto time stamping of domain classes that have properties named 'lastUpdated' and/or 'dateCreated'.

Authors:
  Graeme Rocher
  Lari Hotari

Since:
  1.0

Field Summary
`static java.lang.String` | `AFTER_DELETE_EVENT`
`static java.lang.String` | `AFTER_INSERT_EVENT`
`static java.lang.String` | `AFTER_LOAD_EVENT`
`static java.lang.String` | `AFTER_UPDATE_EVENT`
`static java.lang.String` | `BEFORE_DELETE_EVENT`
`static java.lang.String` | `BEFORE_INSERT_EVENT`
`static java.lang.String` | `BEFORE_LOAD_EVENT`
`static java.lang.String` | `BEFORE_UPDATE_EVENT`
`static java.util.Collection` | `IGNORED`
`static java.lang.String` | `ONLOAD_EVENT`
`static java.lang.String` | `ONLOAD_SAVE`

Method Summary
`void` | `onPostDelete(PostDeleteEvent event)`
`void` | `onPostInsert(PostInsertEvent event)`
`void` | `onPostLoad(PostLoadEvent event)`
`void` | `onPostUpdate(PostUpdateEvent event)`
`boolean` | `onPreDelete(PreDeleteEvent event)`
`void` | `onPreLoad(PreLoadEvent event)`
`boolean` | `onPreUpdate(PreUpdateEvent event)`
`void` | `onSaveOrUpdate(SaveOrUpdateEvent event)`
`void` | `setApplicationContext(ApplicationContext applicationContext)`
`void` | `setConfiguration(groovy.util.ConfigObject co)`

Field Detail

### AFTER_DELETE_EVENT

    public static final java.lang.String AFTER_DELETE_EVENT

### AFTER_INSERT_EVENT

    public static final java.lang.String AFTER_INSERT_EVENT

### AFTER_LOAD_EVENT

    public static final java.lang.String AFTER_LOAD_EVENT

### AFTER_UPDATE_EVENT

    public static final java.lang.String AFTER_UPDATE_EVENT

### BEFORE_DELETE_EVENT

    public static final java.lang.String BEFORE_DELETE_EVENT

### BEFORE_INSERT_EVENT

    public static final java.lang.String BEFORE_INSERT_EVENT

### BEFORE_LOAD_EVENT

    public static final java.lang.String BEFORE_LOAD_EVENT

### BEFORE_UPDATE_EVENT

    public static final java.lang.String BEFORE_UPDATE_EVENT

### IGNORED

    public static final java.util.Collection IGNORED

### ONLOAD_EVENT

    public static final java.lang.String ONLOAD_EVENT

### ONLOAD_SAVE

    public static final java.lang.String ONLOAD_SAVE

Method Detail

### onPostDelete

    public void onPostDelete(PostDeleteEvent event)

### onPostInsert

    public void onPostInsert(PostInsertEvent event)

### onPostLoad

    public void onPostLoad(PostLoadEvent event)

### onPostUpdate

    public void onPostUpdate(PostUpdateEvent event)

### onPreDelete

    public boolean onPreDelete(PreDeleteEvent event)

### onPreLoad

    public void onPreLoad(PreLoadEvent event)

### onPreUpdate

    public boolean onPreUpdate(PreUpdateEvent event)

### onSaveOrUpdate

    public void onSaveOrUpdate(SaveOrUpdateEvent event)

### setApplicationContext

    public void setApplicationContext(ApplicationContext applicationContext)

### setConfiguration

    public void setConfiguration(groovy.util.ConfigObject co)

Groovy Documentation