com.sap.ip.me.api.persist.core
Class PersistenceImplementation
java.lang.Object
com.sap.ip.me.api.persist.core.PersistenceImplementation
- public abstract class PersistenceImplementation
- extends java.lang.Object
- Author:
- SAP
PersistenceImplementation determines the implementation for the SAP MI
persistence API and instanciates the relevant classes.
Each persistence implementation needs to extend the following abstract
classes:
- com.sap.ip.me.api.persist.core.PersistenceRuntime
- com.sap.ip.me.api.persist.query.QueryRuntime
- com.sap.ip.me.api.persist.meta.DescriptorRuntime
During runtime, PersistenceImplementation determines the corresponding
concrete classes for the above abstract classes. This is controlled by
the following Configuration key:
- MobileEngine.Persist.Implementation
Currently, following values are valid for this key:
- MIDB
- DB2E
- MAXDB
Depending on the above value, a different set of extending classes is
selected.
- MIDB defines the default SAP MI persistence implementation.
- DB2E defines the implementation for IBM DB2E (in order to use this
persistence implementation, the DB2E addon database must be deployed
to the MI installation).
- MAXDB defines SAP MaxDB implementation.
- Any other value or no value will result in no concrete classes being
determined.
Constructor Summary |
protected |
PersistenceImplementation(java.lang.String name,
java.lang.String apiPersRtArg,
java.lang.String apiDescrRtArg,
java.lang.String apiQueryRtArg,
java.lang.String spiPersRtArg,
java.lang.String spiDescrRtArg,
java.lang.String spiQueryRtArg)
|
Method Summary |
static void |
_init()
Only for JUnitTest purposes. |
abstract java.lang.Object |
getDBManagerInstance()
|
static PersistenceImplementation |
getImplementation()
Determines the corresponding the SAP MI persistence API implementation
based on the following Configuration key:
- MobileEngine.Persist.Implementation
Currently, following values are valid for this key:
- MIDB
- DB2E
Each of the two values controls the extension of the following API classes:
- com.sap.ip.me.api.persist.core.PersistenceRuntime
- com.sap.ip.me.api.persist.query.QueryRuntime
- com.sap.ip.me.api.persist.meta.DescriptorRuntime
The concrete implementation is determined at the first call of this
method. |
abstract JQueryFactory |
getJQueryFactoryInstance()
|
java.lang.Object |
getSingletonInstance(java.lang.Class apiType)
Gets a singleton instance for one of the following abstract persistence
API classes:
- com.sap.ip.me.api.persist.core.PersistenceRuntime
- com.sap.ip.me.api.persist.query.QueryRuntime
- com.sap.ip.me.api.persist.meta.DescriptorRuntime
The type of the actual instance depends on the configured persistence
implementation. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
NONE
public static final PersistenceImplementation NONE
PersistenceImplementation
protected PersistenceImplementation(java.lang.String name,
java.lang.String apiPersRtArg,
java.lang.String apiDescrRtArg,
java.lang.String apiQueryRtArg,
java.lang.String spiPersRtArg,
java.lang.String spiDescrRtArg,
java.lang.String spiQueryRtArg)
getSingletonInstance
public java.lang.Object getSingletonInstance(java.lang.Class apiType)
- Gets a singleton instance for one of the following abstract persistence
API classes:
- com.sap.ip.me.api.persist.core.PersistenceRuntime
- com.sap.ip.me.api.persist.query.QueryRuntime
- com.sap.ip.me.api.persist.meta.DescriptorRuntime
The type of the actual instance depends on the configured persistence
implementation.
- Parameters:
apiType
- Defines the abstract class that the concrete class
must implement. The following abstract classes are valid:
- com.sap.ip.me.api.persist.core.PersistenceRuntime
- com.sap.ip.me.api.persist.query.QueryRuntime
- com.sap.ip.me.api.persist.meta.DescriptorRuntime
Implementation note: the "open" implementation approach was chosen
to avoid dependencies from this package into the other packages
(query and meta)
- Returns:
- The concrete implementing class
getJQueryFactoryInstance
public abstract JQueryFactory getJQueryFactoryInstance()
throws java.lang.Exception
- Throws:
java.lang.Exception
getDBManagerInstance
public abstract java.lang.Object getDBManagerInstance()
throws java.lang.Exception
- Throws:
java.lang.Exception
toString
public java.lang.String toString()
getImplementation
public static PersistenceImplementation getImplementation()
- Determines the corresponding the SAP MI persistence API implementation
based on the following Configuration key:
- MobileEngine.Persist.Implementation
Currently, following values are valid for this key:
- MIDB
- DB2E
Each of the two values controls the extension of the following API classes:
- com.sap.ip.me.api.persist.core.PersistenceRuntime
- com.sap.ip.me.api.persist.query.QueryRuntime
- com.sap.ip.me.api.persist.meta.DescriptorRuntime
The concrete implementation is determined at the first call of this
method. After this call, during the same runtime session, no re-determination
is possible.
- Returns:
_init
public static void _init()
- Only for JUnitTest purposes. Do not use for productive coding !
Copyright © 2005 SAP AG. All Rights Reserved.