Oracle Fusion Middleware Java API Reference for Oracle TopLink (Deprecated)
11g Release 1 (11.1.1)

B32476-04

oracle.toplink.platform.database
Class SybasePlatform

java.lang.Object
  extended by oracle.toplink.internal.databaseaccess.DatasourcePlatform
      extended by oracle.toplink.internal.databaseaccess.DatabasePlatform
          extended by oracle.toplink.platform.database.DatabasePlatform
              extended by oracle.toplink.platform.database.SybasePlatform
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, oracle.toplink.internal.databaseaccess.Platform
Direct Known Subclasses:
SQLAnyWherePlatform

public class SybasePlatform
extends DatabasePlatform

Purpose: Provides Sybase specific behaviour.

Responsibilities:

Since:
TOPLink/Java 1.0
See Also:
Serialized Form

Field Summary
 
Fields inherited from class oracle.toplink.internal.databaseaccess.DatabasePlatform
DEFAULT_MAX_BATCH_WRITING_SIZE, DEFAULT_PARAMETERIZED_MAX_BATCH_WRITING_SIZE
 
Constructor Summary
SybasePlatform()
           
 
Method Summary
 java.lang.Object executeStoredProcedure(DatabaseCall dbCall, java.sql.PreparedStatement statement, DatabaseAccessor accessor, oracle.toplink.internal.sessions.AbstractSession session)
          because each platform has different requirements for accessing stored procedures and the way that we can combine resultsets and output params the stored procedure call is being executed on the platform.
 java.lang.String getBatchDelimiterString()
          Used for batch writing and sp defs.
 java.lang.String getCreationInOutputProcedureToken()
          This method is used to print the required output parameter token for the specific platform.
 java.lang.String getCreationOutputProcedureToken()
          This method is used to print the required output parameter token for the specific platform.
 java.lang.String getInOutputProcedureToken()
          This method is used to print the output parameter token when stored procedures are called
 java.util.Vector getNativeTableInfo(java.lang.String table, java.lang.String creator, oracle.toplink.internal.sessions.AbstractSession session)
          Return the catalog information through using the native SQL catalog selects.
 java.lang.String getOutputProcedureToken()
          This method is used to print the output parameter token when stored procedures are called
 java.lang.String getProcedureArgumentString()
          Used for sp defs.
 java.lang.String getProcedureCallHeader()
          Used for sp calls.
 java.lang.String getStoredProcedureParameterPrefix()
           
 ValueReadQuery getTimestampQuery()
          This method returns the query to select the timestamp from the server for Sybase.
 boolean isSybase()
           
 java.util.Hashtable maximumNumericValues()
          Builds a table of maximum numeric values keyed on java class.
 java.util.Hashtable minimumNumericValues()
          Builds a table of minimum numeric values keyed on java class.
 ExpressionOperator modOperator()
          Override the default MOD operator.
 void printFieldIdentityClause(java.io.Writer writer)
          Append the receiver's field 'identity' constraint clause to a writer.
 void printFieldNullClause(java.io.Writer writer)
          Append the receiver's field 'NULL' constraint clause to a writer.
 void registerOutputParameter(java.sql.CallableStatement statement, int index, int jdbcType)
          This method is used to register output parameter on Callable Statements for Stored Procedures as each database seems to have a different method.
 boolean requiresProcedureCallBrackets()
          USed for sp calls.
 boolean requiresProcedureCallOuputToken()
          Used for sp calls.
 boolean shouldPrintInOutputTokenBeforeType()
          This is required in the construction of the stored procedures with output parameters
 boolean shouldPrintOuterJoinInWhereClause()
          Some database require outer joins to be given in the where clause, others require it in the from clause.
 boolean shouldPrintOutputTokenBeforeType()
          This is required in the construction of the stored procedures with output parameters
 boolean shouldUseJDBCOuterJoinSyntax()
          JDBC defines and outer join syntax, many drivers do not support this.
 
