|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.openjpa.lib.conf.AbstractProductDerivation org.apache.openjpa.persistence.PersistenceProductDerivation
public class PersistenceProductDerivation
Sets JPA specification defaults and parses JPA specification XML files.
For globals, looks in openjpa.properties
system property for
the location of a file to parse. If no system property is defined, the
default resource location of META-INF/openjpa.xml
is used.
For defaults, looks for META-INF/persistence.xml
.
Within persistence.xml
, look for the named persistence unit, or
if no name given, an OpenJPA unit (preferring an unnamed OpenJPA unit to
a named one).
Nested Class Summary | |
---|---|
static class |
PersistenceProductDerivation.ConfigurationParser
SAX handler capable of parsing an JPA persistence.xml file. |
static class |
PersistenceProductDerivation.ConfigurationProviderImpl
Custom configuration provider. |
Field Summary | |
---|---|
static String |
ALIAS_EJB
|
static String |
RSRC_DEFAULT
|
static String |
RSRC_GLOBAL
|
static String |
SPEC_JPA
|
Fields inherited from interface org.apache.openjpa.conf.OpenJPAProductDerivation |
---|
TYPE_PRODUCT_STORE, TYPE_SPEC, TYPE_SPEC_STORE, TYPE_STORE |
Fields inherited from interface org.apache.openjpa.lib.conf.ProductDerivation |
---|
TYPE_FEATURE, TYPE_PRODUCT |
Constructor Summary | |
---|---|
PersistenceProductDerivation()
|
Method Summary | |
---|---|
boolean |
afterSpecificationSet(Configuration c)
Called after the specification has been set. |
boolean |
beforeConfigurationLoad(Configuration c)
Provides the instance with the opportunity to mutate conf before the user configuration is applied. |
int |
getType()
Return the type of derivation. |
ConfigurationProvider |
load(File file,
String anchor)
Load given file, or return null if it is not a file this receiver understands. |
ConfigurationProvider |
load(PersistenceUnitInfo pinfo,
Map m)
Load configuration from the given persistence unit with the specified user properties. |
ConfigurationProvider |
load(String rsrc,
String anchor,
ClassLoader loader)
Load the given given resource into the returned ConfigurationProvider, or return null if it is not a resource this receiver understands. |
ConfigurationProvider |
load(String rsrc,
String name,
Map m)
Load configuration from the given resource and unit names, which may be null. |
ConfigurationProvider |
loadDefaults(ClassLoader loader)
Load defaults into the returned ConfigurationProvider, or return null if no defaults are found. |
ConfigurationProvider |
loadGlobals(ClassLoader loader)
Load globals into the returned ConfigurationProvider, or return null if no globals are found. |
void |
putBrokerFactoryAliases(Map m)
Load default alias options into the given map. |
void |
validate()
Ensure that this derivation is valid. |
Methods inherited from class org.apache.openjpa.lib.conf.AbstractProductDerivation |
---|
beforeConfigurationClose, beforeConfigurationConstruct, getConfigurationPrefix |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.apache.openjpa.lib.conf.ProductDerivation |
---|
beforeConfigurationClose, beforeConfigurationConstruct, getConfigurationPrefix |
Field Detail |
---|
public static final String SPEC_JPA
public static final String ALIAS_EJB
public static final String RSRC_GLOBAL
public static final String RSRC_DEFAULT
Constructor Detail |
---|
public PersistenceProductDerivation()
Method Detail |
---|
public void putBrokerFactoryAliases(Map m)
OpenJPAProductDerivation
putBrokerFactoryAliases
in interface OpenJPAProductDerivation
public int getType()
ProductDerivation
getType
in interface ProductDerivation
public void validate() throws Exception
ProductDerivation
validate
in interface ProductDerivation
validate
in class AbstractProductDerivation
Exception
public boolean beforeConfigurationLoad(Configuration c)
ProductDerivation
conf
before the user configuration is applied.
beforeConfigurationLoad
in interface ProductDerivation
beforeConfigurationLoad
in class AbstractProductDerivation
public boolean afterSpecificationSet(Configuration c)
ProductDerivation
afterSpecificationSet
in interface ProductDerivation
afterSpecificationSet
in class AbstractProductDerivation
public ConfigurationProvider load(PersistenceUnitInfo pinfo, Map m) throws IOException
IOException
public ConfigurationProvider load(String rsrc, String name, Map m) throws IOException
IOException
public ConfigurationProvider load(String rsrc, String anchor, ClassLoader loader) throws IOException
ProductDerivation
load
in interface ProductDerivation
load
in class AbstractProductDerivation
anchor
- optional named anchor within a multiple-configuration
resource
IOException
public ConfigurationProvider load(File file, String anchor) throws IOException
ProductDerivation
load
in interface ProductDerivation
load
in class AbstractProductDerivation
anchor
- optional named anchor within a multiple-configuration file
IOException
public ConfigurationProvider loadGlobals(ClassLoader loader) throws IOException
ProductDerivation
loadGlobals
in interface ProductDerivation
loadGlobals
in class AbstractProductDerivation
IOException
public ConfigurationProvider loadDefaults(ClassLoader loader) throws IOException
ProductDerivation
loadDefaults
in interface ProductDerivation
loadDefaults
in class AbstractProductDerivation
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |