|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.caucho.env.jpa.PersistenceManager
@Module public class PersistenceManager
Manages the JPA persistence contexts.
| Method Summary | |
|---|---|
void |
addPersistenceUnitDefault(ConfigProgram program)
Adds a persistence-unit default |
void |
addPersistenceUnitProxy(java.lang.String name,
java.util.ArrayList<ConfigProgram> program)
Adds a persistence-unit default |
void |
classMatchEvent(EnvironmentClassLoader loader,
Path root,
java.lang.String className)
Callback to note the class matches |
void |
close()
|
void |
configurePersistenceRoots()
|
static PersistenceManager |
create()
Returns the local container. |
static PersistenceManager |
create(java.lang.ClassLoader loader)
Returns the local container. |
void |
environmentBind(EnvironmentClassLoader loader)
Handles the environment config phase |
void |
environmentConfigure(EnvironmentClassLoader loader)
Handles the environment config phase |
void |
environmentConfigureEnhancer(EnvironmentClassLoader loader)
Handles the environment config phase |
void |
environmentStart(EnvironmentClassLoader loader)
Handles the case where the environment is starting (after init). |
void |
environmentStop(EnvironmentClassLoader loader)
Handles the case where the environment is stopping |
EnvironmentClassLoader |
getClassLoader()
Returns the environment's class loader |
static PersistenceManager |
getCurrent()
Returns the local container. |
static PersistenceManager |
getCurrent(java.lang.ClassLoader loader)
Returns the current environment container. |
java.util.ArrayList<ConfigProgram> |
getPersistenceUnitDefaults()
Returns the persistence-unit default list. |
java.util.ArrayList<ConfigProgram> |
getProxyProgram(java.lang.String name)
|
int |
getScanPriority()
Since JPA enhances, it is priority 0 |
java.lang.ClassLoader |
getTempClassLoader()
Returns the JClassLoader. |
void |
init()
|
boolean |
isRootScannable(Path root,
java.lang.String packageRoot)
Returns true if the root is a valid scannable root. |
boolean |
isScanMatchAnnotation(CharBuffer annotationName)
Returns true if the string matches an annotation class. |
java.lang.Class<?> |
loadTempClass(java.lang.String name)
|
ScanClass |
scanClass(Path root,
java.lang.String packageRoot,
java.lang.String className,
int modifiers)
Returns the state when scanning the class |
void |
start()
|
void |
startPersistenceUnits()
Adds the URLs for the classpath. |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Method Detail |
|---|
public static PersistenceManager create()
public static PersistenceManager create(java.lang.ClassLoader loader)
public static PersistenceManager getCurrent()
public static PersistenceManager getCurrent(java.lang.ClassLoader loader)
public EnvironmentClassLoader getClassLoader()
public java.lang.ClassLoader getTempClassLoader()
public void addPersistenceUnitDefault(ConfigProgram program)
public java.util.ArrayList<ConfigProgram> getPersistenceUnitDefaults()
public void addPersistenceUnitProxy(java.lang.String name,
java.util.ArrayList<ConfigProgram> program)
public java.util.ArrayList<ConfigProgram> getProxyProgram(java.lang.String name)
public java.lang.Class<?> loadTempClass(java.lang.String name)
throws java.lang.ClassNotFoundException
java.lang.ClassNotFoundExceptionpublic void init()
public void start()
public void configurePersistenceRoots()
public void startPersistenceUnits()
public void close()
public int getScanPriority()
getScanPriority in interface ScanListener
public boolean isRootScannable(Path root,
java.lang.String packageRoot)
isRootScannable in interface ScanListener
public ScanClass scanClass(Path root,
java.lang.String packageRoot,
java.lang.String className,
int modifiers)
ScanListener
scanClass in interface ScanListenerroot - the module/jar's root pathpackageRoot - the virtual package root (usually for Testing)className - the class namemodifiers - the class modifiers
public boolean isScanMatchAnnotation(CharBuffer annotationName)
ScanListener
isScanMatchAnnotation in interface ScanListener
public void classMatchEvent(EnvironmentClassLoader loader,
Path root,
java.lang.String className)
classMatchEvent in interface ScanListenerpublic void environmentConfigureEnhancer(EnvironmentClassLoader loader)
environmentConfigureEnhancer in interface EnvironmentEnhancerListenerpublic void environmentConfigure(EnvironmentClassLoader loader)
environmentConfigure in interface EnvironmentListenerpublic void environmentBind(EnvironmentClassLoader loader)
environmentBind in interface EnvironmentListenerpublic void environmentStart(EnvironmentClassLoader loader)
environmentStart in interface EnvironmentListenerpublic void environmentStop(EnvironmentClassLoader loader)
environmentStop in interface EnvironmentListenerpublic java.lang.String toString()
toString in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||