SolarMetric Kodo JDO 2.5.8 generated on January 11 2004

com.solarmetric.kodo.impl.jdbc.schema.dict
Class SQLServerDictionary

java.lang.Object
  |
  +--com.solarmetric.kodo.impl.jdbc.schema.dict.AbstractDictionary
        |
        +--com.solarmetric.kodo.impl.jdbc.schema.dict.SQLServerDictionary
All Implemented Interfaces:
DBDictionary

public class SQLServerDictionary
extends AbstractDictionary

Implementation of the DBDictionary interface for MS SQLServer.


Fields inherited from class com.solarmetric.kodo.impl.jdbc.schema.dict.AbstractDictionary
CENTI, DECI, meta, MICRO, MILLI, NANO, NUMBER_FORMAT, SEC
 
Constructor Summary
SQLServerDictionary()
           
 
Method Summary
 void blobToPreparedParameter(PreparedStatement st, int index, Object val)
           
 void clobToPreparedParameter(PreparedStatement st, int index, Object val)
           
 void createdSQLExecutionManager(SQLExecutionManager sqlem)
          Perform any necessary configuration of the newly created SQLExecutionManager.
protected  SQLBuffer getColumnDeclaration(Column column)
          This method can be overridden if the database does not support standard column declarations, which are in the form: <column-name> <sql-type> [NOT NULL].
 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.
protected  SQLBuffer getDropIndexSQL(Index index)
          Return the SQL to drop an index.
 long getNextAutoIncrementValue(Table table, SQLExecutionManager sqlem)
          Returns the next auto-increment value for a given table.
 String getPlatform()
          Return the title of this database platform, used for display only.
protected  String rebuildTableString(String sql)
           
protected  void setupSQLTypeMap(SQLTypeMap map)
          This is the most commonly overridden method when porting to a new database.
 boolean supportsAutoIncrement()
          Returns true if this dictionary / database combination supports auto-incrementing primary-key columns.
protected  String tablesToString(String[] array, boolean update)
           
 SQLBuffer toSelect(String[] cols, String[] tables, SQLBuffer where, SQLBuffer order, boolean distinct, boolean update)
          SQLServer uses a non-standard locking mechanism.
 void validateConfiguration(JDBCConfiguration conf, DBMetaData meta)
          Raise a warning if the ConnectionURL does not have the special "SelectMethod=cursor" parameter.
 
Methods inherited from class com.solarmetric.kodo.impl.jdbc.schema.dict.AbstractDictionary
, addForUpdateClause, bigDecimalFromSQL, bigDecimalToPreparedParameter, bigDecimalToSQL, bigIntegerFromSQL, bigIntegerToPreparedParameter, bigIntegerToSQL, blobFromSQL, blobToSQL, booleanFromSQL, booleanToPreparedParameter, booleanToSQL, byteFromSQL, byteToPreparedParameter, byteToSQL, characterToPreparedParameter, charFromSQL, charToSQL, clobFromSQL, clobToSQL, colsToString, dateFromSQL, dateToPreparedParameter, dateToSQL, dateToTimestamp, deserialize, deserialize, doubleFromSQL, doubleToPreparedParameter, doubleToSQL, dropTableDropsIndices, floatFromSQL, floatToPreparedParameter, floatToSQL, fromSQL, getAddColumnSQL, getClassMappingCandidateClasses, getColumns, getCreateIndexSQL, getCreateTableSQL, getCreateTableSuffix, getDatePrecision, getDBMetaData, getDropTableSQL, getFieldMappingCandidateClasses, getMaxColumnNameLength, getMaxIndexNameLength, getMaxTableNameLength, getNameTruncationVersion, getNonSQL92LeftOuterJoin, getPrimaryKeyClause, getQuoteNumbers, getSchemaName, getSimulateLocking, getSQLTypeMap, getStoreCharsAsStrings, getStoreLargeNumbersAsStrings, getSupportedResultSetType, getTables, getValidateConnections, getValidateConnectionSQL, getValidColumnName, getValidIndexName, getValidTableName, initTypeMap, intFromSQL, intToPreparedParameter, intToSQL, isClosed, localeFromSQL, localeToPreparedParameter, localeToSQL, longFromSQL, longToPreparedParameter, longToSQL, objectFromSQL, objectToPreparedParameter, objectToSQL, prepareLargeNumberAsString, prepareStatement, serialize, setColumnNameGenerator, setCreateTableSuffix, setDBMetaData, setIndexNameGenerator, setMaxColumnNameLength, setMaxIndexNameLength, setMaxTableNameLength, setNameTruncationVersion, setNullParameter, setQuoteNumbers, setSchemaName, setSimulateLocking, setStoreCharsAsStrings, setStoreLargeNumbersAsStrings, setTableNameGenerator, setTransactionIsolation, setValidateConnections, setValidateConnectionSQL, shortFromSQL, shortToPreparedParameter, shortToSQL, stringFromSQL, stringToPreparedParameter, stringToSQL, supportsLocking, supportsNonSQL92LeftOuterJoins, supportsUpdateCountsForBatch, tablesToString, timestampFromSQL, toPreparedParameter, toSelect, toSelect, toSQL, truncate, truncate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SQLServerDictionary

