com.solarmetric.kodo.impl.jdbc.schema.dict
Class SybaseDictionary
java.lang.Object
|
+--com.solarmetric.kodo.impl.jdbc.schema.dict.AbstractDictionary
|
+--com.solarmetric.kodo.impl.jdbc.schema.dict.SybaseDictionary
- All Implemented Interfaces:
- DBDictionary
- public class SybaseDictionary
- extends AbstractDictionary
Implementation of the DBDictionary interface for Sybase
|
Method Summary |
SQLBuffer |
addForUpdateClause(SQLBuffer buffer,
String[] cols,
String[] tables,
SQLBuffer where,
SQLBuffer order,
boolean distinct,
boolean update)
Sybase requires that a "FOR UPDATE" clause include each of the
column names as well as appending a
"AT ISOLATION SERIALIZABLE" clause. |
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. |
String |
getPlatform()
Return the title of this database platform, used for display only. |
void |
setNullParameter(PreparedStatement st,
int index,
int type)
Since Sybase does not support Types#BLOB or
Types#CLOB, we override the setNull method
to Types#VARCHAR and Types#VARBINARY, respectively. |
protected void |
setupSQLTypeMap(SQLTypeMap map)
This is the most commonly overridden method when porting to a new
database. |
| Methods inherited from class com.solarmetric.kodo.impl.jdbc.schema.dict.AbstractDictionary |
bigDecimalFromSQL, bigDecimalToPreparedParameter, bigDecimalToSQL, bigIntegerFromSQL, bigIntegerToPreparedParameter, bigIntegerToSQL, blobFromSQL, blobToPreparedParameter, blobToSQL, booleanFromSQL, booleanToPreparedParameter, booleanToSQL, byteFromSQL, byteToPreparedParameter, byteToSQL, characterToPreparedParameter, charFromSQL, charToSQL, clobFromSQL, clobToPreparedParameter, clobToSQL, colsToString, dateFromSQL, dateToPreparedParameter, dateToSQL, dateToTimestamp, doubleFromSQL, doubleToPreparedParameter, doubleToSQL, floatFromSQL, floatToPreparedParameter, floatToSQL, fromSQL, getAddColumnSQL, getClassMappingCandidateClasses, getColumns, getCreateIndexSQL, getCreateTableSQL, getDatePrecision, getDBMetaData, getDropTableSQL, getFieldMappingCandidateClasses, 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, setQuoteNumbers, setSchemaName, setSimulateLocking, setStoreCharsAsStrings, setStoreLargeNumbersAsStrings, setTableNameGenerator, setTransactionIsolation, setValidateConnections, setValidateConnectionSQL, shortFromSQL, shortToPreparedParameter, shortToSQL, stringFromSQL, stringToPreparedParameter, stringToSQL, supportsLocking, supportsUpdateCountsForBatch, tablesToString, toPreparedParameter, toSelect, toSelect, toSelect, toSQL |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SybaseDictionary
public SybaseDictionary()
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
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
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
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
addForUpdateClause
public SQLBuffer addForUpdateClause(SQLBuffer buffer,
String[] cols,
String[] tables,
SQLBuffer where,
SQLBuffer order,
boolean distinct,
boolean update)
- Sybase requires that a "FOR UPDATE" clause include each of the
column names as well as appending a
"AT ISOLATION SERIALIZABLE" clause.
- Overrides:
addForUpdateClause in class AbstractDictionary
setNullParameter
public void setNullParameter(PreparedStatement st,
int index,
int type)
throws SQLException
- Since Sybase does not support
Types#BLOB or
Types#CLOB, we override the setNull method
to Types#VARCHAR and Types#VARBINARY, respectively.
- Overrides:
setNullParameter in class AbstractDictionary
- Since:
- 2.4.1
Copyright 2001,2002 SolarMetric, Inc. All Rights Reserved.