Class ParameterBufferHelper

java.lang.Object
org.firebirdsql.gds.ParameterBufferHelper

public class ParameterBufferHelper extends Object
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
  • Field Details

  • Constructor Details

    • ParameterBufferHelper

      public ParameterBufferHelper()
  • Method Details

    • getDpbKey

      public static Integer getDpbKey(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.
    • getDpbParameterType

      public static ParameterBufferHelper.DpbParameterType getDpbParameterType(String name)
      Gets the ParameterBufferHelper.DpbParameterType for the specified dpb item name (short or long)
      Parameters:
      name - Name of the dpb item
      Returns:
      DpbParameterType instance, or null if there is no item with this name
    • getDpbMap

      public static Map<String,Integer> 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 public static Object parseDpbString(String name, Object value)
      Deprecated.
      In general, parseDpbString(String, String) should be used; this method is not planned for removal
      Parse object to DPB value.
      Parameters:
      name - Name of DPB item
      value - Value to parse
      Returns:
      Object type appropriate for this DPB type
    • parseDpbString

      public static Object parseDpbString(String name, String value)
      Parse string to DPB value.
      Parameters:
      name - Name of DPB item
      value - Value to parse
      Returns:
      Object type appropriate for this DPB type
    • 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.
      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.