org.jboss.jpa.resolvers
Class BasePersistenceUnitDependencyResolver

java.lang.Object
  extended by org.jboss.jpa.resolvers.BasePersistenceUnitDependencyResolver
All Implemented Interfaces:
PersistenceUnitDependencyResolver
Direct Known Subclasses:
DefaultPersistenceUnitDependencyResolver, DynamicPersistenceUnitDependencyResolver, InterApplicationPersistenceUnitDependencyResolver

public abstract class BasePersistenceUnitDependencyResolver
extends Object
implements PersistenceUnitDependencyResolver

A configurable PersistenceUnitDependencyResolver.

Version:
$Revision: $
Author:
Carlo de Wolf

Constructor Summary
protected BasePersistenceUnitDependencyResolver()
          Make sure to set the strategy before using!
protected BasePersistenceUnitDependencyResolver(SearchStrategy strategy)
           
 
Method Summary
 String createBeanName(org.jboss.deployers.structure.spi.DeploymentUnit deploymentUnit, String persistenceUnitName)
          Create a bean name for a persistence unit (deployment).
protected static org.jboss.deployers.structure.spi.DeploymentUnit getDeploymentUnit(org.jboss.deployers.structure.spi.DeploymentUnit current, String path)
           
 String resolvePersistenceUnitSupplier(org.jboss.deployers.structure.spi.DeploymentUnit deploymentUnit, String persistenceUnitName)
          Get the name of the bean that supplies the specified persistence unit.
 void setJavaEEModuleInformer(JavaEEModuleInformer informer)
           
protected  void setSearchStrategy(SearchStrategy strategy)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BasePersistenceUnitDependencyResolver

protected BasePersistenceUnitDependencyResolver()
Make sure to set the strategy before using!


BasePersistenceUnitDependencyResolver

protected BasePersistenceUnitDependencyResolver(SearchStrategy strategy)
Method Detail

createBeanName

public String createBeanName(org.jboss.deployers.structure.spi.DeploymentUnit deploymentUnit,
                             String persistenceUnitName)
Description copied from interface: PersistenceUnitDependencyResolver
Create a bean name for a persistence unit (deployment).

Specified by:
createBeanName in interface PersistenceUnitDependencyResolver
Parameters:
deploymentUnit - the deployment unit in which the persistence unit is defined
persistenceUnitName - the name of the persistence unit
Returns:
the bean name

getDeploymentUnit

protected static org.jboss.deployers.structure.spi.DeploymentUnit getDeploymentUnit(org.jboss.deployers.structure.spi.DeploymentUnit current,
                                                                                    String path)

resolvePersistenceUnitSupplier

public String resolvePersistenceUnitSupplier(org.jboss.deployers.structure.spi.DeploymentUnit deploymentUnit,
                                             String persistenceUnitName)
Description copied from interface: PersistenceUnitDependencyResolver
Get the name of the bean that supplies the specified persistence unit. Note that a null or empty persistence unit name returns the default (first available) persistence unit.

Specified by:
resolvePersistenceUnitSupplier in interface PersistenceUnitDependencyResolver
Parameters:
deploymentUnit - the deployment unit that has a persistence unit reference
persistenceUnitName - the (relative) name of a persistence unit or null for the default persistence unit
Returns:
the bean name of the persistence unit

setJavaEEModuleInformer

public void setJavaEEModuleInformer(JavaEEModuleInformer informer)

setSearchStrategy

protected void setSearchStrategy(SearchStrategy strategy)


Copyright © 2009 JBoss, a division of Red Hat, Inc.. All Rights Reserved.