Package org.firebirdsql.gds
Class ParameterBufferHelper
java.lang.Object
org.firebirdsql.gds.ParameterBufferHelper
This class maps the extended JDBC properties to parameter buffer types (for transaction and database
parameter buffers). 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, Mark Rotteveel
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classDpb type, which is the name, the key for the dpb and its value type.static enumEnum with the various Dpb value types, and conversion from String to that type. -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic IntegerGet integer value of the DPB key corresponding to the specified name.Get mapping between DPB names and their keys.getDpbParameterType(String name) Gets theParameterBufferHelper.DpbParameterTypefor the specified dpb item name (short or long)static IntegergetTpbParam(String name) Get value of TPB parameter for the specified name.static ObjectparseDpbString(String name, Object value) Deprecated.static ObjectparseDpbString(String name, String value) Parse string to DPB value.
-
Field Details
-
DPB_PREFIX
- See Also:
-
TPB_PREFIX
- See Also:
-
ISC_DPB_TYPES_RESOURCE
- See Also:
-
-
Constructor Details
-
ParameterBufferHelper
public ParameterBufferHelper()
-
-
Method Details
-
getDpbKey
Get integer value of the DPB key corresponding to the specified name.- Parameters:
name- name of the key.- Returns:
- instance of
Integercorresponding to the specified name ornullif value is not known.
-
getDpbParameterType
Gets theParameterBufferHelper.DpbParameterTypefor the specified dpb item name (short or long)- Parameters:
name- Name of the dpb item- Returns:
DpbParameterTypeinstance, ornullif there is no item with this name
-
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
Deprecated.In general,parseDpbString(String, String)should be used; this method is not planned for removalParse object to DPB value.- Parameters:
name- Name of DPB itemvalue- Value to parse- Returns:
- Object type appropriate for this DPB type
-
parseDpbString
Parse string to DPB value.- Parameters:
name- Name of DPB itemvalue- Value to parse- Returns:
- Object type appropriate for this DPB type
-
getTpbParam
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
nullif nothing was found.
-
parseDpbString(String, String)should be used; this method is not planned for removal