org.compass.gps.device.jpa.lifecycle
Class HibernateJpaEntityCollectionLifecycleInjector

java.lang.Object
  extended by org.compass.gps.device.jpa.lifecycle.HibernateJpaEntityLifecycleInjector
      extended by org.compass.gps.device.jpa.lifecycle.HibernateJpaEntityCollectionLifecycleInjector
All Implemented Interfaces:
JpaEntityLifecycleInjector

public class HibernateJpaEntityCollectionLifecycleInjector
extends HibernateJpaEntityLifecycleInjector

Author:
kimchy

Nested Class Summary
static class HibernateJpaEntityCollectionLifecycleInjector.HibernateCollectionEventListener
           
 
Nested classes/interfaces inherited from class org.compass.gps.device.jpa.lifecycle.HibernateJpaEntityLifecycleInjector
HibernateJpaEntityLifecycleInjector.HibernateEventListener
 
Field Summary
 
Fields inherited from class org.compass.gps.device.jpa.lifecycle.HibernateJpaEntityLifecycleInjector
registerPostCommitListeneres
 
Constructor Summary
HibernateJpaEntityCollectionLifecycleInjector()
           
HibernateJpaEntityCollectionLifecycleInjector(boolean registerPostCommitListeneres)
           
 
Method Summary
protected  Object doCreateListener(JpaGpsDevice device)
           
 void injectLifecycle(javax.persistence.EntityManagerFactory entityManagerFactory, JpaGpsDevice device)
          Injects a global lifecycle listener into the concrete EntityManagerFactory implementation.
 void removeLifecycle(javax.persistence.EntityManagerFactory entityManagerFactory, JpaGpsDevice device)
          Removes (if possible) lifecycle listeners injected using the inject method.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HibernateJpaEntityCollectionLifecycleInjector

public HibernateJpaEntityCollectionLifecycleInjector()

HibernateJpaEntityCollectionLifecycleInjector

public HibernateJpaEntityCollectionLifecycleInjector(boolean registerPostCommitListeneres)
Method Detail

injectLifecycle

public void injectLifecycle(javax.persistence.EntityManagerFactory entityManagerFactory,
                            JpaGpsDevice device)
                     throws JpaGpsDeviceException
Description copied from interface: JpaEntityLifecycleInjector
Injects a global lifecycle listener into the concrete EntityManagerFactory implementation.

Specified by:
injectLifecycle in interface JpaEntityLifecycleInjector
Overrides:
injectLifecycle in class HibernateJpaEntityLifecycleInjector
Parameters:
entityManagerFactory - The EntityManagerFactory to inject the global lifecycle to.
device - The Jpa device calling this injector
Throws:
JpaGpsDeviceException

removeLifecycle

public void removeLifecycle(javax.persistence.EntityManagerFactory entityManagerFactory,
                            JpaGpsDevice device)
                     throws JpaGpsDeviceException
Description copied from interface: JpaEntityLifecycleInjector
Removes (if possible) lifecycle listeners injected using the inject method.

Specified by:
removeLifecycle in interface JpaEntityLifecycleInjector
Overrides:
removeLifecycle in class HibernateJpaEntityLifecycleInjector
Parameters:
entityManagerFactory - The EMF to remove lifecycle from
device - The Jpa device calling
Throws:
JpaGpsDeviceException

doCreateListener

protected Object doCreateListener(JpaGpsDevice device)
Overrides:
doCreateListener in class HibernateJpaEntityLifecycleInjector


Copyright (c) 2004-2008 The Compass Project.