|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.firebirdsql.jdbc.FBConnectionHelper
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.
Field Summary | |
static java.lang.String |
DPB_PREFIX
|
static java.lang.String |
ISC_ENCODING_SIZE_RESOURCE
|
static java.lang.String |
ISC_ENCODINGS_RESOURCE
|
static java.lang.String |
TPB_PREFIX
|
static java.lang.String |
TRANSACTION_READ_COMMITTED
|
static java.lang.String |
TRANSACTION_REPEATABLE_READ
|
static java.lang.String |
TRANSACTION_SERIALIZABLE
|
Constructor Summary | |
FBConnectionHelper()
|
Method Summary | |
static int |
getCharacterSetSize(int characterSetId)
Get size of a character for the specified character set. |
static FBConnectionRequestInfo |
getCri(java.util.Properties info,
FBConnectionRequestInfo baseCri)
Get the instance of FBConnectionRequestInfo containing all
relevant parameters from the info properties.
|
static FBConnectionRequestInfo |
getCri(java.util.Properties info,
GDS gdsToUse)
Get the instance of FBConnectionRequestInfo containing all
relevant parameters from the info properties.
|
static FBConnectionRequestInfo |
getDefaultCri(GDS gds)
|
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.String |
getIscEncoding(java.lang.String javaEncoding)
Get InterBase encoding for given Java language encoding. |
static int |
getIscEncodingSize(java.lang.String iscEncoding)
Get size of a character for the specified InterBase encoding. |
static java.lang.String |
getJavaEncoding(java.lang.String iscEncoding)
Get Java language encoding for given InterBase encoding. |
static FBTpb |
getTpb(java.util.Properties info)
Get the transaction parameter buffer using the information supplied with connection. |
static FBTpbMapper |
getTpbMapper(java.util.Properties info)
This method extracts TPB mapping information from the connection parameters. |
static java.lang.Integer |
getTpbParam(java.lang.String name)
Get value of TPB parameter for the specified name. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.String TRANSACTION_SERIALIZABLE
public static final java.lang.String TRANSACTION_REPEATABLE_READ
public static final java.lang.String TRANSACTION_READ_COMMITTED
public static final java.lang.String DPB_PREFIX
public static final java.lang.String TPB_PREFIX
public static final java.lang.String ISC_ENCODINGS_RESOURCE
public static final java.lang.String ISC_ENCODING_SIZE_RESOURCE
Constructor Detail |
public FBConnectionHelper()
Method Detail |
public static FBConnectionRequestInfo getDefaultCri(GDS gds)
public static FBConnectionRequestInfo getCri(java.util.Properties info, FBConnectionRequestInfo baseCri)
FBConnectionRequestInfo
containing all
relevant parameters from the info
properties.
The FBConnectionRequestInfo instance returned will be 'bound' to the
same GDS implementation as baseCri.
info
- instance of Properties
containing connection
parameters.baseCri
- connection request info used as the base for a newly
created one. All types are copied from the baseCri
into
the result, but these properties can be overriden by the info
properties. Can be null
.
FBConnectionRequestInfo
containing all
relevant connection parameters.public static FBConnectionRequestInfo getCri(java.util.Properties info, GDS gdsToUse)
FBConnectionRequestInfo
containing all
relevant parameters from the info
properties.
The FBConnectionRequestInfo instance returned will be 'bound' to the
same GDS implementation supplied in the gdsToUse parameter.
info
- instance of Properties
containing connection
parameters.gdsToUse
- The GDS implementation to which the returned
FBConnectionRequestInfo
will be bound.
FBConnectionRequestInfo
containing all
relevant connection parameters.public static java.lang.Integer getDpbKey(java.lang.String name)
name
- name of the key.
Integer
corresponding to the specified name
or null
if value is not known.public static java.util.Map getDpbMap()
Map
, where key is the name of DPB parameter,
value is its DPB key.public static FBTpb getTpb(java.util.Properties info)
info
- instance of Properties
containing the connection
parameters.
info
public static FBTpbMapper getTpbMapper(java.util.Properties info) throws FBResourceException
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.
FBTpbMapper
containing specified TPB mapping
or null
if not TPB mapping was specified.
FBResourceException
- if specified mapping is incorrect.public static java.lang.Integer getTpbParam(java.lang.String name)
name
- string representation of TPB parameter, can have "isc_tpb_"
prefix.
public static java.lang.String getJavaEncoding(java.lang.String iscEncoding)
iscEncoding
- InterBase encoding
null
if none found.public static java.lang.String getIscEncoding(java.lang.String javaEncoding)
javaEncoding
- Java language encoding.
null
if none
found.public static int getIscEncodingSize(java.lang.String iscEncoding)
iscEncoding
- InterBase encoding.
public static int getCharacterSetSize(int characterSetId)
characterSetId
- of the character set.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |