Oracle Fusion Middleware Java API Reference for Oracle Extension SDK
11g Release 2 (11.1.2.1.0)

E17493-02

oracle.javatools.db
Interface JdbcDatabase

All Superinterfaces:
Database, DBObjectProvider

public interface JdbcDatabase
extends Database

Implementation of the Database interface for JDBC Databases. The JdbcDatabase class provides support for generic JDBC databases; its implementations use the JDBC metadata layer to list and build object definitions, rather than querying the dictionary directly (DictionaryDatabase).

This used to be a class - that implementation is now JdbcDatabaseImpl

Since:
9.0.5

Field Summary
static DataType ANSI_BIGINT
           
static DataType ANSI_BINARY_LARGE_OBJECT
          BINARY LARGE OBJECT STRING TYPES The length is specified as : [] [CHARACTERS | OCTETS] | [CHARACTERS | OCTETS]
static DataType ANSI_BIT
           
static DataType ANSI_BIT_VARYING
           
static DataType ANSI_BLOB
           
static DataType ANSI_BOOLEAN
          BOOLEAN TYPE
static DataType ANSI_CHAR
           
static DataType ANSI_CHAR_LARGE_OBJECT
           
static DataType ANSI_CHAR_VARYING
           
static DataType ANSI_CHARACTER
           
static DataType ANSI_CHARACTER_LARGE_OBJECT
           
static DataType ANSI_CHARACTER_VARYING
           
static DataType ANSI_CLOB
           
static DataType ANSI_DATE
          DATETIME TYPES
static DataType ANSI_DEC
           
static DataType ANSI_DECIMAL
           
static DataType ANSI_DOUBLE_PRECISION
           
static DataType ANSI_FLOAT
           
static DataType ANSI_INT
           
static DataType ANSI_INTEGER
           
static DataType ANSI_INTERVAL
          INTERVAL TYPE
static DataType ANSI_NATIONAL_CHAR
           
static DataType ANSI_NATIONAL_CHAR_VARYING
           
static DataType ANSI_NATIONAL_CHARACTER
           
static DataType ANSI_NATIONAL_CHARACTER_LARGE_OBJECT
           
static DataType ANSI_NATIONAL_CHARACTER_VARYING
           
static DataType ANSI_NCHAR
          NATIONAL CHARACTER STRING TYPES The length, where specified, can be followed by the word CHARACTERS or OCTETS.
static DataType ANSI_NCHAR_LARGE_OBJECT
           
static DataType ANSI_NCHAR_VARYING
           
static DataType ANSI_NCLOB
           
static DataType ANSI_NUMERIC
           
static DataType ANSI_NVARCHAR
           
static DataType ANSI_REAL
           
static DataType ANSI_REF
          REFERENCE TYPE REF ( ) [ SCOPE ]
static DataType ANSI_ROW
          ROW TYPE ROW ( [{, }] )
static DataType ANSI_SMALLINT
           
static DataType ANSI_TIME
           
static DataType ANSI_TIME_WITH_TIME_ZONE
           
static DataType ANSI_TIME_WITHOUT_TIME_ZONE
           
static DataType ANSI_TIMESTAMP
           
static DataType ANSI_TIMESTAMP_WITH_TIME_ZONE
           
static DataType ANSI_TIMESTAMP_WITHOUT_TIME_ZONE
           
static DataType ANSI_VARCHAR
           
static DataTypeAttribute DATATYPE_ATTRIBUTE_PRECISION
          NUMERIC TYPES
static DataTypeAttribute DATATYPE_ATTRIBUTE_SCALE
           
static DataTypeAttribute[] DATATYPE_ATTRIBUTE_SIZE
          CHARACTER STRING TYPES The length, where specified, can be followed by the word CHARACTERS or OCTETS.
static java.lang.String DEFAULT_SCHEMA_KEY
          Property used to mark that the schema is the default, and therefore only Schema in the database.
static int DOMAIN_ALL
           
 
Fields inherited from interface oracle.javatools.db.Database
FOUR_GIG, GENERIC_JDBC_DATABASE, PROVIDER_TYPE, SOURCE_TYPE_BODY, SOURCE_TYPE_SPEC, TWO_GIG
 
Fields inherited from interface oracle.javatools.db.DBObjectProvider
CREATE_PRIVILEDGE, DELETE_PRIVILEDGE, MODIFY_PRIVILEDGE, NEW_FROM_TEMPLATE_TYPE
 
