Package org.apache.cayenne.dba.sybase
Class SybaseAdapter
java.lang.Object
org.apache.cayenne.dba.JdbcAdapter
org.apache.cayenne.dba.sybase.SybaseAdapter
- All Implemented Interfaces:
DbAdapter
DbAdapter implementation for Sybase RDBMS.
-
Field Summary
Fields inherited from class org.apache.cayenne.dba.JdbcAdapter
caseInsensitiveCollations, defaultCharColumnLength, ejbqlTranslator, extendedTypes, logger, nativeColumnTypes, quotingStrategy, supportsBatchUpdates, supportsGeneratedKeys, supportsUniqueConstraints -
Constructor Summary
ConstructorsConstructorDescriptionSybaseAdapter(RuntimeProperties runtimeProperties, List<ExtendedType> defaultExtendedTypes, List<ExtendedType> userExtendedTypes, List<ExtendedTypeFactory> extendedTypeFactories, ValueObjectTypeRegistry valueObjectTypeRegistry) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidbind(PreparedStatement statement, Object value, int psPosition, int psType, int psScale, ExtendedType binder) Binds a raw value to a statement parameter.protected voidInstalls appropriate ExtendedTypes as converters for passing values between JDBC and Java layers.protected EJBQLTranslatorCreates and returns anEJBQLTranslatorused to generate visitors for EJBQL to SQL translations.protected NativeColumnType[]Returns the database-native types supported by this adapter.Returns aSybasePkGenerator.protected QuotingStrategyvoidcreateTableAppendColumn(StringBuffer sqlBuffer, DbAttribute column) Overrides super implementation to correctly set up identity columns.Returns word "go".Methods inherited from class org.apache.cayenne.dba.JdbcAdapter
bindParameter, bindParameter, buildAttribute, createFkConstraint, createTable, createTableAppendPKClause, createUniqueConstraint, defaultCharColumnLength, dropTableStatements, externalTypesForJdbcType, getAction, getEjbqlTranslator, getExtendedTypes, getProcedureTranslator, getQuotingStrategy, getQuotingStrategy, getSelectTranslator, getSQLLogger, getSystemCatalogs, getSystemSchemas, getType, initExtendedTypes, nativeColumnTypes, setEjbqlTranslator, setEjbqlTranslatorFactory, setSupportsBatchUpdates, setSupportsGeneratedKeys, setSupportsUniqueConstraints, sizeAndPrecision, sizeAndScale, supportsBatchUpdates, supportsCatalogsOnReverseEngineering, supportsGeneratedKeys, supportsUniqueConstraints, tableTypeForTable, tableTypeForView, typeSupportsLength, typeSupportsScale, unwrapMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.cayenne.dba.DbAdapter
getEjbqlTranslatorFactory, preferredBindingType, preferredNativeColumnType, supportsGeneratedKeysForBatchInserts
-
Constructor Details
-
SybaseAdapter
public SybaseAdapter(RuntimeProperties runtimeProperties, List<ExtendedType> defaultExtendedTypes, List<ExtendedType> userExtendedTypes, List<ExtendedTypeFactory> extendedTypeFactories, ValueObjectTypeRegistry valueObjectTypeRegistry)
-
-
Method Details
-
createNativeTypes
Description copied from class:JdbcAdapterReturns the database-native types supported by this adapter.- Overrides:
createNativeTypesin classJdbcAdapter
-
createQuotingStrategy
- Overrides:
createQuotingStrategyin classJdbcAdapter
-
createEJBQLTranslator
Description copied from class:JdbcAdapterCreates and returns anEJBQLTranslatorused to generate visitors for EJBQL to SQL translations. This method should be overriden by subclasses that need to customize EJBQL generation.- Overrides:
createEJBQLTranslatorin classJdbcAdapter- Since:
- 3.0
-
createPkGenerator
Returns aSybasePkGenerator.- Specified by:
createPkGeneratorin interfaceDbAdapter- Overrides:
createPkGeneratorin classJdbcAdapter
-
getSqlTreeProcessor
- Specified by:
getSqlTreeProcessorin interfaceDbAdapter- Overrides:
getSqlTreeProcessorin classJdbcAdapter- Returns:
SQLTreeProcessorthat can adjust SQL tree to specific database flavour- Since:
- 4.2
-
getBatchTerminator
Returns word "go".- Specified by:
getBatchTerminatorin interfaceDbAdapter- Overrides:
getBatchTerminatorin classJdbcAdapter- Since:
- 1.0.4
-
configureExtendedTypes
Installs appropriate ExtendedTypes as converters for passing values between JDBC and Java layers.- Overrides:
configureExtendedTypesin classJdbcAdapter
-
bind
protected void bind(PreparedStatement statement, Object value, int psPosition, int psType, int psScale, ExtendedType binder) throws Exception Description copied from class:JdbcAdapterBinds a raw value to a statement parameter. This is the single extension point shared by bothbindParameteroverloads; adapters that need database-specific handling (e.g. of NULLs) should override this method rather than the public overloads.- Overrides:
bindin classJdbcAdapter- Throws:
Exception
-
createTableAppendColumn
Overrides super implementation to correctly set up identity columns.- Specified by:
createTableAppendColumnin interfaceDbAdapter- Overrides:
createTableAppendColumnin classJdbcAdapter- Parameters:
sqlBuffer- theStringBufferto append the column type tocolumn- theDbAttributedefining the column to append type for- Since:
- 1.2, 4.1 moved from SQLServerAdapter to SybaseAdapter as it supports this too
-