SolarMetric Kodo JDO 3.2.4 generated on January 7 2005

kodo.jdbc.sql
Class OracleDictionary

java.lang.Object
  |
  +--kodo.jdbc.sql.DBDictionary
        |
        +--kodo.jdbc.sql.OracleDictionary
All Implemented Interfaces:
Configurable, ConnectionDecorator

public class OracleDictionary
extends DBDictionary

Dictionary for Oracle.


Field Summary
 String autoIncrementSequenceName
          The global sequence name to use for autoincrement simulation.
 int maxEmbeddedBlobSize
          The maximum size (in bytes) of blobs that can be embedded in an insert/update prepared statement by the Oracle JDBC driver.
 int maxEmbeddedClobSize
          The maximum size (in characters) of clobs that can be embedded in an insert/update prepared statement by the Oracle JDBC driver.
 boolean useTriggersForAutoIncrement
          If true, then simulate auto-increment in Oracle by using a trigger that inserts a sequence value into the primary key value when a row is inserted.
static String VENDOR_DATADIRECT_31
           
static String VENDOR_ORACLE
           
static String VENDOR_ORACLE_92
           
 
Fields inherited from class kodo.jdbc.sql.DBDictionary
arrayTypeName, autoIncrementClause, autoIncrementTypeName, batchLimit, batchParameterLimit, bigintTypeName, binaryTypeName, bitTypeName, blobTypeName, catalogSeparator, CENTI, charTypeName, clobTypeName, conf, connected, CONS_NAME_AFTER, CONS_NAME_BEFORE, CONS_NAME_MID, constraintNameMode, createPrimaryKeys, datePrecision, dateTypeName, DECI, decimalTypeName, defaultSchemaName, distinctCountColumnSeparator, distinctTypeName, doubleTypeName, driverVendor, fixedSizeTypeNameSet, floatTypeName, forUpdateClause, initializationSQL, integerTypeName, javaObjectTypeName, joinSyntax, lastGeneratedKeyQuery, log, longVarbinaryTypeName, longVarcharTypeName, maxAutoIncrementNameLength, maxCharacterFieldLength, maxColumnNameLength, maxForeignKeyNameLength, maxIndexesPerTable, maxIndexNameLength, maxPrimaryKeyNameLength, maxTableNameLength, MICRO, MILLI, NANO, nullTypeName, numericTypeName, otherTypeName, platform, realTypeName, refTypeName, requiresAliasForSubselect, requiresAutoCommitForMetadata, reservedWords, reservedWordSet, SCHEMA_CASE_LOWER, SCHEMA_CASE_PRESERVE, SCHEMA_CASE_UPPER, schemaCase, SEC, simulateLocking, smallintTypeName, storageLimitationsFatal, storeCharsAsNumbers, storeLargeNumbersAsStrings, stringLengthFunction, structTypeName, supportsAlterTableWithAddColumn, supportsAlterTableWithDropColumn, supportsAutoIncrement, supportsCascadeDeleteAction, supportsDefaultDeleteAction, supportsDeferredConstraints, supportsForeignKeys, supportsHaving, supportsLockingWithDistinctClause, supportsLockingWithInnerJoin, supportsLockingWithMultipleTables, supportsLockingWithOrderClause, supportsLockingWithOuterJoin, supportsLockingWithSelectRange, supportsMultipleNontransactionalResultSets, supportsNullDeleteAction, supportsNullTableForGetColumns, supportsNullTableForGetImportedKeys, supportsNullTableForGetIndexInfo, supportsNullTableForGetPrimaryKeys, supportsQueryTimeout, supportsRestrictDeleteAction, supportsSchemaForGetColumns, supportsSchemaForGetTables, supportsSelectEndIndex, supportsSelectForUpdate, supportsSelectStartIndex, supportsSubselect, supportsTotalCountsForBatch, supportsUpdateCountsForBatch, systemSchemas, systemSchemaSet, systemTables, systemTableSet, tableForUpdateClause, tableTypes, timestampTypeName, timeTypeName, tinyintTypeName, toLowerCaseFunction, toUpperCaseFunction, useGetBestRowIdentifierForPrimaryKeys, useGetBytesForBlobs, useGetObjectForBlobs, useGetStringForClobs, useSchemaName, useSetBytesForBlobs, useSetStringForClobs, validationSQL, varbinaryTypeName, varcharTypeName, VENDOR_DATADIRECT, VENDOR_OTHER
 