Methods inherited from class oracle.toplink.internal.databaseaccess.DatabasePlatform
addStructConverter, allowsSizeInProcedureArguments, appendParameter, appendParameterInternal, autoCommit, beginTransaction, buildProcedureCallString, commitTransaction, copyInto, executeBatch, getAssignmentString, getBatchBeginString, getBatchEndString, getClassTypes, getConstraintDeletionString, getCreateViewString, getCursorCode, getCustomModifyValueForCall, getFieldTypeDefinition, getFieldTypes, getFunctionCallHeader, getJDBCOuterJoinString, getJDBCType, getJDBCType, getMaxBatchWritingSize, getNoWaitString, getPingSQL, getProcedureArgumentSetter, getProcedureAsString, getProcedureBeginString, getProcedureCallTail, getProcedureEndString, getQualifiedSequenceTableName, getSelectForUpdateNoWaitString, getSelectForUpdateOfString, getSelectForUpdateString, getSequenceCounterFieldName, getSequenceNameFieldName, getSequencePreallocationSize, getSequenceTableName, getStatementCacheSize, getStringBindingSize, getTransactionIsolation, isInformixOuterJoin, prepareBatchStatement, printFieldNotNullClause, printFieldTypeSize, printFieldUnique, printValuelist, printValuelist, requiresNamedPrimaryKeyConstraints, rollbackTransaction, setCursorCode, setMaxBatchWritingSize, setPingSQL, setSequenceCounterFieldName, setSequenceNameFieldName, setSequenceTableName, setShouldBindAllParameters, setShouldCacheAllStatements, setShouldForceFieldNamesToUpperCase, setShouldIgnoreCaseOnFieldComparisons, setShouldOptimizeDataConversion, setShouldTrimStrings, setStatementCacheSize, setStringBindingSize, setSupportsAutoCommit, setTransactionIsolation, setUsesBatchWriting, setUsesByteArrayBinding, setUsesJDBCBatchWriting, setUsesNativeBatchWriting, setUsesNativeSQL, setUsesStreamsForBinding, setUsesStringBinding, shouldBindAllParameters, shouldCacheAllStatements, shouldForceFieldNamesToUpperCase, shouldIgnoreCaseOnFieldComparisons, shouldIgnoreException, shouldOptimizeDataConversion, shouldPrintConstraintNameAfter, shouldPrintFieldIdentityClause, shouldPrintOutputTokenAtStart, shouldTrimStrings, shouldUseCustomModifyForCall, supportsAutoCommit, supportsForeignKeyConstraints, supportsNativeSequenceNumbers, supportsPrimaryKeyConstraint, supportsStoredFunctions, supportsUniqueKeyConstraints, usesBatchWriting, usesByteArrayBinding, usesJDBCBatchWriting, usesNativeBatchWriting, usesNativeSQL, usesSequenceTable, usesStreamsForBinding, usesStringBinding, writeParameterMarker
 
Methods inherited from class oracle.toplink.internal.databaseaccess.DatasourcePlatform
addSequence, clone, convertObject, getConversionManager, getDataTypesConvertedFrom, getDataTypesConvertedTo, getDefaultSequence, getOperator, getPlatformOperators, getSelectSequenceQuery, getSequence, getTableQualifier, getTimestampFromServer, getUpdateSequenceQuery, hasDefaultSequence, isAccess, isAttunity, isCloudscape, isDB2, isDBase, isDerby, isHSQL, isInformix, isMySQL, isODBC, isOracle, isPointBase, isPostgreSQL, isSQLAnywhere, isSQLServer, isTimesTen, isTimesTen7, removeAllSequences, removeSequence, setConversionManager, setDefaultSequence, setSelectSequenceNumberQuery, setSequencePreallocationSize, setTableQualifier, setTimestampQuery, setUpdateSequenceQuery, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SybasePlatform

public SybasePlatform()
Method Detail

executeStoredProcedure

public java.lang.Object executeStoredProcedure(DatabaseCall dbCall,
                                               java.sql.PreparedStatement statement,
                                               DatabaseAccessor accessor,
                                               oracle.toplink.internal.sessions.AbstractSession session)
                                        throws java.sql.SQLException
because each platform has different requirements for accessing stored procedures and the way that we can combine resultsets and output params the stored procedure call is being executed on the platform. This entire process needs some serious refactoring to eliminate the chance of bugs.

Overrides:
executeStoredProcedure in class oracle.toplink.internal.databaseaccess.DatabasePlatform
Throws:
java.sql.SQLException

getBatchDelimiterString

public java.lang.String getBatchDelimiterString()
Used for batch writing and sp defs.

Overrides:
getBatchDelimiterString in class oracle.toplink.internal.databaseaccess.DatabasePlatform

getCreationInOutputProcedureToken

public java.lang.String getCreationInOutputProcedureToken()
Description copied from class: oracle.toplink.internal.databaseaccess.DatabasePlatform
This method is used to print the required output parameter token for the specific platform. Used when stored procedures are created.

Overrides:
getCreationInOutputProcedureToken in class oracle.toplink.internal.databaseaccess.DatabasePlatform

getCreationOutputProcedureToken

public java.lang.String getCreationOutputProcedureToken()
Description copied from class: oracle.toplink.internal.databaseaccess.DatabasePlatform
This method is used to print the required output parameter token for the specific platform. Used when stored procedures are created.

Overrides:
getCreationOutputProcedureToken in class oracle.toplink.internal.databaseaccess.DatabasePlatform

getInOutputProcedureToken

public java.lang.String getInOutputProcedureToken()
Description copied from class: oracle.toplink.internal.databaseaccess.DatabasePlatform
This method is used to print the output parameter token when stored procedures are called

Overrides:
getInOutputProcedureToken in class oracle.toplink.internal.databaseaccess.DatabasePlatform

getNativeTableInfo

public java.util.Vector getNativeTableInfo(java.lang.String table,
                           java.lang.String creator,
                           oracle.toplink.internal.sessions.AbstractSession session)
Return the catalog information through using the native SQL catalog selects. This is required because many JDBC driver do not support meta-data. Willcards can be passed as arguments.


getOutputProcedureToken

public java.lang.String getOutputProcedureToken()
Description copied from class: oracle.toplink.internal.databaseaccess.DatabasePlatform
This method is used to print the output parameter token when stored procedures are called

Overrides:
getOutputProcedureToken in class oracle.toplink.internal.databaseaccess.DatabasePlatform

getProcedureArgumentString

public java.lang.String getProcedureArgumentString()
Used for sp defs.

Overrides:
getProcedureArgumentString in class oracle.toplink.internal.databaseaccess.DatabasePlatform

getProcedureCallHeader

public java.lang.String getProcedureCallHeader()
Used for sp calls.

Overrides:
getProcedureCallHeader in class oracle.toplink.internal.databaseaccess.DatabasePlatform

getStoredProcedureParameterPrefix

public java.lang.String getStoredProcedureParameterPrefix()
Overrides:
getStoredProcedureParameterPrefix in class oracle.toplink.internal.databaseaccess.DatabasePlatform

getTimestampQuery

public ValueReadQuery getTimestampQuery()
This method returns the query to select the timestamp from the server for Sybase.

Specified by:
getTimestampQuery in interface oracle.toplink.internal.databaseaccess.Platform
Overrides:
getTimestampQuery in class oracle.toplink.internal.databaseaccess.DatasourcePlatform

isSybase

public boolean isSybase()
Specified by:
isSybase in interface oracle.toplink.internal.databaseaccess.Platform
Overrides:
isSybase in class oracle.toplink.internal.databaseaccess.DatasourcePlatform

maximumNumericValues

public java.util.Hashtable maximumNumericValues()
Builds a table of maximum numeric values keyed on java class. This is used for type testing but might also be useful to end users attempting to sanitize values.

NOTE: BigInteger & BigDecimal maximums are dependent upon their precision & Scale

Overrides:
maximumNumericValues in class oracle.toplink.internal.databaseaccess.DatabasePlatform

minimumNumericValues

public java.util.Hashtable minimumNumericValues()
Builds a table of minimum numeric values keyed on java class. This is used for type testing but might also be useful to end users attempting to sanitize values.

NOTE: BigInteger & BigDecimal minimums are dependent upon their precision & Scale

Overrides:
minimumNumericValues in class oracle.toplink.internal.databaseaccess.DatabasePlatform

modOperator

public ExpressionOperator modOperator()
Override the default MOD operator.


printFieldIdentityClause

public void printFieldIdentityClause(java.io.Writer writer)
                              throws ValidationException
Append the receiver's field 'identity' constraint clause to a writer.

Overrides:
printFieldIdentityClause in class oracle.toplink.internal.databaseaccess.DatabasePlatform
Throws:
ValidationException

printFieldNullClause

public void printFieldNullClause(java.io.Writer writer)
                          throws ValidationException
Append the receiver's field 'NULL' constraint clause to a writer.

Overrides:
printFieldNullClause in class oracle.toplink.internal.databaseaccess.DatabasePlatform
Throws:
ValidationException

registerOutputParameter

public void registerOutputParameter(java.sql.CallableStatement statement,
                                    int index,
                                    int jdbcType)
                             throws java.sql.SQLException
This method is used to register output parameter on Callable Statements for Stored Procedures as each database seems to have a different method.

Overrides:
registerOutputParameter in class oracle.toplink.internal.databaseaccess.DatabasePlatform
Throws:
java.sql.SQLException

requiresProcedureCallBrackets

public boolean requiresProcedureCallBrackets()
USed for sp calls.

Overrides:
requiresProcedureCallBrackets in class oracle.toplink.internal.databaseaccess.DatabasePlatform

requiresProcedureCallOuputToken

public boolean requiresProcedureCallOuputToken()
Used for sp calls. Sybase must print output after output params.

Overrides:
requiresProcedureCallOuputToken in class oracle.toplink.internal.databaseaccess.DatabasePlatform

shouldPrintInOutputTokenBeforeType

public boolean shouldPrintInOutputTokenBeforeType()
Description copied from class: oracle.toplink.internal.databaseaccess.DatabasePlatform
This is required in the construction of the stored procedures with output parameters

Overrides:
shouldPrintInOutputTokenBeforeType in class oracle.toplink.internal.databaseaccess.DatabasePlatform

shouldPrintOuterJoinInWhereClause

public boolean shouldPrintOuterJoinInWhereClause()
Some database require outer joins to be given in the where clause, others require it in the from clause.

Overrides:
shouldPrintOuterJoinInWhereClause in class oracle.toplink.internal.databaseaccess.DatabasePlatform

shouldPrintOutputTokenBeforeType

public boolean shouldPrintOutputTokenBeforeType()
Description copied from class: oracle.toplink.internal.databaseaccess.DatabasePlatform
This is required in the construction of the stored procedures with output parameters

Overrides:
shouldPrintOutputTokenBeforeType in class oracle.toplink.internal.databaseaccess.DatabasePlatform

shouldUseJDBCOuterJoinSyntax

public boolean shouldUseJDBCOuterJoinSyntax()
JDBC defines and outer join syntax, many drivers do not support this. So we normally avoid it.

Overrides:
shouldUseJDBCOuterJoinSyntax in class oracle.toplink.internal.databaseaccess.DatabasePlatform

Copyright © 1998, 2012, Oracle. All Rights Reserved.