Overview | Package | Class | Tree | Deprecated | Index | Help
| Kodo 4.0.0 generated on May 15 2006
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## kodo.persistence
Interface KodoEntityManagerFactory

All Superinterfaces:
  com.solarmetric.util.Closeable, kodo.kernel.ConnectionRetainModes, EntityManagerFactory, Serializable

    public interface KodoEntityManagerFactory

extends EntityManagerFactory, kodo.kernel.ConnectionRetainModes, com.solarmetric.util.Closeable, Serializable

Interface implemented by Kodo entity manager factories.

Since:
  4.0

Field Summary

Fields inherited from interface kodo.kernel.ConnectionRetainModes
`CONN_RETAIN_ALWAYS, CONN_RETAIN_DEMAND, CONN_RETAIN_TRANS`

Method Summary
`void` | `addLifecycleListener(Object listener, Class... classes)` Register a listener for lifecycle-related events on the specified classes.
`void` | `addTransferListener(kodo.remote.RemoteTransferListener listener)` This method only available on client factories.
`KodoEntityManager` | `createEntityManager()`
`KodoEntityManager` | `createEntityManager(Map props)` Return an entity manager with the provided additional configuration settings.
`kodo.conf.KodoConfiguration` | `getConfiguration()` Return the configuration for this factory.
`Properties` | `getProperties()` Return properties describing this runtime.
`QueryResultCache` | `getQueryResultCache()` Access query result cache.
`StoreCache` | `getStoreCache()` Access the level 2 store cache.
`StoreCache` | `getStoreCache(String name)` Access a named level 2 store cache.
`Object` | `getUserObject(Object key)` Get the value for the specified key from the map of user objects.
`boolean` | `isPersistenceServerRunning()` Return true if a persistence server is running.
`boolean` | `joinPersistenceServer()` Join the thread running the persistence server for this factory.
`Object` | `putUserObject(Object key, Object val)` Put the specified key-value pair into the map of user objects.
`void` | `removeLifecycleListener(Object listener)` Remove a listener for lifecycle-related events.
`void` | `removeTransferListener(kodo.remote.RemoteTransferListener listener)` This method only available on client factories.
`boolean` | `startPersistenceServer()` Start the persistence server.
`boolean` | `stopPersistenceServer()` Stop the persistence server.

Methods inherited from interface javax.persistence.EntityManagerFactory
`close, isOpen`

Methods inherited from interface com.solarmetric.util.Closeable
`close`

Method Detail

### getConfiguration

    kodo.conf.KodoConfiguration getConfiguration()

  Return the configuration for this factory.

### getProperties

    Properties getProperties()

  Return properties describing this runtime.

### putUserObject

    Object putUserObject(Object key,
                         Object val)

  Put the specified key-value pair into the map of user objects.

### getUserObject

    Object getUserObject(Object key)

  Get the value for the specified key from the map of user objects.

### getStoreCache

    StoreCache getStoreCache()

  Access the level 2 store cache. This cache acts as a proxy to all named caches.

### getStoreCache

    StoreCache getStoreCache(String name)

  Access a named level 2 store cache.

### getQueryResultCache

    QueryResultCache getQueryResultCache()

  Access query result cache.

### createEntityManager

    KodoEntityManager createEntityManager()

  Specified by:
    `createEntityManager` in interface `EntityManagerFactory`

### createEntityManager

    KodoEntityManager createEntityManager(Map props)

  Return an entity manager with the provided additional configuration settings. Kodo recognizes the following configuration settings in this method:

  - kodo.ConnectionUsername
  - kodo.ConnectionPassword
  - kodo.ConnectionRetainMode
  - kodo.TransactionMode

  Specified by:
    `createEntityManager` in interface `EntityManagerFactory`

### startPersistenceServer

    boolean startPersistenceServer()

  Start the persistence server. This typically happens automatically when a factory with a configured server is obtained.

  Returns:
    false if there is no server configured, true otherwise

### joinPersistenceServer

    boolean joinPersistenceServer()

  Join the thread running the persistence server for this factory.

  Returns:
    false if no server is running, true otherwise

### stopPersistenceServer

    boolean stopPersistenceServer()

  Stop the persistence server.

  Returns:
    false if the server was not running, true otherwise

### isPersistenceServerRunning

    boolean isPersistenceServerRunning()

  Return true if a persistence server is running.

### addLifecycleListener

    void addLifecycleListener(Object listener,
                              Class... classes)

  Register a listener for lifecycle-related events on the specified classes. If the classes are null, all events will be propagated to the listener. The listener will be passed on to all new entity managers. See the `kodo.event` package for listener types.

  Since:
    3.3

### removeLifecycleListener

    void removeLifecycleListener(Object listener)

  Remove a listener for lifecycle-related events.

  Since:
    3.3

### addTransferListener

    void addTransferListener(kodo.remote.RemoteTransferListener listener)

  This method only available on client factories. Register a listener that will be called as the EM uploads objects to the server during flush operations and when objects are downloaded from the server as part of queries or loads.

### removeTransferListener

    void removeTransferListener(kodo.remote.RemoteTransferListener listener)

  This method only available on client factories. Deregisters a previously registered listener.

Overview | Package | Class | Tree | Deprecated | Index | Help
| Kodo 4.0.0 generated on May 15 2006
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright 2001-2006 BEA Systems, Inc. All Rights Reserved.