org.jboss.webbeans.persistence.spi.helpers
Class ForwardingJpaServices

java.lang.Object
  extended by org.jboss.webbeans.persistence.spi.helpers.ForwardingJpaServices
All Implemented Interfaces:
Service, JpaServices

public abstract class ForwardingJpaServices
extends java.lang.Object
implements JpaServices

An implementation of JpaServices which forwards all its method calls to another JpaServices}. Subclasses should override one or more methods to modify the behavior of the backing JpaServices as desired per the decorator pattern.

Author:
Pete Muir

Constructor Summary
ForwardingJpaServices()
           
 
Method Summary
protected abstract  JpaServices delegate()
           
 boolean equals(java.lang.Object obj)
           
 int hashCode()
           
 javax.persistence.EntityManager resolvePersistenceContext(InjectionPoint injectionPoint)
          Resolve the value for the given @PersistenceContext injection point
 javax.persistence.EntityManager resolvePersistenceContext(java.lang.String unitName)
          Resolve a persistence context for a given persistence unit name
 javax.persistence.EntityManagerFactory resolvePersistenceUnit(java.lang.String unitName)
          Resolve a persistence unit for a given persistence unit name
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ForwardingJpaServices

public ForwardingJpaServices()
Method Detail

delegate

protected abstract JpaServices delegate()

resolvePersistenceContext

public javax.persistence.EntityManager resolvePersistenceContext(InjectionPoint injectionPoint)
Description copied from interface: JpaServices
Resolve the value for the given @PersistenceContext injection point

Specified by:
resolvePersistenceContext in interface JpaServices
Parameters:
injectionPoint - the injection point metadata
Returns:
an instance of the entity manager

resolvePersistenceContext

public javax.persistence.EntityManager resolvePersistenceContext(java.lang.String unitName)
Description copied from interface: JpaServices
Resolve a persistence context for a given persistence unit name

Specified by:
resolvePersistenceContext in interface JpaServices
Parameters:
unitName - the unit name
Returns:
an instance of the entity manager

resolvePersistenceUnit

public javax.persistence.EntityManagerFactory resolvePersistenceUnit(java.lang.String unitName)
Description copied from interface: JpaServices
Resolve a persistence unit for a given persistence unit name

Specified by:
resolvePersistenceUnit in interface JpaServices
Parameters:
unitName - the unit name
Returns:
an instance of the entity manager factory

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object


Copyright © 2011. All Rights Reserved.