EclipseLink 2.4.2, build 'v20130514-5956486' API Reference

org.eclipse.persistence.jpa.rs
Class PersistenceFactoryBase

java.lang.Object
  extended by org.eclipse.persistence.jpa.rs.PersistenceFactoryBase
All Implemented Interfaces:
PersistenceContextFactory

public class PersistenceFactoryBase
extends java.lang.Object
implements PersistenceContextFactory

Manages the PersistenceContexts that are used by a JPA-RS deployment. Provides a single point to bootstrap and look up PersistenceContexts

Author:
tware

Field Summary
protected  java.util.Map<java.lang.String,PersistenceContext> dynamicPersistenceContexts
           
 
Constructor Summary
PersistenceFactoryBase()
           
 
Method Summary
 PersistenceContext bootstrapPersistenceContext(java.lang.String name, EntityManagerFactory emf, java.net.URI baseURI, java.lang.String version, boolean replace)
          Bootstrap a PersistenceContext based on an pre-existing EntityManagerFactory
 void close()
          Stop the factory.
 void closePersistenceContext(java.lang.String name)
          Close the PersistenceContext of a given name and clean it out of our list of PersistenceContexts
protected static java.util.Map<java.lang.String,java.lang.Object> createProperties(DynamicClassLoader dcl, java.util.Map<java.lang.String,?> originalProperties)
          Provide an initial set of properties for bootstrapping PersistenceContexts.
 PersistenceContext get(java.lang.String persistenceUnit, java.net.URI defaultURI, java.lang.String version, java.util.Map<java.lang.String,java.lang.Object> initializationProperties)
           
 PersistenceContext getDynamicPersistenceContext(java.lang.String name)
           
 java.util.Set<java.lang.String> getPersistenceContextNames()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

dynamicPersistenceContexts

protected java.util.Map<java.lang.String,PersistenceContext> dynamicPersistenceContexts
Constructor Detail

PersistenceFactoryBase

public PersistenceFactoryBase()
Method Detail

bootstrapPersistenceContext

public PersistenceContext bootstrapPersistenceContext(java.lang.String name,
                                                      EntityManagerFactory emf,
                                                      java.net.URI baseURI,
                                                      java.lang.String version,
                                                      boolean replace)
Bootstrap a PersistenceContext based on an pre-existing EntityManagerFactory

Parameters:
name -
emf -
baseURI -
replace -
Returns:

close

public void close()
Stop the factory. Remove all the PersistenceContexts.

Specified by:
close in interface PersistenceContextFactory

closePersistenceContext

public void closePersistenceContext(java.lang.String name)
Close the PersistenceContext of a given name and clean it out of our list of PersistenceContexts

Specified by:
closePersistenceContext in interface PersistenceContextFactory
Parameters:
name -

createProperties

protected static java.util.Map<java.lang.String,java.lang.Object> createProperties(DynamicClassLoader dcl,
                                                                                   java.util.Map<java.lang.String,?> originalProperties)
Provide an initial set of properties for bootstrapping PersistenceContexts.

Parameters:
dcl -
originalProperties -
Returns:

get

public PersistenceContext get(java.lang.String persistenceUnit,
                              java.net.URI defaultURI,
                              java.lang.String version,
                              java.util.Map<java.lang.String,java.lang.Object> initializationProperties)
Specified by:
get in interface PersistenceContextFactory

getPersistenceContextNames

public java.util.Set<java.lang.String> getPersistenceContextNames()
Specified by:
getPersistenceContextNames in interface PersistenceContextFactory

getDynamicPersistenceContext

public PersistenceContext getDynamicPersistenceContext(java.lang.String name)

EclipseLink 2.4.2, build 'v20130514-5956486' API Reference