|
GATE Version 3.1-2270 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectgate.persist.DBHelper
public class DBHelper
Field Summary | |
---|---|
static int |
BINARY_CONTENT
binary content (may make difference for the database) |
static int |
CHARACTER_CONTENT
character content (may make difference for the database) |
static int |
CHINK_SIZE_LARGE
|
static int |
CHINK_SIZE_MEDIUM
|
static int |
CHINK_SIZE_SMALL
|
static String |
CORPUS_CLASS
LR classes supported at present |
static String |
DB_PARAMETER_GUID
key in T_PARAMETER that defines a unique id for the data store |
static String |
DOCUMENT_CLASS
LR classes supported at present |
static String |
DUMMY_ENCODING
dummy encoding type, do not use it |
static String |
DUMMY_FEATURE_KEY
dummy feature key, do not use it |
static Long |
DUMMY_ID
huh? |
static int |
EMPTY_CONTENT
document has no 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 |
static int |
ORACLE_DB
Oracle database type |
static int |
POSTGRES_DB
PostgreSQL database type |
static int |
READ_ACCESS
used internaly, may change in the future |
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 null |
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 |
WRITE_ACCESS
used internaly, may change in the future |
static int |
X_ORACLE_DUPLICATE_GROUP_NAME
this should be thrown if an attempt to create a group with duplicated name is made |
static int |
X_ORACLE_DUPLICATE_USER_NAME
see above |
static int |
X_ORACLE_GROUP_OWNS_RESOURCES
attempt to delete a group that owns resources is made |
static int |
X_ORACLE_INCOMPLETE_DATA
huh? |
static int |
X_ORACLE_INSUFFICIENT_PRIVILEGES
attempt to perform an operation that requres more privileged is made |
static int |
X_ORACLE_INVALID_ACCESS_MODE
attempt to access resource in mode that does not exist |
static int |
X_ORACLE_INVALID_ANNOTATION
attempt to remove annotation that does not exist is made |
static int |
X_ORACLE_INVALID_ANNOTATION_SET
attempt to remove annotation set that does not exist is made |
static int |
X_ORACLE_INVALID_ANNOTATION_TYPE
this is obsolete now? |
static int |
X_ORACLE_INVALID_ARGUMENT
huh? |
static int |
X_ORACLE_INVALID_CONTENT_TYPE
not supported content type - we support only character/binary/empty content since there are no many other options this error shoudkl indicate that the java code was not synced with the pl/sql one |
static int |
X_ORACLE_INVALID_FEATURE_TYPE
attempt to create a feature with invalid value type is made since value types are automatically assigned in the java code, this errror should indicate that the java code was changed but no changes were made to the relevant pl/sql code |
static int |
X_ORACLE_INVALID_LR
access to LR by id fails - no such resource |
static int |
X_ORACLE_INVALID_LR_TYPE
attempt to access resources by type is made, but no such type exists |
static int |
X_ORACLE_INVALID_USER_GROUP
invalid group id supplied for operation requiring such specifier |
static int |
X_ORACLE_INVALID_USER_NAME
no such user failure upon login |
static int |
X_ORACLE_INVALID_USER_PASS
- |
static int |
X_ORACLE_NOT_IMPLEMENTED
this should not be in use anymore |
static int |
X_ORACLE_START
user defined error codes in Oracle start with -21000 |
static int |
X_ORACLE_USER_OWNS_RESOURCES
attempt to delete a user that owns resources is made |
Constructor Summary | |
---|---|
protected |
DBHelper()
|
Method Summary | |
---|---|
static void |
cleanup(ResultSet rs)
closes a result set note that Oracle jdbc classes do not have finalize() implementations so if they're not closed leaks may occur |
static void |
cleanup(Statement stmt)
closes a statement note that Oracle jdbc classes do not have finalize() implementations so if they're not closed leaks may occur |
static Connection |
connect(String connectURL)
connects to DB |
static Connection |
connect(String connectURL,
boolean usePool)
connects to DB gets connection from pool if such exists |
static Connection |
connect(String connectURL,
String user,
String pass)
connects to DB |
static void |
disconnect(Connection conn)
disconnects from DB, may return connection to pool if such exists any uncommited transactions are rolled back |
static void |
disconnect(Connection conn,
boolean usePool)
disconnects from DB, may return connection to pool if such exists any uncommited transactions are rolled back |
static int |
getDatabaseType(String jdbcURL)
|
static String |
getSchemaPrefix(String jdbcURL)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int CHINK_SIZE_SMALL
public static final int CHINK_SIZE_MEDIUM
public static final int CHINK_SIZE_LARGE
public static final int X_ORACLE_START
public static final int X_ORACLE_DUPLICATE_GROUP_NAME
public static final int X_ORACLE_DUPLICATE_USER_NAME
public static final int X_ORACLE_INVALID_USER_NAME
public static final int X_ORACLE_INVALID_USER_PASS
public static final int X_ORACLE_INVALID_USER_GROUP
public static final int X_ORACLE_INVALID_LR
public static final int X_ORACLE_INVALID_ACCESS_MODE
public static final int X_ORACLE_INVALID_ARGUMENT
public static final int X_ORACLE_NOT_IMPLEMENTED
public static final int X_ORACLE_GROUP_OWNS_RESOURCES
public static final int X_ORACLE_USER_OWNS_RESOURCES
public static final int X_ORACLE_INCOMPLETE_DATA
public static final int X_ORACLE_INVALID_LR_TYPE
public static final int X_ORACLE_INVALID_ANNOTATION_TYPE
public static final int X_ORACLE_INVALID_FEATURE_TYPE
public static final int X_ORACLE_INVALID_CONTENT_TYPE
public static final int X_ORACLE_INVALID_ANNOTATION
public static final int X_ORACLE_INSUFFICIENT_PRIVILEGES
public static final int X_ORACLE_INVALID_ANNOTATION_SET
public static final int TRUE
public static final int FALSE
public static final int CHARACTER_CONTENT
public static final int BINARY_CONTENT
public static final int EMPTY_CONTENT
public static final String DOCUMENT_CLASS
public static final String CORPUS_CLASS
public static final String DB_PARAMETER_GUID
public static final String DUMMY_FEATURE_KEY
public static final String DUMMY_ENCODING
public static final int READ_ACCESS
public static final int WRITE_ACCESS
public static final Long DUMMY_ID
protected static final int FEATURE_OWNER_CORPUS
protected static final int FEATURE_OWNER_DOCUMENT
protected static final int FEATURE_OWNER_ANNOTATION
public static final int VALUE_TYPE_NULL
public static final int VALUE_TYPE_INTEGER
public static final int VALUE_TYPE_LONG
public static final int VALUE_TYPE_BOOLEAN
public static final int VALUE_TYPE_STRING
public static final int VALUE_TYPE_BINARY
public static final int VALUE_TYPE_FLOAT
public static final int VALUE_TYPE_INTEGER_ARR
public static final int VALUE_TYPE_LONG_ARR
public static final int VALUE_TYPE_BOOLEAN_ARR
public static final int VALUE_TYPE_STRING_ARR
public static final int VALUE_TYPE_BINARY_ARR
public static final int VALUE_TYPE_FLOAT_ARR
public static final int VALUE_TYPE_EMPTY_ARR
public static final int ORACLE_DB
public static final int POSTGRES_DB
Constructor Detail |
---|
protected DBHelper()
Method Detail |
---|
public static void cleanup(ResultSet rs) throws PersistenceException
PersistenceException
public static void cleanup(Statement stmt) throws PersistenceException
PersistenceException
public static Connection connect(String connectURL) throws SQLException, ClassNotFoundException
SQLException
ClassNotFoundException
public static Connection connect(String connectURL, String user, String pass) throws SQLException, ClassNotFoundException
SQLException
ClassNotFoundException
public static void disconnect(Connection conn) throws PersistenceException
PersistenceException
public static Connection connect(String connectURL, boolean usePool) throws SQLException, ClassNotFoundException
SQLException
ClassNotFoundException
public static void disconnect(Connection conn, boolean usePool) throws PersistenceException
PersistenceException
public static String getSchemaPrefix(String jdbcURL)
public static int getDatabaseType(String jdbcURL)
|
GATE Version 3.1-2270 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |