Overview | Package | Class | Tree | Deprecated | Index | Help
| SolarMetric Kodo JDO 3.1.6 generated on August 25 2004
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## 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.

Fields inherited from class kodo.jdbc.sql.DBDictionary
`CENTI, DECI, MICRO, MILLI, NANO, SCHEMA_CASE_DEFAULT, SCHEMA_CASE_LOWER, SCHEMA_CASE_PRESERVE, SCHEMA_CASE_UPPER, SEC`

Constructor Summary
`OracleDictionary()`

Method Summary
`boolean` | `canBatch(Column col)` Oracle cannot include LOBs in batch statements.
`void` | `configureReflectedColumn(Column col, String typeName)` Configure the specified column with the typeName from the `DatabaseMetaData`.
`String` | `getAutoIncrementSequenceName()` The global sequence name to use for autoincrement simulation.
`String` | `getAutoIncrementSequenceName(Column col)` Returns the name of the sequence that should be used for simulating auto-increment behavior.
`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.
`String[]` | `getCreateTableSQL(Table table)` Return a series of SQL statements to create the given table, complete with columns.
`long` | `getGeneratedKey(Column col, Connection conn)` If we simulate auto-increment columns using triggers and sequences, then return the current value of the sequence returned from `getAutoIncrementSequenceName(kodo.jdbc.schema.Column)`.
`ForeignKeyInfo[]` | `getImportedKeys(DatabaseMetaData meta, String catalog, String schemaName, String tableName, Connection conn)` Return a result set in the form expected by `DatabaseMetaData.getImportedKeys(java.lang.String, java.lang.String, java.lang.String)`, though only the `PKTABLE_SCHEM, PKTABLE_NAME, PKCOLUMN_NAME, FKTABLE_SCHEM, FKTABLE_NAME, FKCOLUMN_NAME, KEY_SEQ, DELETE_RULE, FK_NAME, DEFERRABILITY` columns are required.
`IndexInfo[]` | `getIndexInfo(DatabaseMetaData meta, String catalog, String schemaName, String tableName, boolean unique, boolean approx, Connection conn)` Return a result set in the form expected by `DatabaseMetaData.getIndexInfo(java.lang.String, java.lang.String, java.lang.String, boolean, boolean)`, though only the `TABLE_SCHEM, TABLE_NAME, NON_UNIQUE, INDEX_NAME, COLUMN_NAME` columns are required.
`int` | `getMaxEmbeddedBlobSize()` The maximum size (in bytes) of blobs that can be embedded in an insert/update prepared statement by the Oracle JDBC driver.
`int` | `getMaxEmbeddedClobSize()` The maximum size (in characters) of clobs that can be embedded in an insert/update prepared statement by the Oracle JDBC driver.
`PrimaryKeyInfo[]` | `getPrimaryKeys(DatabaseMetaData meta, String catalog, String schemaName, String tableName, Connection conn)` Return an array of `PrimaryKeyInfo` for the specified schema objects.
`boolean` | `getUseTriggersForAutoIncrement()` 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.
`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` | `setAutoIncrementSequenceName(String autoIncrementSequenceName)` The global sequence name to use for autoincrement simulation.
`void` | `setDBMetaData(DBMetaData meta)` Set the database metadata for this dictionary.
`void` | `setMaxEmbeddedBlobSize(int max)` The maximum size (in bytes) of blobs that can be embedded in an insert/update prepared statement by the Oracle JDBC driver.
`void` | `setMaxEmbeddedClobSize(int max)` The maximum size (in characters) of clobs that can be embedded in an insert/update prepared statement by the Oracle JDBC driver.
`void` | `setNull(PreparedStatement stmnt, int idx, int colType)` Set the given value as a parameters to the statement.
`void` | `setUseTriggersForAutoIncrement(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.
`boolean` | `supportsAutoIncrement()` Return true if this dictionary supports auto increment columns.
`protected boolean` | `supportsSizeInColumnDefinition(Column col, String name)` Returns true if a schema definition statement supports appending the size after the column type.
`boolean` | `supportsTotalCountsForBatch()` Returns true if `Statement.executeBatch()` will return an array with a single integer that represents the total number rows updated by the batch execution.
`boolean` | `supportsUpdateCountsForBatch()` Return true if the database returns meaningful update counts on batched statements.
`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 order, boolean distinct, boolean forUpdate)` Combine the given components into a SELECT statement.

Methods inherited from class kodo.jdbc.sql.DBDictionary
`addSystemSchema, addSystemTable, afterMetadataOperation, appendSize, assertSelectForUpdate, beforeMetadataOperation, canLock, convertSchemaCase, decorate, endConfiguration, getAddColumnSQL, getAddForeignKeySQL, getAddPrimaryKeySQL, getArray, getAsciiStream, getAutoIncrementClause, getAutoIncrementTypeName, getBatchLimit, getBatchParameterLimit, getBigDecimal, getBigInteger, getBigintTypeName, getBinaryStream, getBinaryTypeName, getBitTypeName, getBlob, getBlobObject, getBlobStream, getBlobTypeName, getBoolean, getByte, getBytes, getCatalogNameForMetadata, getCatalogSeparator, getChar, getCharacterStream, getCharTypeName, getClob, getClobTypeName, getColumnNameForMetadata, getColumns, getConfiguration, getConstraintNameBeforeDeclaration, getCreateIndexSQL, getCreatePrimaryKeys, getDate, getDate, getDatePrecision, getDateTypeName, getDBMetaData, getDecimalTypeName, getDeclareColumnSQL, getDefaultSchemaName, getDistinctCountColumnSeparator, getDistinctTypeName, getDouble, getDoubleTypeName, getDropColumnSQL, getDropForeignKeySQL, getDropIndexSQL, getDropPrimaryKeySQL, getDropTableSQL, getFloat, getFloatTypeName, getForeignKeyActionName, getForeignKeyConstraintSQL, getForUpdateClause, getFrom, getFullName, getFullName, getFullName, getGeneratedKeySequenceName, getInitializationSQL, getInt, getIntegerTypeName, getJavaObjectTypeName, getJDBCType, getJoinSyntax, getJoinSyntaxConstant, getLastGeneratedKeyQuery, getLastGeneratedKeyQuery, getLocale, getLong, getLongVarbinaryTypeName, getLongVarcharTypeName, getMaxCharacterFieldLength, getMaxCharactersInAutoIncrement, getMaxCharactersInTableName, getMaxColumnNameLength, getMaxForeignKeyNameLength, getMaxIndexesPerTable, getMaxIndexNameLength, getMaxKeyNameLength, getMaxPrimaryKeyNameLength, getMaxTableNameLength, getNullColumnName, getNullTableName, getNullTypeName, getNumericTypeName, getObject, getOrderings, getOtherTypeName, getPlatform, getPreferredType, getPrimaryKeyConstraintSQL, getPrimaryKeysFromBestRowIdentifier, getPrimaryKeysFromGetPrimaryKeys, getRealTypeName, getRef, getRefTypeName, getRequiresAliasForSubselect, getRequiresAutoCommitForMetadata, getReservedKeywords, getReservedWords, getSchemaCase, getSchemaNameForMetadata, getSelects, getShort, getSimulateLocking, getSizeClause, getSmallintTypeName, getStorageLimitationsFatal, getStoreCharsAsNumbers, getStoreLargeNumbersAsStrings, getString, getStructTypeName, getSupportsDeferredConstraints, getSupportsForeignKeys, getSupportsLockingWithDistinctClause, getSupportsLockingWithInnerJoin, getSupportsLockingWithMultipleTables, getSupportsLockingWithOrderClause, getSupportsLockingWithOuterJoin, getSupportsMultipleNontransactionalResultSets, getSupportsNullTableForGetColumns, getSupportsNullTableForGetImportedKeys, getSupportsNullTableForGetIndexInfo, getSupportsNullTableForGetPrimaryKeys, getSupportsQueryTimeout, getSupportsSchemaForGetColumns, getSupportsSchemaForGetTables, getSupportsSelectForUpdate, getSystemSchemas, getSystemTables, getTableForUpdateClause, getTableNameForMetadata, getTables, getTableTypes, getTime, getTimestamp, getTimestampTypeName, getTimeTypeName, getTinyintTypeName, getTypeName, getUseGetBestRowIdentifierForPrimaryKeys, getUseGetBytesForBlobs, getUseGetObjectForBlobs, getUseSchemaName, getUseSetBytesForBlobs, getUseStringsForClobs, getValidationSQL, getValidColumnName, getValidForeignKeyName, getValidIndexName, getValidPrimaryKeyName, getValidTableName, getVarbinaryTypeName, getVarcharTypeName, getWhere, isReserved, isSupported, isSystemIndex, isSystemTable, makeNameValid, maxKeyNameLength, newColumnInfo, newForeignKeyInfo, newIndexInfo, newPrimaryKeyInfo, newTableInfo, refSchemaComponents, replaceMapping, replaceSize, setArray, setAsciiStream, setAutoIncrementClause, setAutoIncrementTypeName, setBatchLimit, setBatchParameterLimit, setBigDecimal, setBigInteger, setBigintTypeName, setBinaryStream, setBinaryTypeName, setBitTypeName, setBlob, setBlobObject, setBlobTypeName, setBoolean, setByte, setBytes, setCatalogSeparator, setChar, setCharacterStream, setCharTypeName, setClob, setClobString, setClobTypeName, setConfiguration, setCreatePrimaryKeys, setDate, setDate, setDateTypeName, setDecimalTypeName, setDefaultSchemaName, setDistinctCountColumnSeparator, setDistinctTypeName, setDouble, setDoubleTypeName, setFloat, setFloatTypeName, setForUpdateClause, setInitializationSQL, setInt, setIntegerTypeName, setJavaObjectTypeName, setJoinSyntax, setJoinSyntaxConstant, setLastGeneratedKeyQuery, setLocale, setLong, setLongVarbinaryTypeName, setLongVarcharTypeName, setMaxCharactersInAutoIncrement, setMaxCharactersInTableName, setMaxIndexesPerTable, setMaxKeyNameLength, setNullColumnName, setNullTableName, setNullTypeName, setNumericTypeName, setObject, setOtherTypeName, setPlatform, setRealTypeName, setRef, setRefTypeName, setRequiresAliasForSubselect, setRequiresAutoCommitForMetadata, setReservedWords, setSchemaCase, setShort, setSimulateLocking, setSmallintTypeName, setStorageLimitationsFatal, setStoreCharsAsNumbers, setStoreLargeNumbersAsStrings, setString, setStructTypeName, setSupportsDeferredConstraints, setSupportsForeignKeys, setSupportsLockingWithDistinctClause, setSupportsLockingWithInnerJoin, setSupportsLockingWithMultipleTables, setSupportsLockingWithOrderClause, setSupportsLockingWithOuterJoin, setSupportsMultipleNontransactionalResultSets, setSupportsNullTableForGetColumns, setSupportsNullTableForGetImportedKeys, setSupportsNullTableForGetIndexInfo, setSupportsNullTableForGetPrimaryKeys, setSupportsQueryTimeout, setSupportsSchemaForGetColumns, setSupportsSchemaForGetTables, setSupportsSelectForUpdate, setSystemSchemas, setSystemTables, setTableForUpdateClause, setTableTypes, setTime, setTimestamp, setTimestampTypeName, setTimeTypeName, setTinyintTypeName, setUseGetBestRowIdentifierForPrimaryKeys, setUseGetBytesForBlobs, setUseGetObjectForBlobs, setUseSchemaName, setUseSetBytesForBlobs, setUseStringsForClobs, setValidationSQL, setVarbinaryTypeName, setVarcharTypeName, startConfiguration, storageWarning, supportsForeignKey, supportsRandomAccessResultSet, supportsSelectForUpdate, toSelect, toSelectCount, toSQL92Join, toTraditionalJoin, warnSupportedDictionary`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### OracleDictionary

    public OracleDictionary()

Method Detail

### setDBMetaData

    public void setDBMetaData(DBMetaData meta)
                       throws SQLException

  Description copied from class: `DBDictionary`
  Set the database metadata for this dictionary. This method will be called by the system.
  Overrides:
    `setDBMetaData` in class `DBDictionary`

### canBatch

    public boolean canBatch(Column col)

  Oracle cannot include LOBs in batch statements.
  Overrides:
    `canBatch` in class `DBDictionary`

### getMaxEmbeddedBlobSize

    public int getMaxEmbeddedBlobSize()

  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.

### setMaxEmbeddedBlobSize

    public void setMaxEmbeddedBlobSize(int max)

  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.

### getMaxEmbeddedClobSize

    public int getMaxEmbeddedClobSize()

  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.

### setMaxEmbeddedClobSize

    public void setMaxEmbeddedClobSize(int max)

  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.

### supportsUpdateCountsForBatch

    public boolean supportsUpdateCountsForBatch()

  Description copied from class: `DBDictionary`
  Return true if the database returns meaningful update counts on batched statements. Returns true by default.
  Overrides:
    `supportsUpdateCountsForBatch` in class `DBDictionary`

### supportsTotalCountsForBatch

    public boolean supportsTotalCountsForBatch()

  Description copied from class: `DBDictionary`
  Returns true if `Statement.executeBatch()` will return an array with a single integer that represents the total number rows updated by the batch execution.
  Overrides:
    `supportsTotalCountsForBatch` in class `DBDictionary`

### supportsSizeInColumnDefinition

    protected boolean supportsSizeInColumnDefinition(Column col,
                                                     String name)

  Description copied from class: `DBDictionary`
  Returns true if a schema definition statement supports appending the size after the column type. For example some databases allow FLOAT(20), but other databases disallow INT8(16).
  Overrides:
    `supportsSizeInColumnDefinition` in class `DBDictionary`

### configureReflectedColumn

    public void configureReflectedColumn(Column col,
                                         String typeName)

  Description copied from class: `DBDictionary`
  Configure the specified column with the typeName from the `DatabaseMetaData`.
  Overrides:
    `configureReflectedColumn` in class `DBDictionary`
  Following copied from class: `kodo.jdbc.sql.DBDictionary`
  Parameters:
    `col` - the `Column` to configure
    `typeName` - the TYPE_NAME as reported by the metadata

### 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 order,
                              boolean distinct,
                              boolean forUpdate)

  Description copied from class: `DBDictionary`
  Combine the given components into a SELECT statement.
  Overrides:
    `toSelect` in class `DBDictionary`

