org.jboss.jpa.resolvers
Interface PersistenceUnitDependencyResolver

All Known Implementing Classes:
BasePersistenceUnitDependencyResolver, DefaultPersistenceUnitDependencyResolver, DynamicPersistenceUnitDependencyResolver, InterApplicationPersistenceUnitDependencyResolver

public interface PersistenceUnitDependencyResolver

Based on the available meta data resolve persistence unit references.

Version:
$Revision: $
Author:
Carlo de Wolf

Method Summary
 String createBeanName(org.jboss.deployers.structure.spi.DeploymentUnit deploymentUnit, String persistenceUnitName)
          Create a bean name for a persistence unit (deployment).
 String resolvePersistenceUnitSupplier(org.jboss.deployers.structure.spi.DeploymentUnit deploymentUnit, String persistenceUnitName)
          Get the name of the bean that supplies the specified persistence unit.
 

Method Detail

createBeanName

String createBeanName(org.jboss.deployers.structure.spi.DeploymentUnit deploymentUnit,
                      String persistenceUnitName)
Create a bean name for a persistence unit (deployment).

Parameters:
deploymentUnit - the deployment unit in which the persistence unit is defined
persistenceUnitName - the name of the persistence unit
Returns:
the bean name

resolvePersistenceUnitSupplier

String resolvePersistenceUnitSupplier(org.jboss.deployers.structure.spi.DeploymentUnit deploymentUnit,
                                      String persistenceUnitName)
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.

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


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