org.specrunner.hibernate
Class HibernateListener
java.lang.Object
org.specrunner.hibernate.HibernateListener
- All Implemented Interfaces:
- Serializable, org.hibernate.event.spi.PostInsertEventListener, org.hibernate.event.spi.PreInsertEventListener
public class HibernateListener
- extends Object
- implements org.hibernate.event.spi.PreInsertEventListener, org.hibernate.event.spi.PostInsertEventListener
A Hibernate listener to monitor object insertions.
- Author:
- Thiago Santos
- See Also:
- Serialized Form
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
entities
protected Map<Class<?>,AbstractPluginObject> entities
- Map of objects inserted.
keyBefore
protected String keyBefore
- Key of object before inclusion.
HibernateListener
public HibernateListener(Map<Class<?>,AbstractPluginObject> entities)
- Creates a listener with a entities mapping.
- Parameters:
entities - The entity mapping by type.
onPreInsert
public boolean onPreInsert(org.hibernate.event.spi.PreInsertEvent event)
- Specified by:
onPreInsert in interface org.hibernate.event.spi.PreInsertEventListener
onPostInsert
public void onPostInsert(org.hibernate.event.spi.PostInsertEvent event)
- Specified by:
onPostInsert in interface org.hibernate.event.spi.PostInsertEventListener
requiresPostCommitHanding
public boolean requiresPostCommitHanding(org.hibernate.persister.entity.EntityPersister persister)
- Specified by:
requiresPostCommitHanding in interface org.hibernate.event.spi.PostInsertEventListener
Copyright © 2014. All rights reserved.