Overview | Package | Class | Tree | Deprecated | Index | Help
| SolarMetric Kodo JDO 2.5.0 Reverse Schema Tool
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.solarmetric.rd.kodo.runtime
Class PersistenceManagerFactoryImpl

    java.lang.Object
      |
      +--com.solarmetric.rd.kodo.runtime.PersistenceManagerFactoryImpl

All Implemented Interfaces:
  javax.jdo.PersistenceManagerFactory, java.io.Serializable

Direct Known Subclasses:
  JDBCPersistenceManagerFactory

public abstract class PersistenceManagerFactoryImpl
extends java.lang.Object
implements javax.jdo.PersistenceManagerFactory

Abstract implementation of the `PersistenceManagerFactory` that must be subclassed for a specific runtime.

See Also:
  Serialized Form

Constructor Summary
`protected` | `PersistenceManagerFactoryImpl(com.solarmetric.rd.kodo.conf.JDOConfiguration config)` Constructor.

Method Summary
`void` | `close()` API extension.
`protected void` | `configurePersistenceManager(javax.jdo.PersistenceManager pm)` Configures the given PersistenceManager with the current factory option settings.
`protected com.solarmetric.rd.kodo.runtime.PersistenceManagerImpl` | `findPersistenceManager(java.lang.String user, java.lang.String pass, boolean managed)` Find a pooled PersistenceManager, or return null if none.
`protected com.solarmetric.rd.kodo.runtime.PersistenceManagerImpl` | `findTransactionalPersistenceManager(java.lang.String user, java.lang.String pass)` Find a managed runtime PersistenceManager associated with the current transaction, or returns null if none.
`com.solarmetric.rd.kodo.conf.JDOConfiguration` | `getConfiguration()` Return the configuration for this factory.
`java.lang.String` | `getConnectionDriverName()`
`java.lang.Object` | `getConnectionFactory()`
`java.lang.Object` | `getConnectionFactory2()`
`java.lang.String` | `getConnectionFactory2Name()`
`java.lang.String` | `getConnectionFactoryName()`
`java.lang.String` | `getConnectionPassword()`
`java.lang.String` | `getConnectionURL()`
`java.lang.String` | `getConnectionUserName()`
`boolean` | `getIgnoreCache()`
`int` | `getMaxPool()`
`int` | `getMinPool()`
`int` | `getMsWait()`
`boolean` | `getMultithreaded()`
`boolean` | `getNontransactionalRead()`
`boolean` | `getNontransactionalWrite()`
`boolean` | `getOptimistic()`
`javax.jdo.PersistenceManager` | `getPersistenceManager()`
`javax.jdo.PersistenceManager` | `getPersistenceManager(boolean managed)` API extension.
`javax.jdo.PersistenceManager` | `getPersistenceManager(java.lang.String user, java.lang.String pass)`
`javax.jdo.PersistenceManager` | `getPersistenceManager(java.lang.String user, java.lang.String pass, boolean managed)` API extension.
`protected static com.solarmetric.rd.kodo.runtime.PersistenceManagerFactoryImpl` | `getPersistenceManagerFactory(com.solarmetric.rd.kodo.conf.JDOConfiguration conf)` Return the pooled factory matching the given configuration, or null if none.
`abstract java.lang.String` | `getPlatform()` Return the platform this persistence manager is running on, such as 'Kodo JDO JDBC Edition: XXX Database".
`java.util.Properties` | `getProperties()`
`boolean` | `getRestoreValues()`
`boolean` | `getRetainValues()`
`protected void` | `lock()` Synchronizes on an internal lock.
`protected com.solarmetric.rd.kodo.runtime.PersistenceManagerImpl` | `newPersistenceManager(java.lang.String user, java.lang.String pass, com.solarmetric.rd.kodo.runtime.StoreManager sm, boolean managed)` Return a PersistenceManager configured with the proper settings.
`protected abstract com.solarmetric.rd.kodo.runtime.StoreManager` | `newStoreManager()` Return a new StoreManager for this runtime.
`protected void` | `pool()` Add the factory to the pool.
`protected java.lang.Object` | `readResolve()` Replaces the factory with this JVMs pooled version if it exists.
`protected void` | `removeUnsupportedOptions(java.util.Collection options)` Remove the options not supported by this runtime from the given collection.
`void` | `setConnectionDriverName(java.lang.String val)`
`void` | `setConnectionFactory(java.lang.Object val)`
`void` | `setConnectionFactory2(java.lang.Object val)`
`void` | `setConnectionFactory2Name(java.lang.String val)`
`void` | `setConnectionFactoryName(java.lang.String val)`
`void` | `setConnectionPassword(java.lang.String val)`
`void` | `setConnectionURL(java.lang.String val)`
`void` | `setConnectionUserName(java.lang.String val)`
`protected void` | `setFrozen(boolean frozen)` Freezes the configuration of this factory.
`void` | `setIgnoreCache(boolean val)`
`void` | `setMaxPool(int val)`
`void` | `setMinPool(int val)`
`void` | `setMsWait(int val)`
`void` | `setMultithreaded(boolean val)`
`void` | `setNontransactionalRead(boolean val)`
`void` | `setNontransactionalWrite(boolean val)`
`void` | `setOptimistic(boolean val)`
`void` | `setRestoreValues(boolean val)`
`void` | `setRetainValues(boolean val)`
`protected void` | `setup()` Setup transient state used by this factory based on the current configuration, which will subsequenty be locked down.
`java.util.Collection` | `supportedOptions()`
`protected void` | `unlock()` Releases the internal lock.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### PersistenceManagerFactoryImpl

    protected PersistenceManagerFactoryImpl(com.solarmetric.rd.kodo.conf.JDOConfiguration config)

  Constructor. Configuration must be provided on construction.

