|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.cayenne.jpa.Provider
public class Provider
A PersistenceProvider implementation based on Cayenne stack. Wraps a Cayenne Configuration instance.
Field Summary | |
---|---|
static String |
ADAPTER_PROPERTY
|
protected Configuration |
configuration
|
static String |
CREATE_SCHEMA_PROPERTY
|
static String |
DATA_SOURCE_DRIVER_PROPERTY
|
static String |
DATA_SOURCE_FACTORY_PROPERTY
|
static String |
DATA_SOURCE_MAX_CONNECTIONS_PROPERTY
|
static String |
DATA_SOURCE_MIN_CONNECTIONS_PROPERTY
|
static String |
DATA_SOURCE_PASSWORD_PROPERTY
|
static String |
DATA_SOURCE_URL_PROPERTY
|
static String |
DATA_SOURCE_USER_NAME_PROPERTY
|
protected Properties |
defaultProperties
|
static String |
JTA_DATA_SOURCE_PROPERTY
|
protected org.apache.commons.logging.Log |
logger
|
static String |
NON_JTA_DATA_SOURCE_PROPERTY
|
static String |
PROVIDER_PROPERTY
|
static String |
TRANSACTION_TYPE_PROPERTY
|
protected UnitLoader |
unitLoader
|
protected boolean |
validateDescriptors
|
Constructor Summary | |
---|---|
Provider()
Creates a new PersistenceProvider with properties configured to run in a standalone mode with Cayenne stack. |
|
Provider(boolean validateDescriptors)
|
Method Summary | |
---|---|
protected void |
configureDefaultProperties()
|
protected void |
configureEnvironmentProperties()
Loads default properties from the Java environment. |
EntityManagerFactory |
createContainerEntityManagerFactory(PersistenceUnitInfo unit,
Map map)
Called by the container when an EntityManagerFactory is to be created. |
protected DbAdapter |
createCustomAdapter(EntityMapLoaderContext context,
PersistenceUnitInfo info)
|
EntityManagerFactory |
createEntityManagerFactory(String emName,
Map map)
Called by Persistence class when an EntityManagerFactory is to be created. |
Configuration |
getConfiguration()
|
protected String |
getDefaultProperty(String key)
|
protected UnitLoader |
getUnitLoader()
Returns unit loader, lazily creating it on first invocation. |
protected void |
loadSchema(DataSource dataSource,
DbAdapter adapter,
DataMap map)
Loads database schema if it doesn't yet exist. |
protected JpaUnit |
loadUnit(String emName)
Loads a named JpaUnit using internal UnitLoader. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String PROVIDER_PROPERTY
public static final String TRANSACTION_TYPE_PROPERTY
public static final String JTA_DATA_SOURCE_PROPERTY
public static final String NON_JTA_DATA_SOURCE_PROPERTY
public static final String CREATE_SCHEMA_PROPERTY
public static final String DATA_SOURCE_FACTORY_PROPERTY
public static final String ADAPTER_PROPERTY
public static final String DATA_SOURCE_DRIVER_PROPERTY
public static final String DATA_SOURCE_URL_PROPERTY
public static final String DATA_SOURCE_USER_NAME_PROPERTY
public static final String DATA_SOURCE_PASSWORD_PROPERTY
public static final String DATA_SOURCE_MIN_CONNECTIONS_PROPERTY
public static final String DATA_SOURCE_MAX_CONNECTIONS_PROPERTY
protected boolean validateDescriptors
protected UnitLoader unitLoader
protected Properties defaultProperties
protected Configuration configuration
protected org.apache.commons.logging.Log logger
Constructor Detail |
---|
public Provider()
public Provider(boolean validateDescriptors)
Method Detail |
---|
protected void configureEnvironmentProperties()
protected void configureDefaultProperties()
public EntityManagerFactory createEntityManagerFactory(String emName, Map map)
JpaUnit
and calls
createContainerEntityManagerFactory(PersistenceUnitInfo, Map)
.
public EntityManagerFactory createContainerEntityManagerFactory(PersistenceUnitInfo unit, Map map)
EntityManagerFactory
which is a DataDomain wrapper. Note that Cayenne
provider will ignore all but 'javax.persistence.transactionType' property in the
passed property map.
protected void loadSchema(DataSource dataSource, DbAdapter adapter, DataMap map)
protected DbAdapter createCustomAdapter(EntityMapLoaderContext context, PersistenceUnitInfo info)
public Configuration getConfiguration()
protected JpaUnit loadUnit(String emName)
protected UnitLoader getUnitLoader()
protected String getDefaultProperty(String key)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |