Extension SDK 9.0.5

oracle.jdeveloper.cm.ds.db
Interface Database

All Superinterfaces:
DBObjectProvider
All Known Implementing Classes:
AbstractDatabase

public interface Database
extends DBObjectProvider

Provides a interface for accessing a Database.

Since:
9.0.2

Field Summary
static java.lang.String GENERIC_JDBC_DATABASE
          Type for a generic JDBC database.
 
Fields inherited from interface oracle.jdeveloper.cm.ds.db.DBObjectProvider
CREATE_PRIVILEDGE, DELETE_PRIVILEDGE, MODIFY_PRIVILEDGE
 
Method Summary
 void close()
          Closes the Database Connection (and the supplied JDBC Connection).
 boolean exists(java.lang.String type, java.lang.String schema, java.lang.String objectName)
          Checks for existance of a schema object named objectName.
 java.sql.Connection getConnection()
          Gets the JDBC connection associated with this database.
 java.lang.String getConnectionName()
          Retrieves the ConnectionManager name for the Connection associated with this Database.
 java.lang.String getDatabaseSource(java.lang.String objectType, Schema schema, java.lang.String objectName)
          Retrieves the source for an object in the database.
 java.lang.String getDatabaseType()
          Gets the type of database.
 java.lang.String getIdentifierQuoteString()
          Returns the String to use to quote SQL identifiers with
 long getTimestamp(java.lang.String schema, java.lang.String type, java.lang.String objectName)
          Gets the timestamp of a PL/SQL Subprogram
 java.lang.String getUserName()
          Retrieves the username used to connect to the database
 boolean isObjectValid(java.lang.String objectType, java.lang.String schema, java.lang.String objectName)
          Determines whether the specified database object is in a valid state.
 boolean supportsDebugging()
          Whether this database instance supports JDWP debugging.
 
Methods inherited from interface oracle.jdeveloper.cm.ds.db.DBObjectProvider
canCreate, canCreate, canDelete, canDelete, createObject, createObjects, createSchema, deleteObject, deleteObjects, deleteSchema, getDataType, getExternalName, getExternalName, getInternalName, getInternalName, getObject, getSchema, getUniqueName, hasPriviledge, isValidName, listObjects, listObjects, listObjectTypes, listSchemas, listSupportedDataTypes, quoteIdentifier, updateObject, updateObjects, updateSchema, validateObject, validateObject
 

Field Detail

GENERIC_JDBC_DATABASE

public static final java.lang.String GENERIC_JDBC_DATABASE
Type for a generic JDBC database.

See Also:
getDatabaseType(), Constant Field Values
Method Detail

getConnection

public java.sql.Connection getConnection()
Gets the JDBC connection associated with this database.

Returns:
The Connection owned by this database object

getConnectionName

public java.lang.String getConnectionName()
Retrieves the ConnectionManager name for the Connection associated with this Database.

Returns:
a String containing the connection name

close

public void close()
Closes the Database Connection (and the supplied JDBC Connection).


getUserName

public java.lang.String getUserName()
                             throws DBException
Retrieves the username used to connect to the database

Throws:
DBException

getDatabaseType

public java.lang.String getDatabaseType()
Gets the type of database. This method uses JDBC metadata to determine the database type.

Returns:
an String describing the type of database
See Also:
DatabaseMetaData.getDatabaseProductName()

exists

public boolean exists(java.lang.String type,
                      java.lang.String schema,
                      java.lang.String objectName)
Checks for existance of a schema object named objectName.

Parameters:
objectName - The name of the schema object.
Returns:
true if the object exists, false otherwise.

getIdentifierQuoteString

public java.lang.String getIdentifierQuoteString()
Returns the String to use to quote SQL identifiers with

Specified by:
getIdentifierQuoteString in interface DBObjectProvider
Returns:
the String to use to quote an SQL identifier, or an empty String "", if the underlying database does not support this functionality.
See Also:
DatabaseMetaData.getIdentifierQuoteString()

getTimestamp

public long getTimestamp(java.lang.String schema,
                         java.lang.String type,
                         java.lang.String objectName)
Gets the timestamp of a PL/SQL Subprogram


isObjectValid

public boolean isObjectValid(java.lang.String objectType,
                             java.lang.String schema,
                             java.lang.String objectName)
Determines whether the specified database object is in a valid state.

Parameters:
schema - the name of the schema containing the object
objectName - the name of the object
objectType - the type of the object.

supportsDebugging

public boolean supportsDebugging()
Whether this database instance supports JDWP debugging. If the database does not support debugging, or only supports debugging using a custom protocol, this method should return false.

Returns:
true if JDWP debugging is supported against this database, false otherwise

getDatabaseSource

public java.lang.String getDatabaseSource(java.lang.String objectType,
                                          Schema schema,
                                          java.lang.String objectName)
                                   throws DBException
Retrieves the source for an object in the database. The specified object is assumed to be of some type that represents source; non-source based objects will return null.

Parameters:
objectType - The type of object for which the source is needed
schema - The Schema containing the object
objectName - The name of the object
Returns:
The source representing the object
Throws:
DBException - if an error occurs fetching the source

Extension SDK

 

Copyright © 1997, 2004, Oracle. All rights reserved.