public class PersistenceGateway
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
dbtype
type of database.
|
static java.lang.String |
DBTYPE_DERBY |
static java.lang.String |
DBTYPE_MARIA10_2 |
Constructor and Description |
---|
PersistenceGateway() |
Modifier and Type | Method and Description |
---|---|
static void |
checkinStorage(PersistentStorage storage)
returns the specified storage to the pool.
|
static PersistentStorage |
getStorage()
gets a storage (wrapping the connection with all useful methods) for the current thread
|
static void |
refreshStorage(PersistentStorage storage,
boolean getconnectionback) |
static void |
releaseForThread()
releases the connection for the current thread.
|
static void |
setconnectionpool(java.lang.String dbtype,
ConnectionPool connectionpool)
sets the connection pool for the Persistence Gateway
|
public static final java.lang.String DBTYPE_DERBY
public static final java.lang.String DBTYPE_MARIA10_2
public static java.lang.String dbtype
public static void releaseForThread()
public static PersistentStorage getStorage()
public static void refreshStorage(PersistentStorage storage, boolean getconnectionback)
storage
- the storage to give back and refreshgetconnectionback
- if true, gives back a new connection. If false, stored the connectionpublic static void checkinStorage(PersistentStorage storage)
storage
- returns the storage for current threadpublic static void setconnectionpool(java.lang.String dbtype, ConnectionPool connectionpool)
dbtype
- type of database defined as one of the constants in this class.connectionpool
- connection pool to use.