public interface IDataManager
Modifier and Type | Field and Description |
---|---|
static String |
DATA_SERVICE |
static String |
DATA_SERVICE_ALIAS_PREFIX |
static String |
DATA_SERVICE_FOLDER |
Modifier and Type | Method and Description |
---|---|
void |
beginTran()
Starts sql transaction for default database connection on the current thread.
|
void |
commitTran()
Commits any outstanding transaction on the current thread.
|
ISqlWorker |
createSafeWorker(String datasourceName)
Get worker object to perform some database work.
|
ISqlWorker |
createWorker()
Get worker object to perform some database work for the default
portal datasource.
|
ISqlWorker |
createWorker(String datasourceName)
Get worker object to perform some database work
|
void |
executeSqlScriptFile(String fileName) |
void |
executeSqlScriptFile(String fileName,
PrintStream terminalWriter,
PrintStream spoolWriter,
boolean ignoreErrors,
Map<String,String> args) |
void |
executeSqlScriptString(String script,
String datasource)
Execute Sql script file against default DSN
|
void |
executeSqlScriptString(String script,
String datasource,
boolean ignoreErrors,
Map<String,String> args)
Execute Sql script file against default DSN
|
Connection |
getConnection()
Returns connection to a default database
|
Connection |
getConnection(String datasource)
Returns connection to a specific datasource
|
IDatabaseRuntime |
getDatabaseRuntime()
Returns current database runtime which is setup for active portal database
connection
|
int |
getDefaultServerType()
Returns name of the default database server type: mssql, oracle, mysql
|
void |
release()
Release all connection resources
|
void |
releaseConnection(Connection conn)
Releases connection back to the pool
|
void |
rollbackTran()
Rollsback any outstanding transaction on the current thread.
|
static final String DATA_SERVICE
static final String DATA_SERVICE_FOLDER
static final String DATA_SERVICE_ALIAS_PREFIX
int getDefaultServerType()
ISqlWorker.SERVERTYPE_ORACLE
for oracle or ISqlWorker.SERVERTYPE_MSSQL
otherwiseISqlWorker createWorker() throws SQLException
SQLException
ISqlWorker createWorker(String datasourceName) throws SQLException
datasourceName
- name of the datasource to create a worker forSQLException
ISqlWorker createSafeWorker(String datasourceName) throws SQLException
datasourceName
- name of the datasource to useSQLException
void beginTran() throws SQLException
ISqlWorker.beginTran()
method.SQLException
void commitTran() throws SQLException
ISqlWorker.commitTran()
methodSQLException
void rollbackTran() throws SQLException
ISqlWorker.rollbackTran()
methodSQLException
IDatabaseRuntime getDatabaseRuntime()
Connection getConnection()
Connection getConnection(String datasource)
datasource
- name of the datasourcevoid release()
void releaseConnection(Connection conn)
void executeSqlScriptFile(String fileName) throws SQLException, ServerBusyException, DeadlockException
void executeSqlScriptFile(String fileName, PrintStream terminalWriter, PrintStream spoolWriter, boolean ignoreErrors, Map<String,String> args) throws SQLException, ServerBusyException, DeadlockException
void executeSqlScriptString(String script, String datasource) throws SQLException, ServerBusyException, DeadlockException
void executeSqlScriptString(String script, String datasource, boolean ignoreErrors, Map<String,String> args) throws SQLException, ServerBusyException, DeadlockException