public class Oracle
extends java.lang.Object
implements java.lang.Cloneable
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 java.lang.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_NON_SHARD_DATABASE
This constant denotes the Oracle error code for a non sharded databases
|
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_RESOURCE_BUSY
This constant denotes the Oracle error code for resource busy and acquire with NOWAIT specified or timeout expired
|
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(java.sql.Connection conn)
Constructs a new instance based on the JDBC connection passed in.
|
Oracle(oracle.jdbc.OracleConnection conn)
Constructs a new instance based on the JDBC connection passed in.
|
Oracle(oracle.jdbc.OracleConnection conn, javax.sql.DataSource ds)
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(java.lang.String url, java.lang.String user, java.lang.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.
|
void |
dispose()
Closes the underlying JDBC connection after a rollback.
|
void |
executeCall(java.lang.String s)
Executes a Callable statement based on s
|
void |
executeCall(java.lang.String s, java.lang.String bindVarValue)
Executes a Callable statement based on s and the given bind variable
|
void |
executeCall(java.lang.String s, java.lang.String bv1, java.lang.String bv2)
Executes a Callable statement based on s and the given bind variables
|
java.sql.ResultSet |
executeQuery(java.lang.String s)
Executes the given query and returns a query result set.
|
java.sql.ResultSet |
executeQuery(java.lang.String s, int iTimeout, int iDOP)
Executes the given query and returns a query result set.
|
java.sql.ResultSet |
executeQuery(java.lang.String s, int iTimeout, int iDOP, java.util.List listBindValues)
Executes the given query and returns a query result set.
|
java.sql.ResultSet |
executeQueryWithArg(java.lang.String s, java.lang.String arg, java.lang.String arg2)
Executes a SQL statement and returns a result set.
|
java.sql.ResultSet |
executeQueryWithArg(java.lang.String s, java.lang.String arg, java.lang.String arg2, java.lang.String arg3)
Executes a SQL statement and returns a result set.
|
static void |
executeSQL(java.sql.Connection conn, java.lang.String s)
Executes a SQL statement, for example, a statement to create or drop a table, or a callable statement.
|
void |
executeSQL(java.lang.String s)
Executes a SQL statement, for example, a statement to create or drop a table, or a callable statement.
|
void |
executeSQL(java.lang.String s, java.lang.String bindVarValue)
Executes a SQL statement.
|
void |
executeSQL(java.lang.String s, java.lang.String bv1, java.lang.String bv2)
Executes a SQL statement.
|
void |
executeSQL(java.lang.String s, java.lang.String bv1, java.lang.String bv2, java.lang.String bv3)
Executes a SQL statement.
|
oracle.jdbc.OracleConnection |
getConnection()
Returns the underlying OracleConnection object upon request.
|
java.lang.String |
getSessionID()
Returns the current Database Session ID
|
boolean |
isOpgAPIsLoaded()
Validates if the OPG APIs (catopg.sql) has been loaded into the Oracle Database
|
boolean |
isShardingDb()
This method verifies if this is a sharding DB
|
void |
rollbackTransaction()
Rolls back changes made through this Oracle connection.
|
void |
setLabel(java.lang.String policy, java.lang.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(java.lang.String policy, java.lang.String label)
Sets the row label for the current session.
|
static void |
setSessionQueryDOP(java.sql.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 java.lang.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_NON_SHARD_DATABASE
public static final int ORA_PTNED_IDX_MAY_NOT_BUILD_AS_WHOLE
public static final int ORA_RESOURCE_BUSY
public static final int ORA_TAB_DEF_HAS_CHANGED
public static final int ORA_TABLE_NOT_EXISTS
public Oracle(java.sql.Connection conn)
conn
- an OracleConnection
object. It MUST not be nullpublic Oracle(oracle.jdbc.OracleConnection conn)
conn
- an OracleConnection
object. It MUST not be nullpublic Oracle(oracle.jdbc.OracleConnection conn, javax.sql.DataSource ds)
conn
- an OracleConnection
object. It MUST not be nullds
- a DataSource
object able to get OracleConnection objectspublic Oracle(oracle.jdbc.pool.OracleDataSource ods)
ods
- an OracleDataSource
object. It MUST not be nullpublic Oracle(java.lang.String url, java.lang.String user, java.lang.String pass)
url
- JDBC URL that identifies an Oracle databaseuser
- username of a database schemapass
- password to authenticatepublic Oracle clone()
clone
in class java.lang.Object
public oracle.jdbc.OracleConnection cloneConnection() throws java.sql.SQLException
java.sql.SQLException
public void commitTransaction() throws java.sql.SQLException
java.sql.SQLException
public void dispose() throws java.sql.SQLException
commitTransaction()
call before this method call.java.sql.SQLException
public void executeCall(java.lang.String s) throws java.sql.SQLException
s
- a Callable statementjava.sql.SQLException
- when there is a server error.public void executeCall(java.lang.String s, java.lang.String bindVarValue) throws java.sql.SQLException
s
- a Callable statementbindVarValue
- value of the bind variablejava.sql.SQLException
- when there is a server error.public void executeCall(java.lang.String s, java.lang.String bv1, java.lang.String bv2) throws java.sql.SQLException
s
- a Callable statementbv1
- the value of the first bind variablebv2
- the value of the second bind variablejava.sql.SQLException
- when there is a server error.public java.sql.ResultSet executeQuery(java.lang.String s) throws java.sql.SQLException
s
- the SQL commandStatement
backing the returned ResultSet
.java.sql.SQLException
- when there is a server error.public java.sql.ResultSet executeQuery(java.lang.String s, int iTimeout, int iDOP) throws java.sql.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
.java.sql.SQLException
- when there is a server error.public java.sql.ResultSet executeQuery(java.lang.String s, int iTimeout, int iDOP, java.util.List listBindValues) throws java.sql.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
.java.sql.SQLException
- when there is a server error.public java.sql.ResultSet executeQueryWithArg(java.lang.String s, java.lang.String arg, java.lang.String arg2) throws java.sql.SQLException
s
- SQL statement to be executed.arg
- value of the first bind variablearg2
- value of the second bind variablejava.sql.SQLException
- when there is a server error.public java.sql.ResultSet executeQueryWithArg(java.lang.String s, java.lang.String arg, java.lang.String arg2, java.lang.String arg3) throws java.sql.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 variablejava.sql.SQLException
- when there is a server error.public static void executeSQL(java.sql.Connection conn, java.lang.String s) throws java.sql.SQLException
conn
- Database connections
- SQL statementjava.sql.SQLException
- when there is a server error.public void executeSQL(java.lang.String s) throws java.sql.SQLException
s
- SQL statementjava.sql.SQLException
- when there is a server error.public void executeSQL(java.lang.String s, java.lang.String bindVarValue) throws java.sql.SQLException
s
- SQL statementbindVarValue
- value of the bind variablejava.sql.SQLException
- when there is a server error.public void executeSQL(java.lang.String s, java.lang.String bv1, java.lang.String bv2) throws java.sql.SQLException
s
- SQL statementbv1
- value of the first bind variablebv2
- value of the second bind variablejava.sql.SQLException
- when there is a server error.public void executeSQL(java.lang.String s, java.lang.String bv1, java.lang.String bv2, java.lang.String bv3) throws java.sql.SQLException
s
- SQL statementbv1
- value of the first bind variablebv2
- value of the second bind variablebv3
- value of the third bind variablejava.sql.SQLException
- when there is a server error.public oracle.jdbc.OracleConnection getConnection() throws java.sql.SQLException
java.sql.SQLException
- if there is any problem establishing a connection to the server.public java.lang.String getSessionID() throws java.sql.SQLException
java.sql.SQLException
public boolean isOpgAPIsLoaded()
public boolean isShardingDb()
public void rollbackTransaction() throws java.sql.SQLException
java.sql.SQLException
public void setLabel(java.lang.String policy, java.lang.String label) throws java.sql.SQLException
policy
- name of the OLS policylabel
- security label namejava.sql.SQLException
public static void setLocale()
public void setRowLabel(java.lang.String policy, java.lang.String label) throws java.sql.SQLException
policy
- name of the OLS policylabel
- security label namejava.sql.SQLException
public static void setSessionQueryDOP(java.sql.Connection conn, int dop) throws java.sql.SQLException
dop
- degree of parallelism. The value can be zero. If the value is negative, then it is no op.java.sql.SQLException
public void setSessionQueryDOP(int dop) throws java.sql.SQLException
dop
- degree of parallelism. The value can be zero. If the value is negative, then it is no op.java.sql.SQLException