|
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 |
java.lang.Object | +--kodo.jdbc.sql.DBDictionary | +--kodo.jdbc.sql.OracleDictionary
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 java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public OracleDictionary()
Method Detail |
public void setDBMetaData(DBMetaData meta) throws SQLException
DBDictionary
setDBMetaData
in class DBDictionary
public boolean canBatch(Column col)
canBatch
in class DBDictionary
public int getMaxEmbeddedBlobSize()
public void setMaxEmbeddedBlobSize(int max)
public int getMaxEmbeddedClobSize()
public void setMaxEmbeddedClobSize(int max)
public boolean supportsUpdateCountsForBatch()
DBDictionary
supportsUpdateCountsForBatch
in class DBDictionary
public boolean supportsTotalCountsForBatch()
DBDictionary
Statement.executeBatch()
will
return an array with a single integer that represents the
total number rows updated by the batch execution.supportsTotalCountsForBatch
in class DBDictionary
protected boolean supportsSizeInColumnDefinition(Column col, String name)
DBDictionary
supportsSizeInColumnDefinition
in class DBDictionary
public void configureReflectedColumn(Column col, String typeName)
DBDictionary
DatabaseMetaData
.configureReflectedColumn
in class DBDictionary
kodo.jdbc.sql.DBDictionary
col
- the Column
to configuretypeName
- the TYPE_NAME as reported by the metadatapublic SQLBuffer toNativeJoin(Join join)
DBDictionary
toNativeJoin
in class DBDictionary
public SQLBuffer toSelect(SQLBuffer select, SQLBuffer tables, SQLBuffer where, SQLBuffer order, boolean distinct, boolean forUpdate)
DBDictionary
toSelect
in class DBDictionary
public void setNull(PreparedStatement stmnt, int idx, int colType) throws SQLException
DBDictionary
Types
.setNull
in class DBDictionary
public byte[] serialize(Object val) throws SQLException
DBDictionary
serialize
in class DBDictionary
public String getClobString(ResultSet rs, int column) throws SQLException
DBDictionary
getClobString
in class DBDictionary
public PrimaryKeyInfo[] getPrimaryKeys(DatabaseMetaData meta, String catalog, String schemaName, String tableName, Connection conn) throws SQLException
DBDictionary
PrimaryKeyInfo
for the specified
schema objects.getPrimaryKeys
in class DBDictionary
public IndexInfo[] getIndexInfo(DatabaseMetaData meta, String catalog, String schemaName, String tableName, boolean unique, boolean approx, Connection conn) throws SQLException
DBDictionary
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.getIndexInfo
in class DBDictionary
public ForeignKeyInfo[] getImportedKeys(DatabaseMetaData meta, String catalog, String schemaName, String tableName, Connection conn) throws SQLException
DBDictionary
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.getImportedKeys
in class DBDictionary
public FieldMapping replaceMapping(FieldMapping mapping)
DBDictionary
replaceMapping
in class DBDictionary
public MappingFactory replaceMappingFactory(MappingFactory factory)
DBDictionary
replaceMappingFactory
in class DBDictionary
public SchemaFactory replaceSchemaFactory(SchemaFactory factory)
DBDictionary
replaceSchemaFactory
in class DBDictionary
public boolean supportsAutoIncrement()
DBDictionary
supportsAutoIncrement
in class DBDictionary
public String[] getCreateTableSQL(Table table)
DBDictionary
getCreateTableSQL
in class DBDictionary
public long getGeneratedKey(Column col, Connection conn) throws SQLException
getAutoIncrementSequenceName(kodo.jdbc.schema.Column)
.getGeneratedKey
in class DBDictionary
public String getAutoIncrementSequenceName(Column col)
getAutoIncrementSequenceName(kodo.jdbc.schema.Column)
, or else will
be "SEQ_[table name]".public String getAutoIncrementTriggerName(Column col)
public void setAutoIncrementSequenceName(String autoIncrementSequenceName)
public String getAutoIncrementSequenceName()
public void setUseTriggersForAutoIncrement(boolean useTriggersForAutoIncrement)
public boolean getUseTriggersForAutoIncrement()
public void putBytes(Object blob, byte[] data) throws SQLException
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.public void putString(Object clob, String data) throws SQLException
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.1.6 generated on August 25 2004 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |