public class Oracle extends Object
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_INDEX_DOP
This contant denotes the default value used for index degree of parallelism (DOP)
|
static int |
DEFAULT_OPT_DYN_SAMPLING
This constant denotes the default value used for dynamic sampling
|
static String |
DEFAULT_PG_DS_NAME
The default name of the data source for Oracle PG data management
|
static int |
ORA_COL_ALREADY_INDEXED
This constant denotes the Oracle error code for column already indexed
|
static int |
ORA_DUP_ENTRY
This constant denotes the Oracle error code for duplicate entry
|
static int |
ORA_INDEX_NOT_EXIST
This constant denotes the Oracle error code for index does not exist
|
static int |
ORA_INSUFFICIENT_PRIV
This constant denotes the Oracle error code for insufficient privileges
|
static int |
ORA_INVALID_ID
This constant denotes the Oracle error code for invalid ID
|
static int |
ORA_INVALID_LOWER_LIMIT_SNAPSHOT
This constant denotes the Oracle error code for invalid lower limit for snapshot
|
static int |
ORA_INVALID_SCN
This constant denotes the Oracle error code for invalid SCN
|
static int |
ORA_LENGTH_TOO_LONG_FOR_DT
This constant denotes the Oracle error code for length too long for datatype
|
static int |
ORA_NAME_IN_USE_BY_EXISTING_OBJECT
This constant denotes the Oracle error code for name in use by an existing object
|
static int |
ORA_PTNED_IDX_MAY_NOT_BUILD_AS_WHOLE
This constant denotes the Oracle error code for partitioned index may not be built as whole
|
static int |
ORA_TAB_DEF_HAS_CHANGED
This constant denotes the Oracle error code for table definition has changed
|
static int |
ORA_TABLE_NOT_EXISTS
This constant denotes the Oracle error code for table does not exist
|
Constructor and Description |
---|
Oracle(oracle.jdbc.OracleConnection conn)
Constructs a new instance based on the JDBC connection passed in.
|
Oracle(oracle.jdbc.pool.OracleDataSource ods)
Constructs a new instance based on the data source object passed in.
|
Oracle(String url,
String user,
String pass)
Constructs a new instance based on the JDBC connection and login
information passed in.
|
Modifier and Type | Method and Description |
---|---|
Oracle |
clone()
Returns a new Oracle instance based on the
JDBC connection information stored in this instance.
|
oracle.jdbc.OracleConnection |
cloneConnection()
Returns a new instance of OracleConnection.
|
void |
commitTransaction()
Persists changes made through this Oracle connection.
|
OraclePool |
createPool(Properties prop)
Creates an instance of OraclePool.
|
void |
dispose()
Closes the underlying JDBC connection after a rollback.
|
void |
executeCall(String s)
Executes a Callable statement based on s
|
void |
executeCall(String s,
String bindVarValue)
Executes a Callable statement based on s and the given bind variable
|
void |
executeCall(String s,
String bv1,
String bv2)
Executes a Callable statement based on s and the given bind variables
|
ResultSet |
executeQuery(String s)
Executes the given query and returns a query
result set.
|
ResultSet |
executeQuery(String s,
int iTimeout,
int iDOP)
Executes the given query and returns a query
result set.
|
ResultSet |
executeQuery(String s,
int iTimeout,
int iDOP,
List listBindValues)
Executes the given query and returns a query
result set.
|
ResultSet |
executeQueryWithArg(String s,
String arg)
Executes the given SQL statement with a bind variable.
|
ResultSet |
executeQueryWithArg(String s,
String arg,
String arg2)
Executes a SQL statement and returns a result set.
|
ResultSet |
executeQueryWithArg(String s,
String arg,
String arg2,
String arg3)
Executes a SQL statement and returns a result set.
|
static void |
executeSQL(Connection conn,
String s)
Executes a SQL statement, for example, a
statement to create or drop a table, or a callable statement.
|
void |
executeSQL(String s)
Executes a SQL statement, for example, a
statement to create or drop a table, or a callable statement.
|
void |
executeSQL(String s,
String bindVarValue)
Executes a SQL statement.
|
void |
executeSQL(String s,
String bv1,
String bv2)
Executes a SQL statement.
|
void |
executeSQL(String s,
String bv1,
String bv2,
String bv3)
Executes a SQL statement.
|
int |
executeUpdate(String s)
Used for SQL INSERT and UPDATE operations, but not for statements
that are batched.
|
oracle.jdbc.OracleConnection |
getConnection()
Returns the underlying OracleConnection object upon request.
|
String |
getSessionID()
Returns the current Database Session ID
|
boolean |
isOpgAPIsLoaded()
Validates if the OPG APIs (catopg.sql) has been loaded into the Oracle Database
|
void |
rollbackTransaction()
Rolls back changes made through this Oracle connection.
|
void |
setLabel(String policy,
String label)
Sets the label for the current session.
|
static void |
setLocale()
Set default locale using two Jena Adaptor specific JAVA VM properties
|
void |
setRowLabel(String policy,
String label)
Sets the row label for the current session.
|
static void |
setSessionQueryDOP(Connection conn,
int dop)
Sets the degree of parallel query execution at the session level.
|
void |
setSessionQueryDOP(int dop)
Sets the degree of parallel query execution at the session level.
|
public static final int DEFAULT_INDEX_DOP
public static final int DEFAULT_OPT_DYN_SAMPLING
public static final String DEFAULT_PG_DS_NAME
public static final int ORA_COL_ALREADY_INDEXED
public static final int ORA_DUP_ENTRY
public static final int ORA_INDEX_NOT_EXIST
public static final int ORA_INSUFFICIENT_PRIV
public static final int ORA_INVALID_ID
public static final int ORA_INVALID_LOWER_LIMIT_SNAPSHOT
public static final int ORA_INVALID_SCN
public static final int ORA_LENGTH_TOO_LONG_FOR_DT
public static final int ORA_NAME_IN_USE_BY_EXISTING_OBJECT
public static final int ORA_PTNED_IDX_MAY_NOT_BUILD_AS_WHOLE
public static final int ORA_TAB_DEF_HAS_CHANGED
public static final int ORA_TABLE_NOT_EXISTS
public Oracle(oracle.jdbc.OracleConnection conn)
conn
- an OracleConnection
object. It MUST not be nullpublic Oracle(oracle.jdbc.pool.OracleDataSource ods)
ods
- an OracleDataSource
object. It MUST not be nullpublic Oracle clone()
public oracle.jdbc.OracleConnection cloneConnection() throws SQLException
SQLException
public void commitTransaction() throws SQLException
SQLException
public OraclePool createPool(Properties prop)
prop
- properties to be used for pool creationpublic void dispose() throws SQLException
commitTransaction()
call before this method call.SQLException
public void executeCall(String s) throws SQLException
s
- a Callable statementSQLException
- when there is a server error.public void executeCall(String s, String bindVarValue) throws SQLException
s
- a Callable statementbindVarValue
- value of the bind variableSQLException
- when there is a server error.public void executeCall(String s, String bv1, String bv2) throws SQLException
s
- a Callable statementbv1
- the value of the first bind variablebv2
- the value of the second bind variableSQLException
- when there is a server error.public ResultSet executeQuery(String s) throws SQLException
s
- the SQL commandStatement
backing the returned ResultSet
.SQLException
- when there is a server error.public ResultSet executeQuery(String s, int iTimeout, int iDOP) throws SQLException
s
- the SQL commandiTimeout
- number of seconds the system will wait for execution to finishiDOP
- degree of parallelism to execute the query.Statement
backing the returned ResultSet
.SQLException
- when there is a server error.public ResultSet executeQuery(String s, int iTimeout, int iDOP, List listBindValues) throws SQLException
s
- the SQL commandiTimeout
- number of seconds the system will wait for execution to finishiDOP
- degree of parallelism to execute the query.listBindValues
- the list of binding valuesStatement
backing the returned ResultSet
.SQLException
- when there is a server error.public ResultSet executeQueryWithArg(String s, String arg) throws SQLException
s
- SQL statement to be executedarg
- value of a bind variableSQLException
- when there is a server error.public ResultSet executeQueryWithArg(String s, String arg, String arg2) throws SQLException
s
- SQL statement to be executed.arg
- value of the first bind variablearg2
- value of the second bind variableSQLException
- when there is a server error.public ResultSet executeQueryWithArg(String s, String arg, String arg2, String arg3) throws SQLException
s
- SQL statement to be executed.arg
- value of the first bind variablearg2
- value of the second bind variablearg3
- value of the third bind variableSQLException
- when there is a server error.public static void executeSQL(Connection conn, String s) throws SQLException
conn
- Database connections
- SQL statementSQLException
- when there is a server error.public void executeSQL(String s) throws SQLException
s
- SQL statementSQLException
- when there is a server error.public void executeSQL(String s, String bindVarValue) throws SQLException
s
- SQL statementbindVarValue
- value of the bind variableSQLException
- when there is a server error.public void executeSQL(String s, String bv1, String bv2) throws SQLException
s
- SQL statementbv1
- value of the first bind variablebv2
- value of the second bind variableSQLException
- when there is a server error.public void executeSQL(String s, String bv1, String bv2, String bv3) throws SQLException
s
- SQL statementbv1
- value of the first bind variablebv2
- value of the second bind variablebv3
- value of the third bind variableSQLException
- when there is a server error.public int executeUpdate(String s) throws SQLException
s
- the SQL statementStatement.execute(java.lang.String)
SQLException
public oracle.jdbc.OracleConnection getConnection() throws SQLException
SQLException
- if there is any problem establishing a connection
to the server.public String getSessionID() throws SQLException
SQLException
public boolean isOpgAPIsLoaded()
public void rollbackTransaction() throws SQLException
SQLException
public void setLabel(String policy, String label) throws SQLException
policy
- name of the OLS policylabel
- security label nameSQLException
public static void setLocale()
public void setRowLabel(String policy, String label) throws SQLException
policy
- name of the OLS policylabel
- security label nameSQLException
public static void setSessionQueryDOP(Connection conn, int dop) throws SQLException
dop
- degree of parallelism. The value can be zero. If the value is negative,
then it is no op.SQLException
public void setSessionQueryDOP(int dop) throws SQLException
dop
- degree of parallelism. The value can be zero. If the value is negative,
then it is no op.SQLException
Copyright © 2017 Oracle and/or its affiliates. All Rights Reserved.