public class PoolDBUtils extends Object
Modifier and Type | Field and Description |
---|---|
static String |
search_schema_name |
Constructor and Description |
---|
PoolDBUtils() |
Modifier and Type | Method and Description |
---|---|
static void |
CheckSpecialSQLChars(String s) |
static void |
ClearCache(String dbName,
String login) |
static void |
ClearCache(String dbName,
String login,
String xsiType) |
void |
closeConnection() |
static void |
CreateCache(String dbName,
String login) |
static void |
CreateCustomSearchLog(String dbName,
String login) |
static void |
CreateTempSchema(String dbName,
String login) |
static void |
ExecuteBatch(ArrayList<String> queries,
String db,
String userName) |
void |
executeNonSelectQuery(String query,
String db,
String userName)
Executes the given query with a pooled connection and closes the connection.
|
static void |
ExecuteNonSelectQuery(String query,
String db,
String userName) |
ResultSet |
executeQuery(String db,
String query,
String userName) |
XFTTable |
executeSelectQuery(String query,
String db,
String userName)
Executes the selected query and transfers the data from a ResultSet to
a XFTTable.
|
static String |
getDefaultDBName() |
Object |
getNextID(String db,
String table,
String pk,
String sequence) |
static Object |
GetNextID(String db,
String table,
String pk,
String sequence) |
PreparedStatement |
getPreparedStatement(String db,
String sql) |
static int |
GetResultSetSize(ResultSet rs)
Returns the number of Rows in a given ResultSet
|
static long |
getTimeDiff(Date start,
Date end) |
static boolean |
HackCheck(Iterable<String> values) |
static boolean |
HackCheck(String value) |
void |
insertItem(String query,
String db,
String userName,
DBItemCache cache)
Executes the given query with a pooled connection and closes the connection.
|
Object |
insertNativeItem(String query,
String db,
String table,
String pk,
String sequence)
Processes the specified query on the specified db with a pooled connection.
|
static Object |
LogCustomSearch(String login,
String search_xml,
String dbname) |
static void |
PerformUpdateTrigger(XFTItem item,
String login) |
static String |
RetrieveItemString(String rootElement,
String ids,
String functionQuery,
String functionName,
String login) |
static String |
RetrieveLoggedCustomSearch(String login,
String dbname,
Object search_id) |
Object |
returnStatisticQuery(String query,
String column,
String db,
String userName) |
static Object |
ReturnStatisticQuery(String query,
String column,
String db,
String userName) |
void |
sendBatch(ArrayList<String> statements,
String db,
String userName,
int resultSetType,
int resultSetConcurrency) |
void |
sendBatch(DBItemCache cache,
String db,
String userName) |
static boolean |
StringContains(String value,
String s) |
void |
updateItem(String query,
String db,
String userName,
DBItemCache cache)
Executes the given query with a pooled connection and closes the connection.
|
public static final String search_schema_name
public Object insertNativeItem(String query, String db, String table, String pk, String sequence) throws SQLException, Exception
query
- db
- table
- pk
- SQLException
Exception
public static Object GetNextID(String db, String table, String pk, String sequence) throws SQLException, Exception
SQLException
Exception
public Object getNextID(String db, String table, String pk, String sequence) throws SQLException, Exception
SQLException
Exception
public void sendBatch(DBItemCache cache, String db, String userName) throws SQLException, Exception
SQLException
Exception
public void insertItem(String query, String db, String userName, DBItemCache cache) throws SQLException, Exception
query
- db
- SQLException
Exception
public void updateItem(String query, String db, String userName, DBItemCache cache) throws SQLException, Exception
query
- db
- SQLException
Exception
public void executeNonSelectQuery(String query, String db, String userName) throws SQLException, Exception
query
- db
- SQLException
Exception
public static void ExecuteNonSelectQuery(String query, String db, String userName) throws SQLException, Exception
SQLException
Exception
public static void ExecuteBatch(ArrayList<String> queries, String db, String userName) throws SQLException, Exception
SQLException
Exception
public Object returnStatisticQuery(String query, String column, String db, String userName) throws SQLException, Exception
SQLException
Exception
public static Object ReturnStatisticQuery(String query, String column, String db, String userName) throws SQLException, Exception
SQLException
Exception
public XFTTable executeSelectQuery(String query, String db, String userName) throws SQLException, DBPoolException
query
- db
- SQLException
DBPoolException
public void closeConnection()
public static int GetResultSetSize(ResultSet rs)
rs
- public static void ClearCache(String dbName, String login, String xsiType)
dbName
- login
- public static String getDefaultDBName()
public static String RetrieveItemString(String rootElement, String ids, String functionQuery, String functionName, String login)
rootElement
- ids
- functionQuery
- functionName
- login
- public static void PerformUpdateTrigger(XFTItem item, String login) throws SQLException, DBPoolException
item
- login
- SQLException
DBPoolException
public static void CreateCustomSearchLog(String dbName, String login)
dbName
- login
- public static Object LogCustomSearch(String login, String search_xml, String dbname) throws SQLException, DBPoolException, Exception
login
- search_xml
- dbname
- SQLException
DBPoolException
Exception
public static String RetrieveLoggedCustomSearch(String login, String dbname, Object search_id) throws SQLException, DBPoolException, Exception
login
- dbname
- search_id
- SQLException
DBPoolException
Exception
public static void CreateTempSchema(String dbName, String login)
dbName
- login
- public static boolean HackCheck(String value)
public static void CheckSpecialSQLChars(String s)
public PreparedStatement getPreparedStatement(String db, String sql) throws SQLException, DBPoolException
SQLException
DBPoolException
public ResultSet executeQuery(String db, String query, String userName) throws SQLException, DBPoolException
SQLException
DBPoolException
public void sendBatch(ArrayList<String> statements, String db, String userName, int resultSetType, int resultSetConcurrency) throws SQLException, Exception
SQLException
Exception
Copyright © 2015 Neuroinformatics Research Group. All rights reserved.