## gate.persist
Class DBHelper

    java.lang.Object
      |
      +--gate.persist.DBHelper

public class DBHelper
extends Object

Field Summary
`static int` `BINARY_CONTENT`
`static int` `CHARACTER_CONTENT`
`static String` `CORPUS_CLASS`
`static String` `DB_PARAMETER_GUID`
`private static boolean` `DEBUG`
`static String` `DOCUMENT_CLASS`
`private static boolean` `driversLoaded`
`static String` `DUMMY_FEATURE_KEY`
`static Long` `DUMMY_ID`
`static int` `EMPTY_CONTENT`
`static int` `FALSE`
`protected static int` `FEATURE_OWNER_ANNOTATION` used to store annotation's features
`protected static int` `FEATURE_OWNER_CORPUS` used to store corpus' features
`protected static int` `FEATURE_OWNER_DOCUMENT` used to store document's features
`private static String` `jdbcOracleDriverName` ---
`private static String` `jdbcPostgresDriverName`
`private static String` `jdbcSapDBDriverName`
`static int` `TRUE`
`static int` `VALUE_TYPE_BINARY` feature value is binary
`static int` `VALUE_TYPE_BINARY_ARR` feature value is array of binary values
`static int` `VALUE_TYPE_BOOLEAN` feature value is boolean
`static int` `VALUE_TYPE_BOOLEAN_ARR` feature value is array of bools
`static int` `VALUE_TYPE_EMPTY_ARR` feature value is array of floats
`static int` `VALUE_TYPE_FLOAT` feature value is float
`static int` `VALUE_TYPE_FLOAT_ARR` feature value is array of floats
`static int` `VALUE_TYPE_INTEGER` feature value is int
`static int` `VALUE_TYPE_INTEGER_ARR` feature value is array of ints
`static int` `VALUE_TYPE_LONG` feature value is long
`static int` `VALUE_TYPE_LONG_ARR` feature value is array of longs
`static int` `VALUE_TYPE_NULL` feature value is int
`static int` `VALUE_TYPE_STRING` feature value is string less than 4000 bytes
`static int` `VALUE_TYPE_STRING_ARR` feature value is array of strings
`static int` `X_ORACLE_DUPLICATE_GROUP_NAME`
`static int` `X_ORACLE_DUPLICATE_USER_NAME`
`static int` `X_ORACLE_GROUP_OWNS_RESOURCES`
`static int` `X_ORACLE_INCOMPLETE_DATA`
`static int` `X_ORACLE_INSUFFICIENT_PRIVILEGES`
`static int` `X_ORACLE_INVALID_ACCESS_MODE`
`static int` `X_ORACLE_INVALID_ANNOTATION`
`static int` `X_ORACLE_INVALID_ANNOTATION_SET`
`static int` `X_ORACLE_INVALID_ANNOTATION_TYPE`
`static int` `X_ORACLE_INVALID_ARGUMENT`
`static int` `X_ORACLE_INVALID_CONTENT_TYPE`
`static int` `X_ORACLE_INVALID_FEATURE_TYPE`
`static int` `X_ORACLE_INVALID_LR`
`static int` `X_ORACLE_INVALID_LR_TYPE`
`static int` `X_ORACLE_INVALID_USER_GROUP`
`static int` `X_ORACLE_INVALID_USER_NAME`
`static int` `X_ORACLE_INVALID_USER_PASS`
`static int` `X_ORACLE_NOT_IMPLEMENTED`
`static int` `X_ORACLE_START`
`static int` `X_ORACLE_USER_OWNS_RESOURCES`

Constructor Summary
`protected` `DBHelper()`

