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 Driver.connect(String, Properties)
method.
- Version:
- 1.0
- Author:
- Roman Rokytskyy
Method Summary |
static java.lang.Integer |
getDpbKey(java.lang.String name)
Get integer value of the DPB key corresponding to the specified name. |
static java.util.Map |
getDpbMap()
Get mapping between DPB names and their keys. |
static java.lang.Integer |
getTpbParam(java.lang.String name)
Get value of TPB parameter for the specified name. |
static java.lang.Object |
parseDpbString(java.lang.String name,
java.lang.Object value)
|
static void |
processTpbMapping(GDS gds,
FirebirdConnectionProperties connectionProperties,
java.util.Properties info)
This method extracts TPB mapping information from the connection
parameters. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TRANSACTION_SERIALIZABLE
public static final java.lang.String TRANSACTION_SERIALIZABLE
TRANSACTION_REPEATABLE_READ
public static final java.lang.String TRANSACTION_REPEATABLE_READ
TRANSACTION_READ_COMMITTED
public static final java.lang.String TRANSACTION_READ_COMMITTED
DPB_PREFIX
public static final java.lang.String DPB_PREFIX
TPB_PREFIX
public static final java.lang.String TPB_PREFIX
TPB_MAPPING_PROPERTY
public static final java.lang.String TPB_MAPPING_PROPERTY
ISC_DPB_TYPES_RESOURCE
public static final java.lang.String ISC_DPB_TYPES_RESOURCE
FBConnectionHelper
public FBConnectionHelper()
getDpbKey
public static java.lang.Integer getDpbKey(java.lang.String name)
- Get integer value of the DPB key corresponding to the specified name.
- Parameters:
name
- name of the key.- Returns:
- instance of
Integer
corresponding to the specified name
or null
if value is not known.
getDpbMap
public static java.util.Map getDpbMap()
- Get mapping between DPB names and their keys.
- Returns:
- instance of
Map
, where key is the name of DPB parameter,
value is its DPB key.
parseDpbString
public static java.lang.Object parseDpbString(java.lang.String name,
java.lang.Object value)
processTpbMapping
public static void processTpbMapping(GDS gds,
FirebirdConnectionProperties connectionProperties,
java.util.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"
.
- Parameters:
info
- connection parameters passed into a driver.- Returns:
- instance of
FBTpbMapper
containing specified TPB mapping
or null
if not TPB mapping was specified. - Throws:
FBResourceException
- if specified mapping is incorrect.
getTpbParam
public static java.lang.Integer getTpbParam(java.lang.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.
- Parameters:
name
- string representation of TPB parameter, can have "isc_tpb_"
prefix.- Returns:
- value corresponding to the specified parameter name or null if
nothing was found.
Copyright © 2001 David Jencks and other authors. All rights reserved.