Constructor Summary
OracleDictionary()
           
 
Method Summary
 boolean canBatch(Column col)
          Returns type if the specified column can be included in batch statements.
 boolean canOuterJoin(int syntax, ForeignKey fk)
          Returns if the given foreign key can be eagerly loaded using other joins.
 void connectedConfiguration(Connection conn)
          This method is called when the dictionary first sees any connection.
 void endConfiguration()
          Invoked upon completion of bean property configuration for this object.
protected  String getAutoIncrementSequenceName(Column col)
          Returns the name of the sequence that should be used for simulating auto-increment behavior.
protected  String getAutoIncrementTriggerName(Column col)
          Returns the name of the trigger that should be used for simulating auto-increment behavior.
 String getClobString(ResultSet rs, int column)
          Convert the specified column of the SQL ResultSet to the proper java type.
 Column[] getColumns(DatabaseMetaData meta, String catalog, String schemaName, String tableName, String columnName, Connection conn)
          Reflect on the schema to find columns matching the given table and column patterns.
 String[] getCreateTableSQL(Table table)
          Return a series of SQL statements to create the given table, complete with columns.
 long getGeneratedKey(Column col, Connection conn)
          Return the last inserted auto increment value for the given column.
 ForeignKey[] getImportedKeys(DatabaseMetaData meta, String catalog, String schemaName, String tableName, Connection conn)
          Reflect on the schema to return foreign keys imported by the given table pattern.
 Index[] getIndexInfo(DatabaseMetaData meta, String catalog, String schemaName, String tableName, boolean unique, boolean approx, Connection conn)
          Reflect on the schema to find indexes matching the given table pattern.
 PrimaryKey[] getPrimaryKeys(DatabaseMetaData meta, String catalog, String schemaName, String tableName, Connection conn)
          Reflect on the schema to find primary keys for the given table pattern.
protected  SQLBuffer getSelects(Select sel, boolean distinctIdentifiers, boolean forUpdate)
          Return the portion of the select statement between the SELECT keyword and the FROM keyword.
 void putBytes(Object blob, byte[] data)
          Invoke the oracle-specific putBytes method on the given BLOB object.
 void putString(Object clob, String data)
          Invoke the oracle-specific putString method on the given CLOB object.
 FieldMapping replaceMapping(FieldMapping mapping)
          Replace the given mapping with one suited to this database, or return the original if no replacement is needed.
 MappingFactory replaceMappingFactory(MappingFactory factory)
          Replace the given factory with one suited to this database, or return the original if no replacement is needed.
 SchemaFactory replaceSchemaFactory(SchemaFactory factory)
          Replace the given factory with one suited to this database, or return the original if no replacement is needed.
 byte[] serialize(Object val)
          Return the serialized bytes for the given object.
 void setNull(PreparedStatement stmnt, int idx, int colType)
          Set the given value as a parameters to the statement.
 void substring(SQLBuffer buf, FilterValue str, FilterValue start, FilterValue end)
          Invoke this database's substring function.
 SQLBuffer toNativeJoin(Join join)
          Use the given join instance to create SQL joining its tables in the database's native syntax.
 SQLBuffer toSelect(SQLBuffer select, SQLBuffer tables, SQLBuffer where, SQLBuffer group, SQLBuffer having, SQLBuffer order, boolean distinct, boolean forUpdate, long start, long end)
          Combine the given components into a SELECT statement.
 
Methods inherited from class kodo.jdbc.sql.DBDictionary
appendSelectPostRange, appendSelectPreRange, appendSize, assertSupport, convertSchemaCase, decorate, getAddColumnSQL, getAddForeignKeySQL, getAddPrimaryKeySQL, getArray, getAsciiStream, getBigDecimal, getBigInteger, getBinaryStream, getBlob, getBlobObject, getBoolean, getByte, getBytes, getCatalogNameForMetadata, getChar, getCharacterStream, getClob, getColumnNameForMetadata, getCreateIndexSQL, getDate, getDate, getDeclareColumnSQL, getDouble, getDropColumnSQL, getDropForeignKeySQL, getDropIndexSQL, getDropPrimaryKeySQL, getDropTableSQL, getFloat, getForeignKeyConstraintSQL, getFrom, getFromSelect, getFullName, getFullName, getGeneratedKeySequenceName, getInt, getJDBCType, getLocale, getLong, getObject, getPreferredType, getPrimaryKeyConstraintSQL, getPrimaryKeysFromBestRowIdentifier, getPrimaryKeysFromGetPrimaryKeys, getRef, getSchemaNameForMetadata, getShort, getString, getTableNameForMetadata, getTables, getTime, getTimestamp, getTypeName, getValidColumnName, getValidForeignKeyName, getValidIndexName, getValidPrimaryKeyName, getValidTableName, getWhere, indexOf, isSystemIndex, isSystemTable, makeNameValid, newColumn, newDataStoreException, newForeignKey, newIndex, newPrimaryKey, newTable, refSchemaComponents, replaceMapping, setArray, setAsciiStream, setBigDecimal, setBigInteger, setBinaryStream, setBlob, setBlobObject, setBoolean, setByte, setBytes, setChar, setCharacterStream, setClob, setClobString, setConfiguration, setDate, setDate, setDouble, setFloat, setInt, setJoinSyntax, setLocale, setLong, setObject, setRef, setShort, setString, setTime, setTimestamp, setUnknown, startConfiguration, storageWarning, supportsLocking, supportsRandomAccessResultSet, toSelect, toSelectCount, toSQL92Join, toTraditionalJoin
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

