|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jpox.PersistenceConfiguration
org.jpox.ObjectManagerFactoryImpl
org.jpox.jdo.AbstractPersistenceManagerFactory
public abstract class AbstractPersistenceManagerFactory
Factory used to obtain PersistenceManager instances.
The factory is configurable up to a point when it is frozen. Thereafter nothing can be changed.
| Field Summary | |
|---|---|
protected java.util.List |
lifecycleListeners
Lifecycle Listeners |
protected static Localiser |
LOCALISER_JDO
Localisation utility for output messages from jdo. |
| Fields inherited from class org.jpox.ObjectManagerFactoryImpl |
|---|
cache, omfContext |
| Fields inherited from class org.jpox.PersistenceConfiguration |
|---|
configurable, LOCALISER |
| Constructor Summary | |
|---|---|
AbstractPersistenceManagerFactory()
Constructor. |
|
| Method Summary | |
|---|---|
void |
addInstanceLifecycleListener(javax.jdo.listener.InstanceLifecycleListener listener,
java.lang.Class[] classes)
Method to add lifecycle listeners for particular classes. |
void |
addSequenceForFactoryClass(java.lang.String factoryClassName,
javax.jdo.datastore.Sequence sequence)
Method to register a sequence for a particular factory class. |
protected void |
assertConfigurable()
Asserts that a change to a configuration property is allowed. |
protected void |
assertIsOpen()
Asserts that the PMF is open. |
void |
close()
Close this PersistenceManagerFactory. |
protected void |
freezeConfiguration()
Freezes the current configuration. |
java.lang.String |
getCatalog()
Accessor for the catalog to use for this persistence factory. |
java.lang.String |
getConnectionDriverName()
Get the driver name for the data store connection. |
java.lang.Object |
getConnectionFactory()
Get the data store connection factory. |
java.lang.Object |
getConnectionFactory2()
Get the second data store connection factory. |
java.lang.String |
getConnectionFactory2Name()
Get the name for the second data store connection factory. |
java.lang.String |
getConnectionFactoryName()
Get the name for the data store connection factory. |
java.lang.String |
getConnectionPassword()
Get the password for the data store connection. |
java.lang.String |
getConnectionURL()
Get the URL for the data store connection. |
java.lang.String |
getConnectionUserName()
Get the user name for the data store connection. |
boolean |
getCopyOnAttach()
Accessor for the CopyOnAttach setting. |
javax.jdo.datastore.DataStoreCache |
getDataStoreCache()
Accessor for the DataStore (level 2) Cache |
boolean |
getDetachAllOnCommit()
Accessor for the DetachAllOnCommit setting. |
boolean |
getIgnoreCache()
Get the default IgnoreCache setting for all PersistenceManager instances obtained from this factory. |
java.util.List |
getLifecycleListenerSpecifications()
|
java.lang.String |
getMapping()
Get the name for any mapping, used in retrieving metadata files for ORM/Query data. |
boolean |
getMultithreaded()
Get the default Multithreaded setting for all PersistenceManager instances obtained from this factory. |
java.lang.String |
getName()
Accessor for the name of the persistence factory (if any). |
boolean |
getNontransactionalRead()
Get the default NontransactionalRead setting for all PersistenceManager instances obtained from this factory. |
boolean |
getNontransactionalWrite()
Get the default NontransactionalWrite setting for all PersistenceManager instances obtained from this factory. |
boolean |
getOptimistic()
Get the default Optimistic setting for all PersistenceManager instances obtained from this factory. |
java.lang.String |
getPersistenceUnitName()
Accessor for the name of the persistence unit |
java.lang.String |
getPersistenceXmlFilename()
Accessor for the filename of the persistence.xml file |
protected java.util.Set |
getPmCache()
Return the Set of PersistenceManagers actually in cache |
java.util.Properties |
getProperties()
Return non-configurable properties of this PersistenceManagerFactory. |
boolean |
getRestoreValues()
Get the default RestoreValues setting for all PersistenceManager instances obtained from this factory. |
boolean |
getRetainValues()
Get the default RetainValues setting for all PersistenceManager instances obtained from this factory. |
java.lang.String |
getSchema()
Accessor for the schema to use for this persistence factory. |
javax.jdo.datastore.Sequence |
getSequenceForFactoryClass(java.lang.String factoryClassName)
Accessor for the sequence for a factory class. |
java.lang.String |
getServerTimeZoneID()
Accessor for the timezone "id" of the datastore server (if any). |
java.lang.String |
getTransactionType()
Accessor for the transaction type to use with this persistence factory. |
void |
releasePersistenceManager(AbstractPersistenceManager om)
Remove a PersistenceManager from the cache Only the PersistenceManager is allowed to call this method |
void |
removeInstanceLifecycleListener(javax.jdo.listener.InstanceLifecycleListener listener)
Method to remove a lifecycle listener. |
void |
setCatalog(java.lang.String catalog)
Mutator for the catalog to use for this persistence factory. |
void |
setConnectionDriverName(java.lang.String driverName)
Set the driver name for the data store connection. |
void |
setConnectionFactory(java.lang.Object connectionFactory)
Set the data store connection factory. |
void |
setConnectionFactory2(java.lang.Object connectionFactory)
Set the second data store connection factory. |
void |
setConnectionFactory2Name(java.lang.String connectionFactoryName)
Set the name for the second data store connection factory. |
void |
setConnectionFactoryName(java.lang.String connectionFactoryName)
Set the name for the data store connection factory. |
void |
setConnectionPassword(java.lang.String password)
Set the password for the data store connection. |
void |
setConnectionURL(java.lang.String url)
Set the URL for the data store connection. |
void |
setConnectionUserName(java.lang.String userName)
Set the user name for the data store connection. |
void |
setCopyOnAttach(boolean flag)
Mutator for the CopyOnAttach setting. |
void |
setDetachAllOnCommit(boolean flag)
Mutator for the DetachAllOnCommit setting. |
void |
setIgnoreCache(boolean flag)
Set the default IgnoreCache setting for all PersistenceManager instances obtained from this factory. |
void |
setMapping(java.lang.String mapping)
Set the name for any mapping, used in searching for ORM/Query metadata files. |
void |
setMultithreaded(boolean flag)
Set the default Multithreaded setting for all PersistenceManager instances obtained from this factory. |
void |
setName(java.lang.String name)
Mutator for the name of the persistence factory. |
void |
setNontransactionalRead(boolean flag)
Set the default NontransactionalRead setting for all PersistenceManager instances obtained from this factory. |
void |
setNontransactionalWrite(boolean flag)
Set the default NontransactionalWrite setting for all PersistenceManager instances obtained from this factory. |
void |
setOptimistic(boolean flag)
Set the default Optimistic setting for all PersistenceManager instances obtained from this factory. |
void |
setPersistenceUnitName(java.lang.String name)
Mutator for the name of the persistence unit. |
void |
setPersistenceXmlFilename(java.lang.String name)
Mutator for the filename of the persistence.xml file. |
void |
setRestoreValues(boolean flag)
Set the default RestoreValues setting for all PersistenceManager instances obtained from this factory. |
void |
setRetainValues(boolean flag)
Set the default RetainValues setting for all PersistenceManager instances obtained from this factory. |
void |
setSchema(java.lang.String schema)
Mutator for the schema to use for this persistence factory. |
void |
setServerTimeZoneID(java.lang.String id)
Mutator for the timezone id of the datastore server. |
void |
setTransactionType(java.lang.String type)
Mutator for the transaction type to use for this persistence factory. |
java.util.Collection |
supportedOptions()
The application can determine from the results of this method which optional features, and which query languages are supported by the JDO implementation. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static final Localiser LOCALISER_JDO
protected java.util.List lifecycleListeners
| Constructor Detail |
|---|
public AbstractPersistenceManagerFactory()
| Method Detail |
|---|
protected void freezeConfiguration()
JPOXException - if the configuration was invalid or inconsistent in some waypublic java.util.Properties getProperties()
public java.util.Collection supportedOptions()
protected java.util.Set getPmCache()
public void releasePersistenceManager(AbstractPersistenceManager om)
om - the PersistenceManager to be removed from cacheprotected void assertIsOpen()
assertIsOpen in class ObjectManagerFactoryImpljavax.jdo.JDOUserException - if it is already closedpublic void close()
If the authorization check succeeds, check to see that all PersistenceManager instances obtained from this PersistenceManagerFactory have no active transactions. If any PersistenceManager instances have an active transaction, throw a JDOUserException, with one nested JDOUserException for each PersistenceManager with an active Transaction.
If there are no active transactions, then close all PersistenceManager instances obtained from this PersistenceManagerFactory, mark this PersistenceManagerFactory as closed, disallow getPersistenceManager methods, and allow all other get methods. If a set method or getPersistenceManager method is called after close, then JDOUserException is thrown.
close in class ObjectManagerFactoryImplPersistenceManagerFactory.close()public javax.jdo.datastore.DataStoreCache getDataStoreCache()
public void setConnectionUserName(java.lang.String userName)
userName - the user name for the data store connection.public void setConnectionPassword(java.lang.String password)
password - the password for the data store connection.public void setConnectionURL(java.lang.String url)
url - the URL for the data store connection.public void setConnectionDriverName(java.lang.String driverName)
driverName - the driver name for the data store connection.public void setConnectionFactoryName(java.lang.String connectionFactoryName)
connectionFactoryName - name of the data store connection factory.public void setConnectionFactory(java.lang.Object connectionFactory)
connectionFactory - the data store connection factory.public void setConnectionFactory2Name(java.lang.String connectionFactoryName)
connectionFactoryName - name of the data store connection factory.public void setConnectionFactory2(java.lang.Object connectionFactory)
connectionFactory - the data store connection factory.public void setMultithreaded(boolean flag)
flag - the default Multithreaded setting.public void setOptimistic(boolean flag)
flag - the default Optimistic setting.public void setRetainValues(boolean flag)
flag - the default RetainValues setting.public void setRestoreValues(boolean flag)
flag - the default RestoreValues setting.public void setNontransactionalRead(boolean flag)
flag - the default NontransactionalRead setting.public void setNontransactionalWrite(boolean flag)
flag - the default NontransactionalWrite setting.public void setIgnoreCache(boolean flag)
flag - the default IgnoreCache setting.public void setDetachAllOnCommit(boolean flag)
flag - the default DetachAllOnCommit setting.public void setCopyOnAttach(boolean flag)
flag - the default CopyOnAttach setting.public void setMapping(java.lang.String mapping)
mapping - the mapping namepublic void setCatalog(java.lang.String catalog)
catalog - Name of the catalogpublic void setSchema(java.lang.String schema)
schema - Name of the schemapublic void setTransactionType(java.lang.String type)
type - Transaction typepublic void setPersistenceUnitName(java.lang.String name)
name - Name of the persistence unitpublic void setPersistenceXmlFilename(java.lang.String name)
name - Filename of the persistence.xml filepublic void setName(java.lang.String name)
name - Name of the persistence factory (if any)public void setServerTimeZoneID(java.lang.String id)
id - Timezone Id to usepublic java.lang.String getConnectionUserName()
public java.lang.String getConnectionPassword()
public java.lang.String getConnectionURL()
public java.lang.String getConnectionDriverName()
public java.lang.String getConnectionFactoryName()
public java.lang.String getConnectionFactory2Name()
public java.lang.Object getConnectionFactory()
public java.lang.Object getConnectionFactory2()
public boolean getMultithreaded()
public boolean getOptimistic()
public boolean getRetainValues()
public boolean getRestoreValues()
public boolean getNontransactionalRead()
public boolean getNontransactionalWrite()
public boolean getIgnoreCache()
public boolean getDetachAllOnCommit()
public boolean getCopyOnAttach()
public java.lang.String getMapping()
public java.lang.String getCatalog()
public java.lang.String getSchema()
public java.lang.String getName()
public java.lang.String getPersistenceUnitName()
public java.lang.String getPersistenceXmlFilename()
public java.lang.String getServerTimeZoneID()
public java.lang.String getTransactionType()
protected void assertConfigurable()
assertConfigurable in class PersistenceConfigurationpublic java.util.List getLifecycleListenerSpecifications()
public void addInstanceLifecycleListener(javax.jdo.listener.InstanceLifecycleListener listener,
java.lang.Class[] classes)
listener - The listenerclasses - The classes that the listener relates topublic void removeInstanceLifecycleListener(javax.jdo.listener.InstanceLifecycleListener listener)
listener - The Listener
public void addSequenceForFactoryClass(java.lang.String factoryClassName,
javax.jdo.datastore.Sequence sequence)
factoryClassName - Name of the factory classsequence - The sequencepublic javax.jdo.datastore.Sequence getSequenceForFactoryClass(java.lang.String factoryClassName)
factoryClassName - The name of the factory class
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||