org.firebirdsql.jdbc
Class FBConnectionHelper
java.lang.Object
org.firebirdsql.jdbc.FBConnectionHelper
public class FBConnectionHelper
extends java.lang.Object
This class maps the extended JDBC properties to the
FBConnectionRequestInfo
instance. It uses
java.lang.reflection.
to determine correct type of the parameter
passed to the
java.sql.Driver.connect(String, Properties)
method.
static Integer | getDpbKey(String name) - Get integer value of the DPB key corresponding to the specified name.
|
static Map | getDpbMap() - Get mapping between DPB names and their keys.
|
static Integer | getTpbParam(String name) - Get value of TPB parameter for the specified name.
|
static Object | parseDpbString(String name, Object value)
|
static void | processTpbMapping(GDS gds, FirebirdConnectionProperties connectionProperties, Properties info) - This method extracts TPB mapping information from the connection
parameters.
|
DPB_PREFIX
public static final String DPB_PREFIX
ISC_DPB_TYPES_RESOURCE
public static final String ISC_DPB_TYPES_RESOURCE
TPB_MAPPING_PROPERTY
public static final String TPB_MAPPING_PROPERTY
TPB_PREFIX
public static final String TPB_PREFIX
TRANSACTION_READ_COMMITTED
public static final String TRANSACTION_READ_COMMITTED
TRANSACTION_REPEATABLE_READ
public static final String TRANSACTION_REPEATABLE_READ
TRANSACTION_SERIALIZABLE
public static final String TRANSACTION_SERIALIZABLE
getDpbKey
public static Integer getDpbKey(String name)
Get integer value of the DPB key corresponding to the specified name.
- instance of
Integer
corresponding to the specified name
or null
if value is not known.
getDpbMap
public static Map getDpbMap()
Get mapping between DPB names and their keys.
- instance of
Map
, where key is the name of DPB parameter,
value is its DPB key.
getTpbParam
public static Integer getTpbParam(String name)
Get value of TPB parameter for the specified name. This method tries to
match string representation of the TPB parameter with its value.
name
- string representation of TPB parameter, can have "isc_tpb_"
prefix.
- value corresponding to the specified parameter name or null if
nothing was found.
parseDpbString
public static Object parseDpbString(String name,
Object value)
processTpbMapping
public static void processTpbMapping(GDS gds,
FirebirdConnectionProperties connectionProperties,
Properties info)
throws FBResourceException
This method extracts TPB mapping information from the connection
parameters. Two formats are supported:
info
contains "tpb_mapping"
parameter
pointing to a resource bundle with mapping information;
info
contains separate mappings for each of following
transaction isolation levels: "TRANSACTION_SERIALIZABLE"
,
"TRANSACTION_REPEATABLE_READ"
and
"TRANSACTION_READ_COMMITTED"
.
info
- connection parameters passed into a driver.
Copyright B) 2001 David Jencks and other authors. All rights reserved.