public SQLServerDictionary()
Method Detail

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

toSelect

public SQLBuffer toSelect(String[] cols,
                          String[] tables,
                          SQLBuffer where,
                          SQLBuffer order,
                          boolean distinct,
                          boolean update)
SQLServer uses a non-standard locking mechanism.
Overrides:
toSelect in class AbstractDictionary
Following copied from interface: com.solarmetric.kodo.impl.jdbc.schema.DBDictionary
Parameters:
cols - list of values the columns to select
tables - list of the tables to select from
where - the WHERE conditions; may be null if none
order - the ORDER BY conditions; may be null if none
distinct - if true, this should be a SELECT DISTINCT-equivalent query
update - if true this should be a SELECT FOR UPDATE-equivalent query

tablesToString

protected String tablesToString(String[] array,
                                boolean update)

rebuildTableString

protected String rebuildTableString(String sql)

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

getDropIndexSQL

protected SQLBuffer getDropIndexSQL(Index index)
Description copied from class: AbstractDictionary
Return the SQL to drop an index. Defaults to: DROP INDEX <index-name>
Overrides:
getDropIndexSQL 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

clobToPreparedParameter

public void clobToPreparedParameter(PreparedStatement st,
                                    int index,
                                    Object val)
                             throws SQLException
Overrides:
clobToPreparedParameter in class AbstractDictionary

blobToPreparedParameter

public void blobToPreparedParameter(PreparedStatement st,
                                    int index,
                                    Object val)
                             throws SQLException
Overrides:
blobToPreparedParameter in class AbstractDictionary

createdSQLExecutionManager

public void createdSQLExecutionManager(SQLExecutionManager sqlem)
Description copied from interface: DBDictionary
Perform any necessary configuration of the newly created SQLExecutionManager. Typically, this involves installing database-specific SQLExecutionListeners.
Overrides:
createdSQLExecutionManager in class AbstractDictionary

supportsAutoIncrement

public boolean supportsAutoIncrement()
Description copied from interface: DBDictionary
Returns true if this dictionary / database combination supports auto-incrementing primary-key columns.
Overrides:
supportsAutoIncrement in class AbstractDictionary

getNextAutoIncrementValue

public long getNextAutoIncrementValue(Table table,
                                      SQLExecutionManager sqlem)
                               throws SQLException
Description copied from interface: DBDictionary
Returns the next auto-increment value for a given table.
Overrides:
getNextAutoIncrementValue in class AbstractDictionary

getColumnDeclaration

protected SQLBuffer getColumnDeclaration(Column column)
Description copied from class: AbstractDictionary
This method can be overridden if the database does not support standard column declarations, which are in the form: <column-name> <sql-type> [NOT NULL]. Where NOT NULL is appended if it is a primary key column.
Overrides:
getColumnDeclaration in class AbstractDictionary

validateConfiguration

public void validateConfiguration(JDBCConfiguration conf,
                                  DBMetaData meta)
Raise a warning if the ConnectionURL does not have the special "SelectMethod=cursor" parameter.
Overrides:
validateConfiguration in class AbstractDictionary

SolarMetric Kodo JDO 2.5.8 generated on January 11 2004

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