public class OracleDatabase extends Database
PARAM_NAME_CONNECTION, PARAM_NAME_DATA_SOURCE, PARAM_NAME_NAME, PARAM_NAME_OWNER, PARAM_NAME_RESULT_SET_ROW_CALL_BACK, PARAM_NAME_SQL_STATEMENT, PARAM_NAME_TABLE_NAME
Modifier and Type | Method and Description |
---|---|
Constraint |
getActualConstraint(Connection connection,
String owner,
String name)
Gets the constraint owned by the supplied owner and with the supplied name, from the database.
|
List<Constraint> |
getActualConstraints(Connection connection,
String owner,
String tableName)
Gets the all constraints on the supplied tableName, owned by the supplied owner.
|
Timestamp |
getActualDatabaseTime(Connection connection)
Gets the time from an Oracle database server.
|
Table |
getActualTableMetaData(Connection connection,
String owner,
String tableName)
Gets the meta data of the table identified by the supplied tableName.
|
List<String> |
getActualTables(Connection connection,
String owner)
Gets the database tables owned by the supplied owner.
|
static OracleDatabase |
getInstance()
Gets the one and only Oracle Database instance.
|
List<String> |
getPrimaryKeyColumns(Connection connection,
String owner,
String tableName)
Gets the primary key columns of the table identified by the supplied tableName.
|
String |
getTimestampColumnName()
Gets the column name Oracle uses to get or insert a timestamp.
|
String |
toString()
Creates a String representation of this database object.
|
execute, execute, executeQuery, executeQuery, executeQuery, executeQuery, executeQuery, executeQuery, executeQueryWithLargeResultSet, executeQueryWithLargeResultSet, executeSingleDoubleResultQuery, executeSingleDoubleResultQuery, executeSingleLongResultQuery, executeSingleLongResultQuery, executeSingleOptionalResultQuery, executeSingleOptionalResultQuery, executeSingleResultQuery, executeSingleRowResultQuery, executeSingleRowResultQuery, executeSingleRowResultQuery, executeSingleRowResultQuery, getActualDatabase, getConstraint, getConstraint, getConstraints, getConstraints, getDatabaseTime, getDatabaseTime, getTableColumns, getTableMetaData, getTableMetaData, getTables, getTables
public static OracleDatabase getInstance()
public Timestamp getActualDatabaseTime(Connection connection) throws SQLException
getActualDatabaseTime
in class Database
connection
- The connection to execute the SQL statement to get the
time.NullPointerException
- When the supplied connection is null.SQLException
- When the time could not be obtained from the Oracle
database server.public String getTimestampColumnName()
getTimestampColumnName
in class Database
public List<String> getActualTables(Connection connection, String owner) throws SQLException
getActualTables
in class Database
connection
- The database connection.owner
- Owner of the database tables.IllegalArgumentException
- When the supplied owner is empty.NullPointerException
- When either the supplied connection or
the supplied owner is null.SQLException
- When the list could not be obtained from the
database server.public Table getActualTableMetaData(Connection connection, String owner, String tableName) throws SQLException
getActualTableMetaData
in class Database
connection
- The database connection.owner
- Owner of the table identified by the supplied tableName.tableName
- Name of the table to get the meta data for.NullPointerException
- When either the supplied connection or the
supplied owner of the supplied tableName is null.IllegalArgumentException
- When either the supplied owner or the
supplied tableName is empty.SQLException
- When the meta data could not be retrieved (possibly
due to the fact that no connection could be obtained).public List<String> getPrimaryKeyColumns(Connection connection, String owner, String tableName) throws SQLException
connection
- The database connection.owner
- Owner of the table identified by the supplied tableName.tableName
- Name of the table to get the primary key columns for.SQLException
- When the primary key columns could not be retrieved.NullPointerException
- When either the supplied connection or the supplied owner of the supplied tableName is
null.IllegalArgumentException
- When either the supplied owner or the supplied tableName is empty.public List<Constraint> getActualConstraints(Connection connection, String owner, String tableName) throws SQLException
getActualConstraints
in class Database
connection
- The database connection.owner
- The owner of the constraints to get.tableName
- The name of the table.SQLException
- When the constraints could not be fetched from the database.NullPointerException
- When either the supplied connection, owner or tableName is null.IllegalArgumentException
- When either the supplied owner or tableName is empty.public Constraint getActualConstraint(Connection connection, String owner, String name) throws SQLException
getActualConstraint
in class Database
connection
- The database connection.owner
- The owner of the constraint to get.name
- The name of the constraint to get.SQLException
- When the constraint could not be fetched from the database.NullPointerException
- When either the supplied connection, owner or name is null.IllegalArgumentException
- When either the supplied owner or name is empty.Copyright © 2008–2018. All rights reserved.