org.apache.cayenne.jpa.conf
Class UnitLoader

java.lang.Object
  extended by org.apache.cayenne.jpa.conf.UnitLoader

public class UnitLoader
extends Object

A class that locates persistent units in the environment and loads their definitions.

Author:
Andrus Adamchik

Field Summary
protected  UnitDescriptorParser parser
           
 
Constructor Summary
UnitLoader(boolean validateDescriptors)
           
 
Method Summary
 JpaUnit loadUnit(String persistenceUnitName)
          Loads PersistenceUnitInfo from standard locations.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

parser

protected UnitDescriptorParser parser
Constructor Detail

UnitLoader

public UnitLoader(boolean validateDescriptors)
Method Detail

loadUnit

public JpaUnit loadUnit(String persistenceUnitName)
Loads PersistenceUnitInfo from standard locations. Returns null if no persistent unit with requested name is found.

Implementation note: the loader performs no local caching of unit data. It will scan all available peristence unit descriptors every time this method is called.



Copyright © 2001-2007 Apache Cayenne. All Rights Reserved.