org.apache.openjpa.persistence
Class PersistenceProductDerivation
java.lang.Object
org.apache.openjpa.lib.conf.AbstractProductDerivation
org.apache.openjpa.persistence.PersistenceProductDerivation
- All Implemented Interfaces:
- OpenJPAProductDerivation, org.apache.openjpa.lib.conf.ProductDerivation
public class PersistenceProductDerivation
- extends org.apache.openjpa.lib.conf.AbstractProductDerivation
- implements OpenJPAProductDerivation
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).
- Author:
- Abe White
Fields inherited from interface org.apache.openjpa.lib.conf.ProductDerivation |
TYPE_FEATURE, TYPE_PRODUCT |
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 |
SPEC_JPA
public static final String SPEC_JPA
- See Also:
- Constant Field Values
ALIAS_EJB
public static final String ALIAS_EJB
- See Also:
- Constant Field Values
RSRC_GLOBAL
public static final String RSRC_GLOBAL
- See Also:
- Constant Field Values
RSRC_DEFAULT
public static final String RSRC_DEFAULT
- See Also:
- Constant Field Values
PersistenceProductDerivation
public PersistenceProductDerivation()
putBrokerFactoryAliases
public void putBrokerFactoryAliases(Map m)
- Specified by:
putBrokerFactoryAliases
in interface OpenJPAProductDerivation
getType
public int getType()
- Specified by:
getType
in interface org.apache.openjpa.lib.conf.ProductDerivation
validate
public void validate()
throws Exception
- Specified by:
validate
in interface org.apache.openjpa.lib.conf.ProductDerivation
- Overrides:
validate
in class org.apache.openjpa.lib.conf.AbstractProductDerivation
- Throws:
Exception
beforeConfigurationLoad
public boolean beforeConfigurationLoad(org.apache.openjpa.lib.conf.Configuration c)
- Specified by:
beforeConfigurationLoad
in interface org.apache.openjpa.lib.conf.ProductDerivation
- Overrides:
beforeConfigurationLoad
in class org.apache.openjpa.lib.conf.AbstractProductDerivation
afterSpecificationSet
public boolean afterSpecificationSet(org.apache.openjpa.lib.conf.Configuration c)
- Specified by:
afterSpecificationSet
in interface org.apache.openjpa.lib.conf.ProductDerivation
- Overrides:
afterSpecificationSet
in class org.apache.openjpa.lib.conf.AbstractProductDerivation
load
public org.apache.openjpa.lib.conf.ConfigurationProvider load(javax.persistence.spi.PersistenceUnitInfo pinfo,
Map m)
throws IOException
- Load configuration from the given persistence unit with the specified
user properties.
- Throws:
IOException
load
public org.apache.openjpa.lib.conf.ConfigurationProvider load(String rsrc,
String name,
Map m)
throws IOException
- Load configuration from the given resource and unit names, which may
be null.
- Throws:
IOException
load
public org.apache.openjpa.lib.conf.ConfigurationProvider load(String rsrc,
String anchor,
ClassLoader loader)
throws IOException
- Specified by:
load
in interface org.apache.openjpa.lib.conf.ProductDerivation
- Overrides:
load
in class org.apache.openjpa.lib.conf.AbstractProductDerivation
- Throws:
IOException
load
public org.apache.openjpa.lib.conf.ConfigurationProvider load(File file,
String anchor)
throws IOException
- Specified by:
load
in interface org.apache.openjpa.lib.conf.ProductDerivation
- Overrides:
load
in class org.apache.openjpa.lib.conf.AbstractProductDerivation
- Throws:
IOException
getDefaultResourceLocation
public String getDefaultResourceLocation()
- Specified by:
getDefaultResourceLocation
in interface org.apache.openjpa.lib.conf.ProductDerivation
- Overrides:
getDefaultResourceLocation
in class org.apache.openjpa.lib.conf.AbstractProductDerivation
getAnchorsInFile
public List getAnchorsInFile(File file)
throws IOException
- Specified by:
getAnchorsInFile
in interface org.apache.openjpa.lib.conf.ProductDerivation
- Overrides:
getAnchorsInFile
in class org.apache.openjpa.lib.conf.AbstractProductDerivation
- Throws:
IOException
getAnchorsInResource
public List getAnchorsInResource(String resource)
throws Exception
- Specified by:
getAnchorsInResource
in interface org.apache.openjpa.lib.conf.ProductDerivation
- Overrides:
getAnchorsInResource
in class org.apache.openjpa.lib.conf.AbstractProductDerivation
- Throws:
Exception
loadGlobals
public org.apache.openjpa.lib.conf.ConfigurationProvider loadGlobals(ClassLoader loader)
throws IOException
- Specified by:
loadGlobals
in interface org.apache.openjpa.lib.conf.ProductDerivation
- Overrides:
loadGlobals
in class org.apache.openjpa.lib.conf.AbstractProductDerivation
- Throws:
IOException
loadDefaults
public org.apache.openjpa.lib.conf.ConfigurationProvider loadDefaults(ClassLoader loader)
throws IOException
- Specified by:
loadDefaults
in interface org.apache.openjpa.lib.conf.ProductDerivation
- Overrides:
loadDefaults
in class org.apache.openjpa.lib.conf.AbstractProductDerivation
- Throws:
IOException
Copyright © 2006-2012 Apache Software Foundation. All Rights Reserved.