### 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`

### getPrimaryKeys

    public PrimaryKeyInfo[] getPrimaryKeys(DatabaseMetaData meta,
                                           String catalog,
                                           String schemaName,
                                           String tableName,
                                           Connection conn)
                                    throws SQLException

  Description copied from class: `DBDictionary`
  Return an array of `PrimaryKeyInfo` for the specified schema objects.
  Overrides:
    `getPrimaryKeys` in class `DBDictionary`

### getIndexInfo

    public IndexInfo[] getIndexInfo(DatabaseMetaData meta,
                                    String catalog,
                                    String schemaName,
                                    String tableName,
                                    boolean unique,
                                    boolean approx,
                                    Connection conn)
                             throws SQLException

  Description copied from class: `DBDictionary`
  Return a result set in the form expected by `DatabaseMetaData.getIndexInfo(java.lang.String, java.lang.String, java.lang.String, boolean, boolean)`, though only the `TABLE_SCHEM, TABLE_NAME, NON_UNIQUE, INDEX_NAME, COLUMN_NAME` columns are required.
  Overrides:
    `getIndexInfo` in class `DBDictionary`

### getImportedKeys

    public ForeignKeyInfo[] getImportedKeys(DatabaseMetaData meta,
                                            String catalog,
                                            String schemaName,
                                            String tableName,
                                            Connection conn)
                                     throws SQLException

  Description copied from class: `DBDictionary`
  Return a result set in the form expected by `DatabaseMetaData.getImportedKeys(java.lang.String, java.lang.String, java.lang.String)`, though only the `PKTABLE_SCHEM, PKTABLE_NAME, PKCOLUMN_NAME, FKTABLE_SCHEM, FKTABLE_NAME, FKCOLUMN_NAME, KEY_SEQ, DELETE_RULE, FK_NAME, DEFERRABILITY` columns are required.
  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`

### supportsAutoIncrement

    public boolean supportsAutoIncrement()

  Description copied from class: `DBDictionary`
  Return true if this dictionary supports auto increment columns. Returns false by default.
  Overrides:
    `supportsAutoIncrement` 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

  If we simulate auto-increment columns using triggers and sequences, then return the current value of the sequence returned from `getAutoIncrementSequenceName(kodo.jdbc.schema.Column)`.
  Overrides:
    `getGeneratedKey` in class `DBDictionary`

### getAutoIncrementSequenceName

    public 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 `getAutoIncrementSequenceName(kodo.jdbc.schema.Column)`, or else will be "SEQ_[table name]".

### getAutoIncrementTriggerName

    public 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]".

### setAutoIncrementSequenceName

    public void setAutoIncrementSequenceName(String autoIncrementSequenceName)

  The global sequence name to use for autoincrement simulation.

### getAutoIncrementSequenceName

    public String getAutoIncrementSequenceName()

  The global sequence name to use for autoincrement simulation.

### setUseTriggersForAutoIncrement

    public void setUseTriggersForAutoIncrement(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.

### getUseTriggersForAutoIncrement

    public boolean getUseTriggersForAutoIncrement()

  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.

### 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.

Overview | Package | Class | Tree | Deprecated | Index | Help
| SolarMetric Kodo JDO 3.1.6 generated on August 25 2004
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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