Method Summary
`(package private) static void` `<clinit>()`
`static void` `cleanup(ResultSet rs)` ---
`static void` `cleanup(Statement stmt)` ---
`static Connection` `connect(String connectURL)` ---
`private static void` `loadDrivers()` ---
`static void` `readCLOB(Clob src, StringBuffer dest)` ---
`static void` `writeCLOB(StringBuffer src, Clob dest)` ---

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait`

Field Detail

### jdbcOracleDriverName

    private static final String jdbcOracleDriverName

  ---

### jdbcPostgresDriverName

    private static final String jdbcPostgresDriverName

### jdbcSapDBDriverName

    private static final String jdbcSapDBDriverName

### X_ORACLE_START

    public static final int X_ORACLE_START

### X_ORACLE_DUPLICATE_GROUP_NAME

    public static final int X_ORACLE_DUPLICATE_GROUP_NAME

### X_ORACLE_DUPLICATE_USER_NAME

    public static final int X_ORACLE_DUPLICATE_USER_NAME

### X_ORACLE_INVALID_USER_NAME

    public static final int X_ORACLE_INVALID_USER_NAME

### X_ORACLE_INVALID_USER_PASS

    public static final int X_ORACLE_INVALID_USER_PASS

### X_ORACLE_INVALID_USER_GROUP

    public static final int X_ORACLE_INVALID_USER_GROUP

### X_ORACLE_INVALID_LR

    public static final int X_ORACLE_INVALID_LR

### X_ORACLE_INVALID_ACCESS_MODE

    public static final int X_ORACLE_INVALID_ACCESS_MODE

### X_ORACLE_INVALID_ARGUMENT

    public static final int X_ORACLE_INVALID_ARGUMENT

### X_ORACLE_NOT_IMPLEMENTED

    public static final int X_ORACLE_NOT_IMPLEMENTED

### X_ORACLE_GROUP_OWNS_RESOURCES

    public static final int X_ORACLE_GROUP_OWNS_RESOURCES

### X_ORACLE_USER_OWNS_RESOURCES

    public static final int X_ORACLE_USER_OWNS_RESOURCES

### X_ORACLE_INCOMPLETE_DATA

    public static final int X_ORACLE_INCOMPLETE_DATA

### X_ORACLE_INVALID_LR_TYPE

    public static final int X_ORACLE_INVALID_LR_TYPE

### X_ORACLE_INVALID_ANNOTATION_TYPE

    public static final int X_ORACLE_INVALID_ANNOTATION_TYPE

### X_ORACLE_INVALID_FEATURE_TYPE

    public static final int X_ORACLE_INVALID_FEATURE_TYPE

### X_ORACLE_INVALID_CONTENT_TYPE

    public static final int X_ORACLE_INVALID_CONTENT_TYPE

### X_ORACLE_INVALID_ANNOTATION

    public static final int X_ORACLE_INVALID_ANNOTATION

### X_ORACLE_INSUFFICIENT_PRIVILEGES

    public static final int X_ORACLE_INSUFFICIENT_PRIVILEGES

### X_ORACLE_INVALID_ANNOTATION_SET

    public static final int X_ORACLE_INVALID_ANNOTATION_SET

### TRUE

    public static final int TRUE

### FALSE

    public static final int FALSE

### CHARACTER_CONTENT

    public static final int CHARACTER_CONTENT

### BINARY_CONTENT

    public static final int BINARY_CONTENT

### EMPTY_CONTENT

    public static final int EMPTY_CONTENT

### DOCUMENT_CLASS

    public static final String DOCUMENT_CLASS

### CORPUS_CLASS

    public static final String CORPUS_CLASS

### DB_PARAMETER_GUID

    public static final String DB_PARAMETER_GUID

### DUMMY_FEATURE_KEY

    public static final String DUMMY_FEATURE_KEY

### DUMMY_ID

    public static final Long DUMMY_ID

### FEATURE_OWNER_CORPUS

    protected static final int FEATURE_OWNER_CORPUS

  used to store corpus' features

### FEATURE_OWNER_DOCUMENT

    protected static final int FEATURE_OWNER_DOCUMENT

  used to store document's features

### FEATURE_OWNER_ANNOTATION

    protected static final int FEATURE_OWNER_ANNOTATION

  used to store annotation's features

### VALUE_TYPE_NULL

    public static final int VALUE_TYPE_NULL

  feature value is int

### VALUE_TYPE_INTEGER

    public static final int VALUE_TYPE_INTEGER

  feature value is int

### VALUE_TYPE_LONG

    public static final int VALUE_TYPE_LONG

  feature value is long

### VALUE_TYPE_BOOLEAN

    public static final int VALUE_TYPE_BOOLEAN

  feature value is boolean

### VALUE_TYPE_STRING

    public static final int VALUE_TYPE_STRING

  feature value is string less than 4000 bytes

### VALUE_TYPE_BINARY

    public static final int VALUE_TYPE_BINARY

  feature value is binary

### VALUE_TYPE_FLOAT

    public static final int VALUE_TYPE_FLOAT

  feature value is float

### VALUE_TYPE_INTEGER_ARR

    public static final int VALUE_TYPE_INTEGER_ARR

  feature value is array of ints

### VALUE_TYPE_LONG_ARR

    public static final int VALUE_TYPE_LONG_ARR

  feature value is array of longs

### VALUE_TYPE_BOOLEAN_ARR

    public static final int VALUE_TYPE_BOOLEAN_ARR

  feature value is array of bools

### VALUE_TYPE_STRING_ARR

    public static final int VALUE_TYPE_STRING_ARR

  feature value is array of strings

### VALUE_TYPE_BINARY_ARR

    public static final int VALUE_TYPE_BINARY_ARR

  feature value is array of binary values

### VALUE_TYPE_FLOAT_ARR

    public static final int VALUE_TYPE_FLOAT_ARR

  feature value is array of floats

### VALUE_TYPE_EMPTY_ARR

    public static final int VALUE_TYPE_EMPTY_ARR

  feature value is array of floats

### DEBUG

    private static final boolean DEBUG

### driversLoaded

    private static boolean driversLoaded

Constructor Detail

### DBHelper

    protected DBHelper()

Method Detail

### <clinit>

    static void <clinit>()

### loadDrivers

    private static void loadDrivers()
                             throws ClassNotFoundException

  ---

### cleanup

    public static void cleanup(ResultSet rs)
                        throws PersistenceException

  ---

### cleanup

    public static void cleanup(Statement stmt)
                        throws PersistenceException

  ---

### connect

    public static Connection connect(String connectURL)
                              throws SQLException,
                                     ClassNotFoundException

  ---

### readCLOB

    public static void readCLOB(Clob src,
                                StringBuffer dest)
                         throws SQLException

  ---

### writeCLOB

    public static void writeCLOB(StringBuffer src,
                                 Clob dest)
                          throws SQLException

  ---