Method Summary
 boolean catalogIsSchema()
          Tests whether the JDBC metadata catalog is the same as a Schema in the API.
 java.lang.String getNameForDriver(java.lang.String name)
          Some databases (e.g.
 boolean isUseSchema()
          Tests whether this implementation uses Schemas - i.e.
 java.lang.String normaliseDataTypeName(java.lang.String name)
          Returns the name of the datatype as defined in the registry.
 java.lang.String normaliseDefaultValue(DataType type, java.lang.String value)
          Converts default value into a standard form.
 
Methods inherited from interface oracle.javatools.db.Database
canRestrictSchemaList, close, exists, getConnection, getConnection, getConnectionName, getConnectionStore, getDatabaseSource, getDatabaseSource, getDatabaseType, getDatabaseVersion, getIdentifierQuoteString, getQualifiedName, getUserName, hasTransaction, isConnectionAlive, isConnectionClosed, isObjectValid, supportsDebugging, testSQLStatement
 
Methods inherited from interface oracle.javatools.db.DBObjectProvider
addObjectListener, addObjectListener, addProviderListener, addProviderListener, canCreate, canDelete, createObject, createObjects, createSchema, deleteObject, deleteObjects, deleteSchema, getCascadeManager, getDataType, getDDLGenerator, getDefaultSchema, getDefaultTemplateForType, getDescriptor, getDiffEngine, getExternalName, getExternalName, getInternalName, getInternalName, getName, getObject, getObject, getObjectFactory, getObjectManager, getOrCreateDataType, getPropertyManager, getProviderIdentifier, getProviderType, getSchema, getTimestamp, getTimestamp, getUniqueName, hasObjectPrivilege, hasPriviledge, hasSystemPrivilege, isEditable, isNewFromTemplateType, isValidName, isValidName, listObjects, listObjects, listObjects, listObjects, listObjects, listObjectTypes, listSchemas, listSchemas, listSupportedDataTypes, quoteIdentifier, removeObjectListener, removeProviderListener, removeProviderListener, setDefaultTemplateForType, supportsObjectType, undeleteObject, undeleteObjects, updateObject, updateObjects, updateObjects, updateSchema, validateName, validateName, validateObject, validateObject, validateObject, validateObject, validateObjectProperty, validateObjectProperty, validateObjectProperty, validateObjectProperty, validateSchema, validateSchema, validateUniqueName
 

Field Detail

DEFAULT_SCHEMA_KEY

static final java.lang.String DEFAULT_SCHEMA_KEY
Property used to mark that the schema is the default, and therefore only Schema in the database.

See Also:
Constant Field Values

DOMAIN_ALL

static final int DOMAIN_ALL
See Also:
Constant Field Values

DATATYPE_ATTRIBUTE_SIZE

static final DataTypeAttribute[] DATATYPE_ATTRIBUTE_SIZE
CHARACTER STRING TYPES The length, where specified, can be followed by the word CHARACTERS or OCTETS. A can be followed by: [ CHARACTER SET ] []


ANSI_CHAR

static final DataType ANSI_CHAR

ANSI_CHARACTER

static final DataType ANSI_CHARACTER

ANSI_CHAR_VARYING

static final DataType ANSI_CHAR_VARYING

ANSI_CHARACTER_VARYING

static final DataType ANSI_CHARACTER_VARYING

ANSI_VARCHAR

static final DataType ANSI_VARCHAR

ANSI_CHAR_LARGE_OBJECT

static final DataType ANSI_CHAR_LARGE_OBJECT

ANSI_CHARACTER_LARGE_OBJECT

static final DataType ANSI_CHARACTER_LARGE_OBJECT

ANSI_CLOB

static final DataType ANSI_CLOB

ANSI_BIT

static final DataType ANSI_BIT

ANSI_BIT_VARYING

static final DataType ANSI_BIT_VARYING

ANSI_NCHAR

static final DataType ANSI_NCHAR
NATIONAL CHARACTER STRING TYPES The length, where specified, can be followed by the word CHARACTERS or OCTETS. A can be followed by: []


ANSI_NATIONAL_CHAR

static final DataType ANSI_NATIONAL_CHAR

ANSI_NATIONAL_CHARACTER

static final DataType ANSI_NATIONAL_CHARACTER

ANSI_NVARCHAR

static final DataType ANSI_NVARCHAR

ANSI_NCHAR_VARYING

static final DataType ANSI_NCHAR_VARYING

ANSI_NATIONAL_CHAR_VARYING

static final DataType ANSI_NATIONAL_CHAR_VARYING

ANSI_NATIONAL_CHARACTER_VARYING

static final DataType ANSI_NATIONAL_CHARACTER_VARYING

ANSI_NATIONAL_CHARACTER_LARGE_OBJECT

static final DataType ANSI_NATIONAL_CHARACTER_LARGE_OBJECT

ANSI_NCHAR_LARGE_OBJECT

static final DataType ANSI_NCHAR_LARGE_OBJECT

ANSI_NCLOB

static final DataType ANSI_NCLOB

ANSI_BINARY_LARGE_OBJECT

static final DataType ANSI_BINARY_LARGE_OBJECT
BINARY LARGE OBJECT STRING TYPES The length is specified as : [] [CHARACTERS | OCTETS] | [CHARACTERS | OCTETS]


ANSI_BLOB

static final DataType ANSI_BLOB

DATATYPE_ATTRIBUTE_PRECISION

static final DataTypeAttribute DATATYPE_ATTRIBUTE_PRECISION
NUMERIC TYPES


DATATYPE_ATTRIBUTE_SCALE

static final DataTypeAttribute DATATYPE_ATTRIBUTE_SCALE

ANSI_NUMERIC

static final DataType ANSI_NUMERIC

ANSI_DECIMAL

static final DataType ANSI_DECIMAL

ANSI_DEC

static final DataType ANSI_DEC

ANSI_INTEGER

static final DataType ANSI_INTEGER

ANSI_INT

static final DataType ANSI_INT

ANSI_BIGINT

static final DataType ANSI_BIGINT

ANSI_SMALLINT

static final DataType ANSI_SMALLINT

ANSI_FLOAT

static final DataType ANSI_FLOAT

ANSI_REAL

static final DataType ANSI_REAL

ANSI_DOUBLE_PRECISION

static final DataType ANSI_DOUBLE_PRECISION

ANSI_DATE

static final DataType ANSI_DATE
DATETIME TYPES


ANSI_TIME

static final DataType ANSI_TIME

ANSI_TIME_WITH_TIME_ZONE

static final DataType ANSI_TIME_WITH_TIME_ZONE

ANSI_TIME_WITHOUT_TIME_ZONE

static final DataType ANSI_TIME_WITHOUT_TIME_ZONE

ANSI_TIMESTAMP

static final DataType ANSI_TIMESTAMP

ANSI_TIMESTAMP_WITH_TIME_ZONE

static final DataType ANSI_TIMESTAMP_WITH_TIME_ZONE

ANSI_TIMESTAMP_WITHOUT_TIME_ZONE

static final DataType ANSI_TIMESTAMP_WITHOUT_TIME_ZONE

ANSI_BOOLEAN

static final DataType ANSI_BOOLEAN
BOOLEAN TYPE


ANSI_INTERVAL

static final DataType ANSI_INTERVAL
INTERVAL TYPE


ANSI_ROW

static final DataType ANSI_ROW
ROW TYPE ROW ( [{, }] )


ANSI_REF

static final DataType ANSI_REF
REFERENCE TYPE REF ( ) [ SCOPE ]

Method Detail

isUseSchema

boolean isUseSchema()
Tests whether this implementation uses Schemas - i.e. whether listing objects in different schemas is supported by the underyling database, or JDBC metadata implementation.


catalogIsSchema

boolean catalogIsSchema()
Tests whether the JDBC metadata catalog is the same as a Schema in the API.


normaliseDataTypeName

java.lang.String normaliseDataTypeName(java.lang.String name)
Returns the name of the datatype as defined in the registry. This default implementation just returns the name returned from the DatabaseMetaData, but some jdbc drivers return weird things instead of the documented names, e.g. Sybase ASE12.5 JDBC driver returns DOUBLE PRECIS for FLOAT and DOUBLE PRECISION, but DOUBLE PRECIS isn't a valid datatype name.

Parameters:
dmdDataTypeName -
Returns:
: the name of the datatype as defined in the registry

normaliseDefaultValue

java.lang.String normaliseDefaultValue(DataType type,
                                       java.lang.String value)
Converts default value into a standard form. This default implementation just returns the default value. The method should be overidden for drivers like the native drivers for MySQL and Informix which return default character type values without enclosing quotes, despite the fact they need to be enclosed in double or single quotes in CREATE DDL statements.

Parameters:
dataType -
defaultValue -
Returns:

getNameForDriver

java.lang.String getNameForDriver(java.lang.String name)
Some databases (e.g. informix) don't deal with non-lowercase names properly. If we have tables jim and JIM, DMD methods that take the table name as an argument, e.g getColumns() will fetch the columns for jim, not JIM. If we quote JIM, it returns nothing. This method is called by the JDBC metadata object builder implementations to determine whether to work around the problem by calling DMD.getColumns() etc, with a null name, and then filter out objects that don't match the required name. The main problem with the workaround is data for all tables will be returned as the schema name is also null for this driver.


Oracle Fusion Middleware Java API Reference for Oracle Extension SDK
11g Release 2 (11.1.2.1.0)

E17493-02

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