public class SqlServiceImpl extends Object implements SqlService
DB_LOG_TYPE, DELETE_TYPE, DML_TYPE, EXCEPTION_TYPE, EXECUTE_SCRIPT_TYPE, EXECUTE_TYPE, EXPLAIN_PLAN_TYPE, INSERT_TYPE, MERGE_TYPE, NOTHING_TYPE, OUTPUT_PARAM_TYPE, SELECT_TYPE, UPDATE_TYPE| Constructor and Description |
|---|
SqlServiceImpl() |
| Modifier and Type | Method and Description |
|---|---|
void |
cancel(SessionConnectionProvider<Alias> provider)
Cancels currently executed sql.
|
void |
clear()
Sets current statement, external process, and result set to null.
|
void |
commitTransaction(SessionConnectionProvider<Alias> provider,
Alias params,
boolean closeOnCommit)
Commits current transaction.
|
SqlResult |
executeAutotrace(SqlRequest sqlRequest)
Executes autotrace
|
SqlResult |
executeExplainPlan(SqlRequest sqlRequest)
Executes explain plan if supported by driver passed in the sql request.
|
SqlResult |
executeExternal(SqlRequest sqlRequest)
Executes sql using external tool if supported by driver passed in the sql request.
|
SqlResult |
executeScript(SqlRequest sqlRequest)
Executes sql script, for example anonymous sql block if supported by driver passed in the sql request.
|
SqlResult |
executeSql(SqlRequest sqlRequest)
Executes sql.
|
LogNode |
getLogNode(String m,
Object ret,
Object[] args,
Throwable ex)
Gets the log node.
|
Map<String,FieldDef> |
getMetaData(SqlRequest sqlRequest)
Gets the meta data for the database object (table, view or synonym).
|
String |
getPropertyName()
Get the configuration property name used to enable\disable logging for the service.
|
boolean |
isLogByDefault()
Checks if service call should be logged by default.
|
void |
releaseConnection(SessionConnectionProvider<Alias> provider,
Alias params)
Releases connection.
|
void |
rollbackTransaction(SessionConnectionProvider<Alias> provider,
Alias params,
boolean closeOnRollback)
Rollbacks current transaction.
|
public void cancel(SessionConnectionProvider<Alias> provider)
SqlServicecancel in interface SqlServiceprovider - the connection providerpublic void clear()
public void commitTransaction(SessionConnectionProvider<Alias> provider, Alias params, boolean closeOnCommit) throws Exception
SqlServicecommitTransaction in interface SqlServiceprovider - the connection providerparams - the aliscloseOnCommit - the close on commit flag. If set the connection will be released on commitException - the exceptionpublic SqlResult executeAutotrace(SqlRequest sqlRequest) throws Exception
SqlServiceexecuteAutotrace in interface SqlServicesqlRequest - the sql requestException - in case of any errorpublic SqlResult executeExplainPlan(SqlRequest sqlRequest) throws Exception
SqlServiceexecuteExplainPlan in interface SqlServicesqlRequest - the sql requestException - in case of any errorpublic SqlResult executeExternal(SqlRequest sqlRequest) throws Exception
SqlServiceexecuteExternal in interface SqlServicesqlRequest - the sql requestException - in case of any errorpublic SqlResult executeScript(SqlRequest sqlRequest) throws Exception
SqlServiceexecuteScript in interface SqlServicesqlRequest - the sql requestException - in case of any errorpublic SqlResult executeSql(SqlRequest sqlRequest) throws Exception
SqlServiceexecuteSql in interface SqlServicesqlRequest - the sql requestException - in case of any errorpublic LogNode getLogNode(String m, Object ret, Object[] args, Throwable ex)
LoggablegetLogNode in interface Loggablem - the methodret - the return valueargs - the input argumentex - the exceptionpublic Map<String,FieldDef> getMetaData(SqlRequest sqlRequest) throws Exception
SqlServicegetMetaData in interface SqlServicesqlRequest - the sql requestException - the exceptionpublic String getPropertyName()
LoggablegetPropertyName in interface Loggablepublic boolean isLogByDefault()
LoggableisLogByDefault in interface Loggablepublic void releaseConnection(SessionConnectionProvider<Alias> provider, Alias params) throws Exception
SqlServicereleaseConnection in interface SqlServiceprovider - the connection providerparams - the aliasException - in case of any errorpublic void rollbackTransaction(SessionConnectionProvider<Alias> provider, Alias params, boolean closeOnRollback) throws Exception
SqlServicerollbackTransaction in interface SqlServiceprovider - the connection providerparams - the aliascloseOnRollback - the close on rollback flag. If set the connection will be closed on rollbackException - in case of any errorCopyright © 2010-2020 Toolsverse. All Rights Reserved.