Method Detail

### getPersistenceManagerFactory

    protected static com.solarmetric.rd.kodo.runtime.PersistenceManagerFactoryImpl getPersistenceManagerFactory(com.solarmetric.rd.kodo.conf.JDOConfiguration conf)

  Return the pooled factory matching the given configuration, or null if none.

### getConfiguration

    public com.solarmetric.rd.kodo.conf.JDOConfiguration getConfiguration()

  Return the configuration for this factory.

### getPersistenceManager

    public javax.jdo.PersistenceManager getPersistenceManager()

  Specified by:
    `getPersistenceManager` in interface `javax.jdo.PersistenceManagerFactory`

### getPersistenceManager

    public javax.jdo.PersistenceManager getPersistenceManager(java.lang.String user,
                                                              java.lang.String pass)

  Specified by:
    `getPersistenceManager` in interface `javax.jdo.PersistenceManagerFactory`

### getPersistenceManager

    public javax.jdo.PersistenceManager getPersistenceManager(boolean managed)

  API extension. Return a persistence manager, dictating whether or not it will be involved in global managed transactions.

### getPersistenceManager

    public javax.jdo.PersistenceManager getPersistenceManager(java.lang.String user,
                                                              java.lang.String pass,
                                                              boolean managed)

  API extension. Return a persistence manager, dictating whether or not it will be involved in global managed transactions.

### close

    public void close()

  API extension. Free the resources used by this factory.

### getProperties

    public java.util.Properties getProperties()

  Specified by:
    `getProperties` in interface `javax.jdo.PersistenceManagerFactory`

### supportedOptions

    public java.util.Collection supportedOptions()

  Specified by:
    `supportedOptions` in interface `javax.jdo.PersistenceManagerFactory`

### getConnectionUserName

    public java.lang.String getConnectionUserName()

  Specified by:
    `getConnectionUserName` in interface `javax.jdo.PersistenceManagerFactory`

### setConnectionUserName

    public void setConnectionUserName(java.lang.String val)

  Specified by:
    `setConnectionUserName` in interface `javax.jdo.PersistenceManagerFactory`

### getConnectionPassword

    public java.lang.String getConnectionPassword()

### setConnectionPassword

    public void setConnectionPassword(java.lang.String val)

  Specified by:
    `setConnectionPassword` in interface `javax.jdo.PersistenceManagerFactory`

### getConnectionURL

    public java.lang.String getConnectionURL()

  Specified by:
    `getConnectionURL` in interface `javax.jdo.PersistenceManagerFactory`

### setConnectionURL

    public void setConnectionURL(java.lang.String val)

  Specified by:
    `setConnectionURL` in interface `javax.jdo.PersistenceManagerFactory`

### getConnectionDriverName

    public java.lang.String getConnectionDriverName()

  Specified by:
    `getConnectionDriverName` in interface `javax.jdo.PersistenceManagerFactory`

### setConnectionDriverName

    public void setConnectionDriverName(java.lang.String val)

  Specified by:
    `setConnectionDriverName` in interface `javax.jdo.PersistenceManagerFactory`

