com.solarmetric.kodo.impl.jdbc.schema.dict
Class OracleDictionary
java.lang.Object
|
+--com.solarmetric.kodo.impl.jdbc.schema.dict.AbstractDictionary
|
+--com.solarmetric.kodo.impl.jdbc.schema.dict.OracleDictionary
- All Implemented Interfaces:
- DBDictionary
- public class OracleDictionary
- extends AbstractDictionary
Implementation of the DBDictionary interface for Oracle.
|
Method Summary |
Object |
blobFromSQL(ResultSet rs,
int column)
|
void |
blobToPreparedParameter(PreparedStatement st,
int i,
Object o)
|
Object |
blobToSQL(Object val)
|
String |
clobFromSQL(ResultSet rs,
int column)
|
void |
clobToPreparedParameter(PreparedStatement st,
int i,
Object clob)
|
Object |
clobToSQL(Object val)
|
ResultSet |
getColumns(String tableName,
Connection conn)
Oracle is very slow when retrieving column information from
DatabaseMetaData. |
SQLBuffer[] |
getDropColumnSQL(Column column)
Return a series of SQL statements to drop the given column from
its table, including the deletion of any indices from the column. |
Class[] |
getFieldMappingCandidateClasses()
Returns a list of possible FieldMapping classes for
use with this DBDictionary. |
String |
getPlatform()
Return the title of this database platform, used for display only. |
protected void |
setupSQLTypeMap(SQLTypeMap map)
This is the most commonly overridden method when porting to a new
database. |
boolean |
supportsUpdateCountsForBatch()
Oracle always returns an array of -2 values for any call
to Statement.executeBatch(). |
SQLBuffer |
toSelect(String[] cols,
String[] tables,
SQLBuffer where,
SQLBuffer order,
boolean distinct,
boolean update)
Appends the given pieces using standard SQL. |
| Methods inherited from class com.solarmetric.kodo.impl.jdbc.schema.dict.AbstractDictionary |
addForUpdateClause, bigDecimalFromSQL, bigDecimalToPreparedParameter, bigDecimalToSQL, bigIntegerFromSQL, bigIntegerToPreparedParameter, bigIntegerToSQL, booleanFromSQL, booleanToPreparedParameter, booleanToSQL, byteFromSQL, byteToPreparedParameter, byteToSQL, characterToPreparedParameter, charFromSQL, charToSQL, colsToString, dateFromSQL, dateToPreparedParameter, dateToSQL, dateToTimestamp, doubleFromSQL, doubleToPreparedParameter, doubleToSQL, floatFromSQL, floatToPreparedParameter, floatToSQL, fromSQL, getAddColumnSQL, getClassMappingCandidateClasses, getColumnDeclaration, getCreateIndexSQL, getCreateTableSQL, getDatePrecision, getDBMetaData, getDropIndexSQL, getDropTableSQL, getMaxColumnNameLength, getMaxIndexNameLength, getMaxTableNameLength, getNameTruncationVersion, getQuoteNumbers, getSchemaName, getSimulateLocking, getSQLTypeMap, getStoreCharsAsStrings, getStoreLargeNumbersAsStrings, getTables, getValidateConnections, getValidateConnectionSQL, getValidColumnName, getValidIndexName, getValidTableName, initTypeMap, intFromSQL, intToPreparedParameter, intToSQL, isClosed, localeFromSQL, localeToPreparedParameter, localeToSQL, longFromSQL, longToPreparedParameter, longToSQL, objectFromSQL, objectToPreparedParameter, objectToSQL, prepareLargeNumberAsString, setColumnNameGenerator, setCursorName, setDBMetaData, setIndexNameGenerator, setMaxColumnNameLength, setMaxIndexNameLength, setMaxTableNameLength, setNameTruncationVersion, setNullParameter, setQuoteNumbers, setSchemaName, setSimulateLocking, setStoreCharsAsStrings, setStoreLargeNumbersAsStrings, setTableNameGenerator, setTransactionIsolation, setValidateConnections, setValidateConnectionSQL, shortFromSQL, shortToPreparedParameter, shortToSQL, stringFromSQL, stringToPreparedParameter, stringToSQL, supportsLocking, tablesToString, toPreparedParameter, toSelect, toSelect, toSQL |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
EMPTY_BLOB_STRING
public static final String EMPTY_BLOB_STRING
EMPTY_CLOB_STRING
public static final String EMPTY_CLOB_STRING
OracleDictionary
public OracleDictionary()
getPlatform
public String getPlatform()
- Description copied from class:
AbstractDictionary
- Return the title of this database platform, used for display only.
- Overrides:
getPlatform in class AbstractDictionary
blobToSQL
public Object blobToSQL(Object val)
- Overrides:
blobToSQL in class AbstractDictionary
clobToSQL
public Object clobToSQL(Object val)
- Overrides:
clobToSQL in class AbstractDictionary
blobFromSQL
public Object blobFromSQL(ResultSet rs,
int column)
throws SQLException
- Overrides:
blobFromSQL in class AbstractDictionary
blobToPreparedParameter
public void blobToPreparedParameter(PreparedStatement st,
int i,
Object o)
throws SQLException
- Overrides:
blobToPreparedParameter in class AbstractDictionary
clobFromSQL
public String clobFromSQL(ResultSet rs,
int column)
throws SQLException
- Overrides:
clobFromSQL in class AbstractDictionary
clobToPreparedParameter
public void clobToPreparedParameter(PreparedStatement st,
int i,
Object clob)
throws SQLException
- Overrides:
clobToPreparedParameter in class AbstractDictionary
getDropColumnSQL
public SQLBuffer[] getDropColumnSQL(Column column)
- Description copied from interface:
DBDictionary
- Return a series of SQL statements to drop the given column from
its table, including the deletion of any indices from the column.
- Overrides:
getDropColumnSQL in class AbstractDictionary
toSelect
public SQLBuffer toSelect(String[] cols,
String[] tables,
SQLBuffer where,
SQLBuffer order,
boolean distinct,
boolean update)
- Description copied from class:
AbstractDictionary
- Appends the given pieces using standard SQL.
- Overrides:
toSelect in class AbstractDictionary
- Following copied from interface:
com.solarmetric.kodo.impl.jdbc.schema.DBDictionary
- Parameters:
cols - list of values the columns to selecttables - list of the tables to select fromwhere - the WHERE conditions; may be null if noneorder - the ORDER BY conditions; may be null if nonedistinct - if true, this should be a SELECT DISTINCT-equivalent
queryupdate - if true this should be a SELECT FOR
UPDATE-equivalent query
setupSQLTypeMap
protected void setupSQLTypeMap(SQLTypeMap map)
- Description copied from class:
AbstractDictionary
- This is the most commonly overridden method when porting to a new
database. Most databases have different mappings between java and SQL
types; this method can be used to setup the mappings for the database
being ported.
- Overrides:
setupSQLTypeMap in class AbstractDictionary
getFieldMappingCandidateClasses
public Class[] getFieldMappingCandidateClasses()
- Description copied from interface:
DBDictionary
- Returns a list of possible
FieldMapping classes for
use with this DBDictionary.
- Overrides:
getFieldMappingCandidateClasses in class AbstractDictionary
getColumns
public ResultSet getColumns(String tableName,
Connection conn)
throws SQLException
- Oracle is very slow when retrieving column information from
DatabaseMetaData. Since we only need the
"COLUMN_NAME" and "TABLE_NAME" fields as the contract for
this method, we merely return the the result of the following
SQL:
SELECT TABLE_NAME, COLUMN_NAME FROM USER_TAB_COLUMNS WHERE
TABLE_NAME LIKE 'tableName'
- Overrides:
getColumns in class AbstractDictionary
supportsUpdateCountsForBatch
public boolean supportsUpdateCountsForBatch()
- Oracle always returns an array of -2 values for any call
to
Statement.executeBatch().
- Overrides:
supportsUpdateCountsForBatch in class AbstractDictionary
Copyright 2001,2002 SolarMetric, Inc. All Rights Reserved.