VENDOR_ORACLE

public static final String VENDOR_ORACLE

VENDOR_ORACLE_92

public static final String VENDOR_ORACLE_92

VENDOR_DATADIRECT_31

public static final String VENDOR_DATADIRECT_31

maxEmbeddedBlobSize

public int maxEmbeddedBlobSize
The maximum size (in bytes) of blobs that can be embedded in an insert/update prepared statement by the Oracle JDBC driver. Defaults to 4000.

maxEmbeddedClobSize

public int maxEmbeddedClobSize
The maximum size (in characters) of clobs that can be embedded in an insert/update prepared statement by the Oracle JDBC driver. Defaults to 4000.

useTriggersForAutoIncrement

public boolean useTriggersForAutoIncrement
If true, then simulate auto-increment in Oracle by using a trigger that inserts a sequence value into the primary key value when a row is inserted.

autoIncrementSequenceName

public String autoIncrementSequenceName
The global sequence name to use for autoincrement simulation.
Constructor Detail

OracleDictionary

public OracleDictionary()
Method Detail

endConfiguration

public void endConfiguration()
Description copied from interface: Configurable
Invoked upon completion of bean property configuration for this object.
Overrides:
endConfiguration in class DBDictionary

connectedConfiguration

public void connectedConfiguration(Connection conn)
                            throws SQLException
Description copied from class: DBDictionary
This method is called when the dictionary first sees any connection. It is used to initialize dictionary metadata if needed. If you override this method, be sure to call super.connectedConfiguration.
Overrides:
connectedConfiguration in class DBDictionary

canBatch

public boolean canBatch(Column col)
Description copied from class: DBDictionary
Returns type if the specified column can be included in batch statements.
Overrides:
canBatch in class DBDictionary

getSelects

protected SQLBuffer getSelects(Select sel,
                               boolean distinctIdentifiers,
                               boolean forUpdate)
Description copied from class: DBDictionary
Return the portion of the select statement between the SELECT keyword and the FROM keyword.
Overrides:
getSelects in class DBDictionary

canOuterJoin

public boolean canOuterJoin(int syntax,
                            ForeignKey fk)
Description copied from class: DBDictionary
Returns if the given foreign key can be eagerly loaded using other joins.
Overrides:
canOuterJoin in class DBDictionary

toNativeJoin

public SQLBuffer toNativeJoin(Join join)
Description copied from class: DBDictionary
Use the given join instance to create SQL joining its tables in the database's native syntax. Throws an exception by default.
Overrides:
toNativeJoin in class DBDictionary

toSelect

public SQLBuffer toSelect(SQLBuffer select,
                          SQLBuffer tables,
                          SQLBuffer where,
                          SQLBuffer group,
                          SQLBuffer having,
                          SQLBuffer order,
                          boolean distinct,
                          boolean forUpdate,
                          long start,
                          long end)
Description copied from class: DBDictionary
Combine the given components into a SELECT statement.
Overrides:
toSelect in class DBDictionary

substring

public void substring(SQLBuffer buf,
                      FilterValue str,
                      FilterValue start,
                      FilterValue end)
Description copied from class: DBDictionary
Invoke this database's substring function.
Overrides:
substring in class DBDictionary
Following copied from class: kodo.jdbc.sql.DBDictionary
Parameters:
buf - the SQL buffer to write the substring invocation to
str - a query value representing the target string
start - a query value representing the start index
end - a query value representing the end index, or null for none

setNull

public void setNull(PreparedStatement stmnt,
                    int idx,
                    int colType)
             throws SQLException
Description copied from class: DBDictionary
Set the given value as a parameters to the statement. The column type will come from Types.
Overrides:
setNull in class DBDictionary

serialize

public byte[] serialize(Object val)
                 throws SQLException
Description copied from class: DBDictionary
Return the serialized bytes for the given object.
Overrides:
serialize in class DBDictionary

getClobString

public String getClobString(ResultSet rs,
                            int column)
                     throws SQLException
Description copied from class: DBDictionary
Convert the specified column of the SQL ResultSet to the proper java type.
Overrides:
getClobString in class DBDictionary

getColumns

public Column[] getColumns(DatabaseMetaData meta,
                           String catalog,
                           String schemaName,
                           String tableName,
                           String columnName,
                           Connection conn)
                    throws SQLException
Description copied from class: DBDictionary
Reflect on the schema to find columns matching the given table and column patterns.
Overrides:
getColumns in class DBDictionary

getPrimaryKeys

public PrimaryKey[] getPrimaryKeys(DatabaseMetaData meta,
                                   String catalog,
                                   String schemaName,
                                   String tableName,
                                   Connection conn)
                            throws SQLException
Description copied from class: DBDictionary
Reflect on the schema to find primary keys for the given table pattern.
Overrides:
getPrimaryKeys in class DBDictionary

getIndexInfo

public Index[] getIndexInfo(DatabaseMetaData meta,
                            String catalog,
                            String schemaName,
                            String tableName,
                            boolean unique,
                            boolean approx,
                            Connection conn)
                     throws SQLException
Description copied from class: DBDictionary
Reflect on the schema to find indexes matching the given table pattern.
Overrides:
getIndexInfo in class DBDictionary

getImportedKeys

public ForeignKey[] getImportedKeys(DatabaseMetaData meta,
                                    String catalog,
                                    String schemaName,
                                    String tableName,
                                    Connection conn)
                             throws SQLException
Description copied from class: DBDictionary
Reflect on the schema to return foreign keys imported by the given table pattern.
Overrides:
getImportedKeys in class DBDictionary

replaceMapping

public FieldMapping replaceMapping(FieldMapping mapping)
Description copied from class: DBDictionary
Replace the given mapping with one suited to this database, or return the original if no replacement is needed. Returns the original by default.
Overrides:
replaceMapping in class DBDictionary

replaceMappingFactory

public MappingFactory replaceMappingFactory(MappingFactory factory)
Description copied from class: DBDictionary
Replace the given factory with one suited to this database, or return the original if no replacement is needed. Returns the original by default.
Overrides:
replaceMappingFactory in class DBDictionary

replaceSchemaFactory

public SchemaFactory replaceSchemaFactory(SchemaFactory factory)
Description copied from class: DBDictionary
Replace the given factory with one suited to this database, or return the original if no replacement is needed. Returns the original by default.
Overrides:
replaceSchemaFactory in class DBDictionary

getCreateTableSQL

public String[] getCreateTableSQL(Table table)
Description copied from class: DBDictionary
Return a series of SQL statements to create the given table, complete with columns. Indexes and constraints will be created separately.
Overrides:
getCreateTableSQL in class DBDictionary

getGeneratedKey

public long getGeneratedKey(Column col,
                            Connection conn)
                     throws SQLException
Description copied from class: DBDictionary
Return the last inserted auto increment value for the given column. Throws an exception by default if DBDictionary.lastGeneratedKeyQuery is null.
Overrides:
getGeneratedKey in class DBDictionary

getAutoIncrementSequenceName

protected String getAutoIncrementSequenceName(Column col)
Returns the name of the sequence that should be used for simulating auto-increment behavior. The sequence name will either be the global name specified by autoIncrementSequenceName, or else will be "SEQ_[table name]".

getAutoIncrementTriggerName

protected String getAutoIncrementTriggerName(Column col)
Returns the name of the trigger that should be used for simulating auto-increment behavior. The default name will be the "TRIG_[table name]".

putBytes

public void putBytes(Object blob,
                     byte[] data)
              throws SQLException
Invoke the oracle-specific putBytes method on the given BLOB object. Uses reflection in case the blob is wrapped in another vendor-specific class; for example Weblogic wraps oracle thin driver lobs in its own interfaces with the same methods.

putString

public void putString(Object clob,
                      String data)
               throws SQLException
Invoke the oracle-specific putString method on the given CLOB object. Uses reflection in case the clob is wrapped in another vendor-specific class; for example Weblogic wraps oracle thin driver lobs in its own interfaces with the same methods.

SolarMetric Kodo JDO 3.2.4 generated on January 7 2005

Copyright 2001,2002 SolarMetric, Inc. All Rights Reserved.