### getConnectionFactoryName

    public java.lang.String getConnectionFactoryName()

  Specified by:
    `getConnectionFactoryName` in interface `javax.jdo.PersistenceManagerFactory`

### setConnectionFactoryName

    public void setConnectionFactoryName(java.lang.String val)

  Specified by:
    `setConnectionFactoryName` in interface `javax.jdo.PersistenceManagerFactory`

### getConnectionFactory

    public java.lang.Object getConnectionFactory()

  Specified by:
    `getConnectionFactory` in interface `javax.jdo.PersistenceManagerFactory`

### setConnectionFactory

    public void setConnectionFactory(java.lang.Object val)

  Specified by:
    `setConnectionFactory` in interface `javax.jdo.PersistenceManagerFactory`

### getConnectionFactory2Name

    public java.lang.String getConnectionFactory2Name()

  Specified by:
    `getConnectionFactory2Name` in interface `javax.jdo.PersistenceManagerFactory`

### setConnectionFactory2Name

    public void setConnectionFactory2Name(java.lang.String val)

  Specified by:
    `setConnectionFactory2Name` in interface `javax.jdo.PersistenceManagerFactory`

### getConnectionFactory2

    public java.lang.Object getConnectionFactory2()

  Specified by:
    `getConnectionFactory2` in interface `javax.jdo.PersistenceManagerFactory`

### setConnectionFactory2

    public void setConnectionFactory2(java.lang.Object val)

  Specified by:
    `setConnectionFactory2` in interface `javax.jdo.PersistenceManagerFactory`

### getOptimistic

    public boolean getOptimistic()

  Specified by:
    `getOptimistic` in interface `javax.jdo.PersistenceManagerFactory`

### setOptimistic

    public void setOptimistic(boolean val)

  Specified by:
    `setOptimistic` in interface `javax.jdo.PersistenceManagerFactory`

### getRetainValues

    public boolean getRetainValues()

  Specified by:
    `getRetainValues` in interface `javax.jdo.PersistenceManagerFactory`

### setRetainValues

    public void setRetainValues(boolean val)

  Specified by:
    `setRetainValues` in interface `javax.jdo.PersistenceManagerFactory`

### getRestoreValues

    public boolean getRestoreValues()

  Specified by:
    `getRestoreValues` in interface `javax.jdo.PersistenceManagerFactory`

### setRestoreValues

    public void setRestoreValues(boolean val)

  Specified by:
    `setRestoreValues` in interface `javax.jdo.PersistenceManagerFactory`

### getNontransactionalRead

    public boolean getNontransactionalRead()

  Specified by:
    `getNontransactionalRead` in interface `javax.jdo.PersistenceManagerFactory`

### setNontransactionalRead

    public void setNontransactionalRead(boolean val)

  Specified by:
    `setNontransactionalRead` in interface `javax.jdo.PersistenceManagerFactory`

### getNontransactionalWrite

    public boolean getNontransactionalWrite()

  Specified by:
    `getNontransactionalWrite` in interface `javax.jdo.PersistenceManagerFactory`

### setNontransactionalWrite

    public void setNontransactionalWrite(boolean val)

  Specified by:
    `setNontransactionalWrite` in interface `javax.jdo.PersistenceManagerFactory`

### getIgnoreCache

    public boolean getIgnoreCache()

  Specified by:
    `getIgnoreCache` in interface `javax.jdo.PersistenceManagerFactory`

### setIgnoreCache

    public void setIgnoreCache(boolean val)

  Specified by:
    `setIgnoreCache` in interface `javax.jdo.PersistenceManagerFactory`

### getMultithreaded

    public boolean getMultithreaded()

  Specified by:
    `getMultithreaded` in interface `javax.jdo.PersistenceManagerFactory`

### setMultithreaded

    public void setMultithreaded(boolean val)

  Specified by:
    `setMultithreaded` in interface `javax.jdo.PersistenceManagerFactory`

### getMaxPool

    public int getMaxPool()

  Specified by:
    `getMaxPool` in interface `javax.jdo.PersistenceManagerFactory`

### setMaxPool

    public void setMaxPool(int val)

  Specified by:
    `setMaxPool` in interface `javax.jdo.PersistenceManagerFactory`

### getMinPool

    public int getMinPool()

  Specified by:
    `getMinPool` in interface `javax.jdo.PersistenceManagerFactory`

