public class DerbyDatabase 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 all constraints on the supplied tableName, owned by the supplied owner.
|
Timestamp |
getActualDatabaseTime(Connection connection)
Gets the time of the actual database.
|
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 DerbyDatabase |
getInstance()
Gets the one and only Derby 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 the database 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 DerbyDatabase getInstance()
public Timestamp getActualDatabaseTime(Connection connection) throws SQLException
getActualDatabaseTime
in class Database
connection
- The database connection.SQLException
- When the time could not be obtained from the 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.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.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, owner or tableName is null.IllegalArgumentException
- When either the supplied owner or 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.UnsupportedOperationException
- Always.SQLException
- When the constraints could not be fetched from the database.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.UnsupportedOperationException
- Always.SQLException
- When the constraint could not be fetched from the database.Copyright © 2008–2018. All rights reserved.