|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jpox.store.AbstractDatastoreAdapter
org.jpox.store.rdbms.adapter.DatabaseAdapter
public class DatabaseAdapter
Provides methods for adapting SQL language elements to a specific vendor's database. A database adapter is primarily used to map generic JDBC data types and SQL identifiers to specific types/identifiers suitable for the database in use.
Each database adapter corresponds to a particular combination of database,
database version, driver, and driver version, as provided by the driver's
own metadata. Database adapters cannot be constructed directly, but must be
obtained using the RDBMSAdapterFactory class.
RDBMSAdapterFactory,
DatabaseMetaData| Nested Class Summary | |
|---|---|
class |
DatabaseAdapter.JDBCTypeInfo
Convenience container for JDBC type information taken from the JDBC driver. |
| Field Summary | |
|---|---|
protected java.lang.String |
catalogSeparator
The String used to separate catalog and table name. |
protected int |
driverMajorVersion
The major version number of the underlying driver. |
protected int |
driverMinorVersion
The minor version number of the underlying driver. |
protected java.lang.String |
driverName
the JDBC driver name |
protected java.lang.String |
driverVersion
the JDBC driver version |
protected static Localiser |
LOCALISER
|
protected int |
maxColumnNameLength
The maximum length to be used for a column name. |
protected int |
maxConstraintNameLength
The maximum length to be used for a table constraint name. |
protected int |
maxIndexNameLength
The maximum length to be used for an index name. |
protected int |
maxTableNameLength
The maximum length to be used for a table name. |
protected boolean |
storesLowerCaseIdentifiers
|
protected boolean |
storesLowerCaseQuotedIdentifiers
|
protected boolean |
storesMixedCaseIdentifiers
|
protected boolean |
storesMixedCaseQuotedIdentifiers
|
protected boolean |
storesMixedCaseQuotedSensitiveIdentifiers
|
protected boolean |
storesMixedCaseSensitiveIdentifiers
|
protected boolean |
storesUpperCaseIdentifiers
|
protected boolean |
storesUpperCaseQuotedIdentifiers
|
protected boolean |
supportsCatalogsInTableDefinitions
true if the database supports catalogs in table definition |
protected boolean |
supportsSchemasInTableDefinitions
true if the database supports schemas in table definition |
protected boolean |
supportsStatementBatching
Whether the adapter supports batching of statements. |
protected java.util.HashMap |
typesByTypeNumber
JDBC types, keyed by the type number. |
| Fields inherited from class org.jpox.store.AbstractDatastoreAdapter |
|---|
datastoreMajorVersion, datastoreMinorVersion, datastoreProductName, datastoreProductVersion, datastoreRevisionVersion, identifierQuoteString, LOCALISER_BASE, mappingManager, reservedKeywords |
| Constructor Summary | |
|---|---|
protected |
DatabaseAdapter(java.sql.DatabaseMetaData metadata)
Constructs a database adapter based on the given JDBC metadata. |
| Method Summary | |
|---|---|
NumericExpression |
absMethod(ScalarExpression expr)
Returns the appropriate SQL expression for the JDOQL Math.abs(EXPRESSION) method. |
NumericExpression |
acosMethod(ScalarExpression expr)
Returns the appropriate SQL expression for the JDOQL Math.acos(EXPRESSION) method. |
protected void |
addTypeInfo(short jdbcType,
TypeInfo ti,
boolean addIfNotPresent)
Convenience method for use by overriding adapters to add their own fake types in. |
NumericExpression |
asinMethod(ScalarExpression expr)
Returns the appropriate SQL expression for the JDOQL Math.asin(EXPRESSION) method. |
NumericExpression |
atanMethod(ScalarExpression expr)
Returns the appropriate SQL expression for the JDOQL Math.atan(EXPRESSION) method. |
java.lang.String |
cartersianProduct(LogicSetExpression Y)
Generates a expression that represents the cartesian product of two sets: X and Y. |
NumericExpression |
ceilMethod(ScalarExpression expr)
Returns the appropriate SQL expression for the JDOQL ceil(EXPRESSION) method. |
void |
closeConnection(java.sql.Connection conn)
Method to close a Connection to the datastore. |
ScalarExpression |
concatOperator(ScalarExpression operand1,
ScalarExpression operand2)
If only one operand expression is of type String, then string conversion is performed on the other operand to produce a string at run time. |
NumericExpression |
cosMethod(ScalarExpression expr)
Returns the appropriate SQL expression for the JDOQL Math.cos(EXPRESSION) method. |
boolean |
createIndexesBeforeForeignKeys()
Whether to create indexes before foreign keys. |
BooleanExpression |
endsWithMethod(ScalarExpression leftOperand,
ScalarExpression rightOperand)
Returns whether this string ends with the specified string. |
NumericExpression |
expMethod(ScalarExpression expr)
Returns the appropriate SQL expression for the JDOQL Math.exp(EXPRESSION) method. |
NumericExpression |
floorMethod(ScalarExpression expr)
Returns the appropriate SQL expression for the JDOQL Math.floor(EXPRESSION) method. |
java.lang.String |
getAddCandidateKeyStatement(CandidateKey ck,
IdentifierFactory factory)
Returns the appropriate SQL to add a candidate key to its table. |
java.lang.String |
getAddColumnStatement(DatastoreContainerObject table,
Column col)
Accessor for the SQL statement to add a column to a table. |
java.lang.String |
getAddForeignKeyStatement(ForeignKey fk,
IdentifierFactory factory)
Returns the appropriate SQL to add a foreign key to its table. |
java.lang.String |
getAddPrimaryKeyStatement(PrimaryKey pk,
IdentifierFactory factory)
Returns the appropriate SQL to add a primary key to its table. |
java.lang.String |
getAutoIncrementKeyword()
Accessor for the autoincrementing keyword for generating DDLs. |
java.lang.String |
getAutoIncrementStmt(java.lang.String tableName,
java.lang.String columnName)
Accessor for the autoincrementing sql statement for this datastore. |
java.lang.String |
getCatalogName(java.sql.Connection conn)
Accessor for the Catalog Name for this datastore. |
java.lang.String |
getCatalogSeparator()
Accessor for the catalog separator. |
java.sql.ResultSet |
getColumns(java.sql.Connection conn,
java.lang.String catalog,
java.lang.String schema,
java.lang.String table)
Accessor for table and column information for a catalog/schema in this datastore. |
java.sql.ResultSet |
getColumns(java.sql.Connection conn,
java.lang.String catalog,
java.lang.String schema,
java.lang.String table,
java.lang.String columnNamePattern)
Accessor for table and column information for a catalog/schema in this datastore. |
java.sql.Connection |
getConnection(javax.sql.DataSource[] ds,
java.lang.String userName,
java.lang.String password,
int isolationLevel)
Accessor for a Connection to the datastore. |
java.lang.String |
getContinuationString()
Continuation string to use where the SQL statement goes over more than 1 line. |
java.lang.String |
getCreateIndexStatement(Index idx,
IdentifierFactory factory)
Returns the appropriate SQL to add an index to its table. |
java.lang.String |
getCreateTableStatement(TableImpl table,
Column[] columns,
java.util.Properties props)
Returns the appropriate SQL to create the given table having the given columns. |
NumericExpression |
getDayMethod(SqlTemporalExpression date)
Returns the appropriate SQL expression for the JDOQL Date.getDay() method. |
int |
getDriverMajorVersion()
Accessor for the JDBC driver major version |
int |
getDriverMinorVersion()
Accessor for the JDBC driver minor version |
java.lang.String |
getDropTableStatement(DatastoreContainerObject table)
Returns the appropriate SQL to drop the given table. |
java.lang.String |
getDropViewStatement(ViewImpl view)
Returns the appropriate SQL to drop the given view. |
java.lang.String |
getEscapeCharacter()
The character for escaping characters in pattern expressions. |
ScalarExpression |
getEscapedPatternExpression(ScalarExpression patternExpression)
The pattern string for representing one character. |
java.lang.String |
getEscapePatternExpression()
The character for escaping characters in pattern expressions. |
java.sql.ResultSet |
getExistingIndexes(java.sql.Connection conn,
java.sql.DatabaseMetaData dmd,
java.lang.String catalog,
java.lang.String schema,
java.lang.String table)
Provide the existing indexes in the database for the table |
NumericExpression |
getHourMethod(SqlTemporalExpression time)
Returns the appropriate SQL expression for the JDOQL Time.getHour() method. |
java.lang.String |
getInsertStatementForNoColumns(Table table)
Method to return the INSERT statement to use when inserting into a table that has no columns specified. |
int |
getMaxColumnNameLength()
Accessor for the maximum column name length permitted on this datastore. |
int |
getMaxConstraintNameLength()
Accessor for the maximum constraint name length permitted on this datastore. |
int |
getMaxForeignKeys()
Accessor for the maximum foreign keys by table permitted for this datastore. |
int |
getMaxIndexes()
Accessor for the maximum indexes by schema permitted for this datastore. |
int |
getMaxIndexNameLength()
Accessor for the maximum index name length permitted on this datastore. |
int |
getMaxTableNameLength()
Accessor for the maximum table name length permitted on this datastore. |
NumericExpression |
getMinuteMethod(SqlTemporalExpression time)
Returns the appropriate SQL expression for the JDOQL Time.getMinute() method. |
NumericExpression |
getMonthMethod(SqlTemporalExpression date)
Returns the appropriate SQL expression for the JDOQL Date.getMonth() method. |
protected MappingManager |
getNewMappingManager()
Accessor for a new Mapping Manager |
java.lang.String |
getNewUUIDFunction()
The function to creates a unique value of type uniqueidentifier. |
java.lang.String |
getNonAnsiInnerJoinWhereClause(java.lang.String col1,
java.lang.String col2)
Accessor for the WHERE clause to add to provide an INNER JOIN using non-ANSI syntax. |
java.lang.String |
getNonAnsiLeftOuterJoinWhereClause(java.lang.String col1,
java.lang.String col2)
Accessor for the WHERE clause to add to provide a LEFT OUTER JOIN using non-ANSI syntax. |
java.lang.String |
getNonAnsiRightOuterJoinWhereClause(java.lang.String col1,
java.lang.String col2)
Accessor for the WHERE clause to add to provide a RIGHT OUTER JOIN using non-ANSI syntax. |
java.lang.String |
getOperatorConcat()
An operator in a string expression that concatenates two or more character or binary strings, columns, or a combination of strings and column names into one expression (a string operator). |
java.lang.String |
getPatternExpressionAnyCharacter()
The pattern string for representing one character that is expanded in word searches. |
java.lang.String |
getPatternExpressionZeroMoreCharacters()
The pattern string for representing zero or more characters that is expanded in word searches. |
boolean |
getPlaceWithOptionAfterFromClause()
Determines whether the getSelectWithLockOption() is to be placed right
before the FROM clause, or at the end of the statement |
boolean |
getPlaceWithOptionWithinJoinClauses()
Determines whether lock option has to be placed within JOIN clauses as well. |
java.lang.String |
getRangeByLimitSelectClause(long offset,
long count)
Method to return the SQL to append to the SELECT clause of a SELECT statement to handle restriction of ranges using the LIMIT keyword. |
java.lang.String |
getRangeByLimitWhereClause(long offset,
long count)
Method to return the SQL to append to the WHERE clause of a SELECT statement to handle restriction of ranges using the LIMIT keyword. |
java.lang.String |
getRangeByRowNumberColumn()
Method to return the column name to use when handling ranges via a rownumber on the select. |
java.lang.String |
getSchemaName(java.sql.Connection conn)
Accessor for the Schema Name for this datastore. |
NumericExpression |
getSecondMethod(SqlTemporalExpression time)
Returns the appropriate SQL expression for the JDOQL Time.getSecond() method. |
java.lang.String |
getSelectNewUUIDStmt()
The function to creates a unique value of type uniqueidentifier. |
java.lang.String |
getSelectWithLockOption()
The option to specify in "SELECT ... |
java.lang.String |
getSequenceCreateStmt(java.lang.String sequence_name,
java.lang.String min,
java.lang.String max,
java.lang.String start,
java.lang.String increment,
java.lang.String cache_size)
Accessor for the sequence create statement for this datastore. |
java.lang.String |
getSequenceNextStmt(java.lang.String sequence_name)
Accessor for the sequence statement to get the next id for this datastore. |
java.lang.String |
getSurrogateForEmptyStrings()
Some databases, Oracle, treats an empty string (0 length) equals null |
java.sql.ResultSet |
getTables(java.sql.Connection conn,
java.lang.String catalog,
java.lang.String schema)
Accessor for table information for a catalog/schema in this datastore. |
int |
getTransactionIsolationForSchemaCreation()
Accessor for the transaction isolation level to use during schema creation. |
TypeInfo |
getTypeInfo(int dataType)
Returns type information for the database type that best implements the given JDBC type. |
int |
getUnlimitedLengthPrecisionValue(TypeInfo typeInfo)
Returns the precision value to be used when creating string columns of "unlimited" length. |
NumericExpression |
getYearMethod(SqlTemporalExpression date)
Returns the appropriate SQL expression for the JDOQL Date.getYear() method. |
boolean |
includeOrderByColumnsInSelect()
Whether to include ORDER BY columns in a SELECT. |
boolean |
includeOrderByColumnsInSelectUsingAlias()
Whether to specify ORDER BY columns in SELECTS using aliases. |
NumericExpression |
indexOfMethod(ScalarExpression source,
ScalarExpression str,
NumericExpression from)
Returns the appropriate SQL expression for the JDOQL String.indexOf() method. |
void |
initialiseDatastore(java.lang.Object conn)
Creates the auxiliary functions/procedures in the schema |
boolean |
isAutoIncrementingDataType(java.lang.String typeName)
Verifies if the given typeName is auto incremented by the datastore. |
boolean |
isBitReallyBoolean()
Accessor for whether a JDBC Types.BIT is really mapped in the datastore to a boolean field. |
boolean |
isNullEqualsEmptyStrings()
Some databases, Oracle, treats an empty string (0 length) equals null |
boolean |
isSQLKeyword(java.lang.String word)
Tests if a given string is a SQL key word. |
boolean |
isStoresLowerCaseIdentifiers()
Accessor for whether this adapter stores lower case identifiers. |
boolean |
isStoresLowerCaseQuotedIdentifiers()
Accessor for whether this adapter stores "lowercase" identifiers. |
boolean |
isStoresMixedCaseIdentifiers()
Accessor for whether this adapter stores MixedCase identifiers. |
boolean |
isStoresMixedCaseQuotedIdentifiers()
Accessor for whether this adapter "MixedCase" identifiers. |
boolean |
isStoresUpperCaseIdentifiers()
Accessor for whether this adapter stores UPPERCASE identifiers. |
boolean |
isStoresUpperCaseQuotedIdentifiers()
Accessor for whether this adapter stores "UPPERCASE" identifiers. |
boolean |
isValidPrimaryKeyType(int datatype)
Method to return whether the specified JDBC type is valid for use in a PrimaryKey. |
java.util.Iterator |
iteratorReservedWords()
Iterator for the reserved words constructed from the method DataBaseMetaData.getSQLKeywords + standard SQL reserved words |
java.util.Iterator |
iteratorTypeInfo()
Iterator for the TypeInfo objects constructed from the method DataBaseMetaData.getTypeInfo |
NumericExpression |
lengthMethod(StringExpression str)
Returns the appropriate SQL expression for the JDOQL String.length() method. |
void |
loadDatastoreMapping(PluginManager mgr,
ClassLoaderResolver clr)
Load the datastore mapping declared as Plug-in |
NumericExpression |
logMethod(ScalarExpression expr)
Returns the appropriate SQL expression for the JDOQL Math.log(EXPRESSION) method. |
BooleanExpression |
matchesMethod(StringExpression text,
StringExpression pattern)
Matches this to the argument expression pattern. |
ColumnInfo |
newColumnInfo(java.sql.ResultSet rs)
A factory for ColumnInfo objects. |
ExportedKeyInfo |
newExportedKeyInfo(java.sql.ResultSet rs)
A factory for ForeignKeyInfo objects. |
ForeignKeyInfo |
newForeignKeyInfo(java.sql.ResultSet rs)
A factory for ForeignKeyInfo objects. |
QueryExpression |
newQueryStatement(DatastoreContainerObject table,
ClassLoaderResolver clr)
Accessor for a new query statement. |
QueryExpression |
newQueryStatement(DatastoreContainerObject table,
DatastoreIdentifier rangeVar,
ClassLoaderResolver clr)
Accessor for a new query statement. |
LogicSetExpression |
newTableExpression(QueryExpression qs,
DatastoreContainerObject table,
DatastoreIdentifier rangeVar)
Returns a new TableExpression object appropriate for this DBMS. |
protected TypeInfo |
newTypeInfo(java.sql.ResultSet rs)
A factory for TypeInfo objects. |
protected java.util.Set |
parseKeywordList(java.lang.String list)
Utility method to parse a list of keywords and split them out into words. |
boolean |
requiresColumnDefaultsInitialising()
Accessor for whether the column defaults need initialising for this datastore |
protected void |
setDefaultTypeInfoForJDBCType(int jdbcType,
java.lang.String defaultTypeName)
Convenience method to set the default database type name for a particular JDBC type. |
NumericExpression |
sinMethod(ScalarExpression expr)
Returns the appropriate SQL expression for the JDOQL Math.sin(EXPRESSION) method. |
NumericExpression |
sqrtMethod(ScalarExpression expr)
Returns the appropriate SQL expression for the JDOQL Math.sqrt(EXPRESSION) method. |
BooleanExpression |
startsWithMethod(ScalarExpression source,
ScalarExpression str)
Method to handle the starts with operation. |
StringExpression |
substringMethod(StringExpression str,
NumericExpression begin)
Returns the appropriate SQL expression for the JDOQL String.substring(str,begin) method. |
StringExpression |
substringMethod(StringExpression str,
NumericExpression begin,
NumericExpression end)
Returns the appropriate SQL expression for the JDOQL String.substring(str,begin,end) method. |
boolean |
supportsAlterTableDropConstraint()
Whether this datastore supports ALTER TABLE DROP constraints |
boolean |
supportsAlterTableDropForeignKeyConstraint()
Whether this datastore supports ALTER TABLE DROP FOREIGN KEY constraints |
boolean |
supportsAnalysisMethods()
Accessor for whether the SQL extensions CUBE, ROLLUP are supported. |
boolean |
supportsAnsiJoinSyntax()
Accessor for whether the RDBMS supports ANSI join syntax. |
boolean |
supportsAutoIncrementColumnTypeSpecification()
Whether we support auto-increment/identity keys with column type specification. |
boolean |
supportsAutoIncrementKeysNullSpecification()
Whether we support autoincrementing keys with nullability specification. |
boolean |
supportsBooleanComparison()
Whether we support Boolean comparisons. |
boolean |
supportsCatalogsInTableDefinitions()
Whether this datastore supports the use of the catalog name in SQL table definitions (DDL). |
boolean |
supportsCheckConstraintsInEndCreateStatements()
Whether this datastore supports the use of CHECK after the column definitions in CREATE TABLE statements (DDL). |
boolean |
supportsCheckInCreateStatements()
Whether this datastore supports the use of CHECK in CREATE TABLE statements (DDL). |
boolean |
supportsDefaultBeforeNullInColumnOptions()
Whether any DEFAULT tag will be before any NULL/NOT NULL in the column options. |
boolean |
supportsDefaultKeywordInColumnOptions()
Whether we support DEFAULT tag in CREATE TABLE statements |
boolean |
supportsDefaultKeywordWithNotNullInColumnOptions()
Whether we support DEFAULT tag together with NOT NULL in CREATE TABLE statements. |
boolean |
supportsDeferredConstraints()
Whether this datastore supports deferred constraints. |
boolean |
supportsDistinctWithSelectForUpdate()
Whether this datastore supports using DISTINCT when using SELECT ... |
boolean |
supportsEscapeExpressionInLikePredicate()
Whether this datastore supports the use of the escape expression in like predicates |
boolean |
supportsExistsSyntax()
Whether the RDBMS supports use of EXISTS syntax. |
boolean |
supportsForeignKeyDeleteAction(ForeignKey.FKAction action)
Whether this datastore supports the specified foreign key delete action |
boolean |
supportsForeignKeyUpdateAction(ForeignKey.FKAction action)
Whether this datastore supports the specified foreign key update action |
boolean |
supportsLockWithSelectForUpdate()
Whether this datastore supports SELECT ... |
boolean |
supportsNullsInCandidateKeys()
Whether we support NULLs in candidate keys. |
boolean |
supportsNullsKeywordInColumnOptions()
Whether the database support NULLs in the column options for table creation. |
boolean |
supportsPrimaryKeyInCreateStatements()
Whether the datastore supports specification of the primary key in CREATE TABLE statements. |
boolean |
supportsSchemasInTableDefinitions()
Whether this datastore supports the use of the schema name in SQL table definitions (DDL). |
boolean |
supportsSettingBlobUsingSetString()
Accessor for whether setting a BLOB value allows use of PreparedStatement.setString() |
boolean |
supportsSettingClobUsingSetString()
Accessor for whether setting a CLOB value allows use of PreparedStatement.setString() |
boolean |
supportsStatementBatching()
Whether this datastore supports batching of statements. |
boolean |
supportsStatementGetGeneratedKeys()
Whether the datastore supports Statement.getGeneratedKeys() |
boolean |
supportsTransactionIsolationLevel(int isolationLevel)
Accessor for whether the adapter supports the transaction isolation level |
boolean |
supportsUnionSyntax()
Whether the RDBMS supports use of UNION syntax. |
boolean |
supportsUniqueConstraintsInEndCreateStatements()
Whether this datastore supports the use of UNIQUE after the column definitions in CREATE TABLE statements (DDL). |
NumericExpression |
tanMethod(ScalarExpression expr)
Returns the appropriate SQL expression for the JDOQL Math.tan(EXPRESSION) method. |
NumericExpression |
toNumericExpression(CharacterExpression expr)
Returns the appropriate expression for the (int)'A' expression. |
java.lang.String |
toString()
Method to return this object as a string. |
StringExpression |
toStringExpression(NumericExpression expr)
A String conversion that converts a numeric expression to string. |
StringExpression |
toStringExpression(StringLiteral expr)
A String conversion that converts a String literal to String expression. |
StringExpression |
trimMethod(StringExpression str)
Returns the appropriate SQL expression for the JDOQL String.trim(str) method. |
boolean |
useUnionAll()
Union combines the results of two or more queries into a single result set. |
| Methods inherited from class org.jpox.store.AbstractDatastoreAdapter |
|---|
getAdapterTime, getDatastoreMajorVersion, getDatastoreMinorVersion, getIdentifierQuoteString, getMapping, getMapping, getMapping, getMapping, getMapping, getMappingManager, getMiliseconds, getTime, getVendorID, isReservedKeyword, modOperator, supportsAutoIncrementFields, supportsQueryFetchSizeLowerThanOne, supportsSequences |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.jpox.store.rdbms.adapter.RDBMSAdapter |
|---|
getIdentifierQuoteString, supportsSequences |
| Methods inherited from interface org.jpox.store.DatastoreAdapter |
|---|
getAdapterTime, getDatastoreMajorVersion, getDatastoreMinorVersion, getMapping, getMapping, getMapping, getMapping, getMappingManager, getVendorID, isReservedKeyword, modOperator, supportsAutoIncrementFields, supportsQueryFetchSizeLowerThanOne |
| Field Detail |
|---|
protected static final Localiser LOCALISER
protected java.lang.String driverName
protected java.lang.String driverVersion
protected int driverMajorVersion
protected int driverMinorVersion
protected int maxTableNameLength
protected int maxConstraintNameLength
protected int maxIndexNameLength
protected int maxColumnNameLength
protected boolean supportsCatalogsInTableDefinitions
protected boolean supportsSchemasInTableDefinitions
protected java.lang.String catalogSeparator
protected final java.util.HashMap typesByTypeNumber
protected boolean supportsStatementBatching
protected boolean storesLowerCaseIdentifiers
protected boolean storesMixedCaseIdentifiers
protected boolean storesUpperCaseIdentifiers
protected boolean storesLowerCaseQuotedIdentifiers
protected boolean storesMixedCaseQuotedIdentifiers
protected boolean storesUpperCaseQuotedIdentifiers
protected boolean storesMixedCaseSensitiveIdentifiers
protected boolean storesMixedCaseQuotedSensitiveIdentifiers
| Constructor Detail |
|---|
protected DatabaseAdapter(java.sql.DatabaseMetaData metadata)
metadata - the database metadata.| Method Detail |
|---|
public void initialiseDatastore(java.lang.Object conn)
initialiseDatastore in interface DatastoreAdapterconn - the connection to the datastore
public void loadDatastoreMapping(PluginManager mgr,
ClassLoaderResolver clr)
loadDatastoreMapping in interface DatastoreAdapterloadDatastoreMapping in class AbstractDatastoreAdaptermgr - the PluginManagerclr - the ClassLoaderResolverpublic int getDriverMajorVersion()
public int getDriverMinorVersion()
public int getMaxTableNameLength()
getMaxTableNameLength in interface RDBMSAdapterpublic int getMaxForeignKeys()
getMaxForeignKeys in interface RDBMSAdapterpublic int getMaxIndexes()
getMaxIndexes in interface RDBMSAdapterpublic int getMaxConstraintNameLength()
getMaxConstraintNameLength in interface RDBMSAdapterpublic int getMaxIndexNameLength()
getMaxIndexNameLength in interface RDBMSAdapterpublic int getMaxColumnNameLength()
getMaxColumnNameLength in interface RDBMSAdapterpublic java.util.Iterator iteratorTypeInfo()
iteratorTypeInfo in interface RDBMSAdapterpublic java.util.Iterator iteratorReservedWords()
iteratorReservedWords in interface RDBMSAdapter
protected void addTypeInfo(short jdbcType,
TypeInfo ti,
boolean addIfNotPresent)
jdbcType - The JDBC typeti - The type info to use
protected void setDefaultTypeInfoForJDBCType(int jdbcType,
java.lang.String defaultTypeName)
jdbcType - The JDBC typedefaultTypeName - The default database type nameprotected TypeInfo newTypeInfo(java.sql.ResultSet rs)
ResultSet object passed must have been
obtained from a call to DatabaseMetaData.getTypeInfo().
The constructor only retrieves the values from the current row; the
caller is required to advance to the next row with ResultSet.next()
rs - The result set returned from DatabaseMetaData.getTypeInfo().
null if the type indicated by this row should be
excluded from use.public ColumnInfo newColumnInfo(java.sql.ResultSet rs)
ResultSet object passed must have been
obtained from a call to DatabaseMetaData.getColumns().
The constructor only retrieves the values from the current row; the
caller is required to advance to the next row with ResultSet.next()