### setMinPool

    public void setMinPool(int val)

  Specified by:
    `setMinPool` in interface `javax.jdo.PersistenceManagerFactory`

### getMsWait

    public int getMsWait()

  Specified by:
    `getMsWait` in interface `javax.jdo.PersistenceManagerFactory`

### setMsWait

    public void setMsWait(int val)

  Specified by:
    `setMsWait` in interface `javax.jdo.PersistenceManagerFactory`

### readResolve

    protected java.lang.Object readResolve()
                                    throws java.io.ObjectStreamException

  Replaces the factory with this JVMs pooled version if it exists. Also freezes the factory.

    `java.io.ObjectStreamException`

### getPlatform

    public abstract java.lang.String getPlatform()

  Return the platform this persistence manager is running on, such as 'Kodo JDO JDBC Edition: XXX Database".

### newStoreManager

    protected abstract com.solarmetric.rd.kodo.runtime.StoreManager newStoreManager()

  Return a new StoreManager for this runtime. Note that the instance returned here may be wrapped before being passed to the `newPersistenceManager(java.lang.String, java.lang.String, com.solarmetric.rd.kodo.runtime.StoreManager, boolean)` method.

### findPersistenceManager

    protected com.solarmetric.rd.kodo.runtime.PersistenceManagerImpl findPersistenceManager(java.lang.String user,
                                                                                            java.lang.String pass,
                                                                                            boolean managed)

  Find a pooled PersistenceManager, or return null if none. If using managed transactions, looks for a transactional persistence manager; otherwise returns null by default. This method will be called before `newStoreManager()` so that factory subclasses implementing pooling can return a matching manager before a new `StoreManager` is created.

### newPersistenceManager

    protected com.solarmetric.rd.kodo.runtime.PersistenceManagerImpl newPersistenceManager(java.lang.String user,
                                                                                           java.lang.String pass,
                                                                                           com.solarmetric.rd.kodo.runtime.StoreManager sm,
                                                                                           boolean managed)

  Return a PersistenceManager configured with the proper settings. By default, this method constructs and configures a new PersistenceManagerImpl of the class set for this factory.

### setup

    protected void setup()

  Setup transient state used by this factory based on the current configuration, which will subsequenty be locked down. This method will be called before the first PersistenceManager is requested, and will be re-called each time the factory is deserialized into a JVM that has no configuration for this data store.

### removeUnsupportedOptions

    protected void removeUnsupportedOptions(java.util.Collection options)

  Remove the options not supported by this runtime from the given collection. The Collection will initially consist of the following options:
  - javax.jdo.option.TransientTransactional
  - javax.jdo.option.NontransactionalRead
  - javax.jdo.option.NontransactionalWrite
  - javax.jdo.option.RetainValues
  - javax.jdo.option.RestoreValues
  - javax.jdo.option.Optimistic
  - javax.jdo.option.ApplicationIdentity
  - javax.jdo.option.DatastoreIdentity
  - javax.jdo.option.ArrayList
  - javax.jdo.option.HashMap
  - javax.jdo.option.Hashtable
  - javax.jdo.option.LinkedList
  - javax.jdo.option.TreeMap
  - javax.jdo.option.TreeSet
  - javax.jdo.option.Vector
  - javax.jdo.option.Map
  - javax.jdo.option.List
  - javax.jdo.option.Array
  - javax.jdo.option.NullCollection
  - javax.jdo.query.JDOQL

### findTransactionalPersistenceManager

    protected com.solarmetric.rd.kodo.runtime.PersistenceManagerImpl findTransactionalPersistenceManager(java.lang.String user,
                                                                                                         java.lang.String pass)

  Find a managed runtime PersistenceManager associated with the current transaction, or returns null if none.

### configurePersistenceManager

    protected void configurePersistenceManager(javax.jdo.PersistenceManager pm)

  Configures the given PersistenceManager with the current factory option settings.

### lock

    protected void lock()

  Synchronizes on an internal lock. Make sure to call `unlock()` in a finally clause of the same method.

### unlock

    protected void unlock()

  Releases the internal lock.

### pool

    protected void pool()

  Add the factory to the pool.

### setFrozen

    protected void setFrozen(boolean frozen)

  Freezes the configuration of this factory.

Overview | Package | Class | Tree | Deprecated | Index | Help
| SolarMetric Kodo JDO 2.5.0 Reverse Schema Tool
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright 2001,2002,2003 SolarMetric, Inc. All Rights Reserved.