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 ClosureEventListener

    java.lang.Object
      org.codehaus.groovy.grails.orm.hibernate.support.ClosureEventListener

All Implemented Interfaces:
  SaveOrUpdateEventListener

    public class ClosureEventListener

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:
  Lari Hotari

Since:
  1.3.5

Constructor Summary
`ClosureEventListener(java.lang.Class domainClazz, boolean failOnError, java.util.List failOnErrorPackages)`

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)`

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

### ClosureEventListener

    ssWarnings("unchecked")
    	public
    public ClosureEventListener(java.lang.Class domainClazz, boolean failOnError, java.util.List failOnErrorPackages)

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

    ssWarnings("unchecked")
    	public
    public boolean onPreUpdate(PreUpdateEvent event)

### onSaveOrUpdate

    ssWarnings("unchecked")
    	public
    public void onSaveOrUpdate(SaveOrUpdateEvent event)

Groovy Documentation