EclipseLink 2.5.0, build 'v20130507-3faac2b' API Reference

org.eclipse.persistence.platform.database
Class HANAPlatform

java.lang.Object
  extended by org.eclipse.persistence.internal.databaseaccess.DatasourcePlatform
      extended by org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
          extended by org.eclipse.persistence.platform.database.DatabasePlatform
              extended by org.eclipse.persistence.platform.database.HANAPlatform
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, org.eclipse.persistence.internal.core.databaseaccess.CorePlatform<org.eclipse.persistence.internal.helper.ConversionManager>, org.eclipse.persistence.internal.databaseaccess.Platform

public final class HANAPlatform
extends DatabasePlatform

Database Platform for SAP HANA

Feature Testing
----------------------


Limitations
----------------

See Also:
Serialized Form
Author:
Reiner Singer (SAP AG), Sabine Heider (SAP AG)

Field Summary
 
Fields inherited from class org.eclipse.persistence.platform.database.DatabasePlatform
DEFAULT_VARCHAR_SIZE
 
Fields inherited from class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
batchWritingMechanism, castSizeForVarcharParameter, classTypes, cursorCode, DEFAULT_MAX_BATCH_WRITING_SIZE, DEFAULT_PARAMETERIZED_MAX_BATCH_WRITING_SIZE, driverName, fieldTypes, IS_VALID_TIMEOUT, isCastRequired, maxBatchWritingSize, partitioningCallback, pingSQL, printInnerJoinInWhereClause, printOuterJoinInWhereClause, shouldBindAllParameters, shouldBindLiterals, shouldCacheAllStatements, shouldCreateIndicesOnForeignKeys, shouldForceFieldNamesToUpperCase, shouldIgnoreCaseOnFieldComparisons, shouldOptimizeDataConversion, shouldTrimStrings, statementCacheSize, stringBindingSize, structConverters, supportsAutoCommit, tableCreationSuffix, transactionIsolation, typeConverters, Types_NCLOB, Types_SQLXML, useJDBCStoredProcedureSyntax, useRownumFiltering, usesBatchWriting, usesByteArrayBinding, usesJDBCBatchWriting, usesNativeBatchWriting, usesNativeSQL, usesStreamsForBinding, usesStringBinding
 
Fields inherited from class org.eclipse.persistence.internal.databaseaccess.DatasourcePlatform
conversionManager, dataTypesConvertedFromAClass, dataTypesConvertedToAClass, defaultNativeSequenceToTable, defaultSequence, endDelimiter, platformOperators, sequences, sequencesLock, startDelimiter, tableQualifier, timestampQuery
 
Constructor Summary
HANAPlatform()
           
 
Method Summary
protected  void appendCalendar(java.util.Calendar calendar, java.io.Writer writer)
           
protected  void appendDate(java.sql.Date date, java.io.Writer writer)
           
protected  void appendTime(java.sql.Time time, java.io.Writer writer)
           
protected  void appendTimestamp(java.sql.Timestamp timestamp, java.io.Writer writer)
           
protected  java.util.Hashtable buildFieldTypes()
           
 ValueReadQuery buildSelectQueryForSequenceObject(java.lang.String sequenceName, java.lang.Integer size)
           
 boolean canBatchWriteWithOptimisticLocking(org.eclipse.persistence.internal.databaseaccess.DatabaseCall call)
           
 int computeMaxRowsForSQL(int firstResultIndex, int maxResults)
           
static ExpressionOperator createLocate2Operator()
          INTERNAL: Build locate operator with 3 params i.e.
static ExpressionOperator createLocateOperator()
          INTERNAL: Build locate operator i.e.
 int executeBatch(java.sql.Statement statement, boolean isStatementPrepared)
           
protected  java.lang.String getCreateTempTableSqlPrefix()
           
 java.lang.String getInputProcedureToken()
          Used for stored procedure creation: Prefix for INPUT parameters.
 int getMaxFieldNameSize()
           
 java.lang.String getOutputProcedureToken()
          This method is used to print the output parameter token when stored procedures are called
 java.lang.String getProcedureCallTail()
          Used for sp calls.
 org.eclipse.persistence.internal.helper.DatabaseTable getTempTableForTable(org.eclipse.persistence.internal.helper.DatabaseTable table)
           
protected  void initializePlatformOperators()
           
 boolean isForUpdateCompatibleWithDistinct()
           
 boolean isHANA()
           
protected  void printFieldTypeSize(java.io.Writer writer, FieldDefinition field, org.eclipse.persistence.internal.databaseaccess.FieldTypeDefinition fieldType)
           
 void printSQLSelectStatement(org.eclipse.persistence.internal.databaseaccess.DatabaseCall call, org.eclipse.persistence.internal.expressions.ExpressionSQLPrinter printer, org.eclipse.persistence.internal.expressions.SQLSelectStatement statement)
           
 boolean requiresProcedureCallOuputToken()
           
 boolean requiresUniqueConstraintCreationOnTableCreate()
           
 boolean shouldAlwaysUseTempStorageForModifyAll()
           
 boolean shouldBindLiterals()
           
 boolean shouldOptimizeDataConversion()
           
 boolean shouldPrintOuterJoinInWhereClause()
           
 boolean shouldPrintStoredProcedureArgumentNameInCall()
          INTERNAL: Should the variable name of a stored procedure call be printed as part of the procedure call e.g.
protected  boolean shouldTempTableSpecifyPrimaryKeys()
           
 boolean shouldUseJDBCOuterJoinSyntax()
           
 boolean supportsForeignKeyConstraints()
           
 boolean supportsGlobalTempTables()
           
 boolean supportsIndividualTableLocking()
           
 boolean supportsLocalTempTables()
           
 boolean supportsNativeSequenceNumbers()
           
 boolean supportsSequenceObjects()
           
 boolean supportsStoredFunctions()
           
 boolean usesStringBinding()
           
 void writeAddColumnClause(java.io.Writer writer, org.eclipse.persistence.internal.sessions.AbstractSession session, TableDefinition table, FieldDefinition field)
           
 
Methods inherited from class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
addBatch, addStructConverter, allowsSizeInProcedureArguments, appendBoolean, appendByteArray, appendLiteralToCall, appendLiteralToCallWithBinding, appendNumber, appendParameter, appendParameterInternal, appendString, autoCommit, beginTransaction, buildBatchCriteria, buildBatchCriteriaForComplexId, buildCallWithReturning, buildClassTypes, buildCreateIndex, buildCreateIndex, buildDropIndex, buildDropIndex, buildProcedureCallString, buildSequenceObjectAlterIncrementWriter, buildSequenceObjectCreationWriter, buildSequenceObjectDeletionWriter, canBuildCallWithReturning, commitTransaction, convertToDatabaseType, copyInto, createArray, createArray, createPlatformDefaultSequence, createStruct, createStruct, dontBindUpdateAllQueryUsingTempTables, executeStoredProcedure, freeTemporaryObject, getAssignmentString, getBatchBeginString, getBatchDelimiterString, getBatchEndString, getBatchRowCountAssignString, getBatchRowCountDeclareString, getBatchRowCountReturnString, getBatchWritingMechanism, getCastSizeForVarcharParameter, getClassTypes, getConnection, getConstraintDeletionString, getCreateDatabaseSchemaString, getCreateTempTableSqlBodyForTable, getCreateTempTableSqlSuffix, getCreateViewString, getCreationInOutputProcedureToken, getCreationOutputProcedureToken, getCursorCode, getCustomModifyValueForCall, getDefaultSequenceTableName, getDropCascadeString, getDropDatabaseSchemaString, getFieldTypeDefinition, getFieldTypes, getFunctionCallHeader, getIdentifierQuoteCharacter, getIndexNamePrefix, getInOutputProcedureToken, getJDBCOuterJoinString, getJDBCType, getJDBCType, getJDBCTypeForSetNull, getJdbcTypeName, getMaxBatchWritingSize, getMaxForeignKeyNameSize, getMaxIndexNameSize, getMaxUniqueKeyNameSize, getNoWaitString, getObjectFromResultSet, getPartitioningCallback, getPingSQL, getProcedureArgumentSetter, getProcedureArgumentString, getProcedureAsString, getProcedureBeginString, getProcedureCallHeader, getProcedureEndString, getQualifiedName, getQualifiedSequenceTableName, getRefValue, getRefValue, getSelectForUpdateNoWaitString, getSelectForUpdateOfString, getSelectForUpdateString, getSelectForUpdateWaitString, getSequenceCounterFieldName, getSequenceNameFieldName, getSequencePreallocationSize, getSequenceTableName, getStatementCacheSize, getStoredProcedureParameterPrefix, getStoredProcedureTerminationToken, getStringBindingSize, getStructConverters, getTableCreationSuffix, getTransactionIsolation, getTypeConverters, getVPDClearIdentifierQuery, getVPDCreationFunctionString, getVPDCreationPolicyString, getVPDDeletionString, getVPDSetIdentifierQuery, hasPartitioningCallback, initialize, initializeConnectionData, isAlterSequenceObjectSupported, isCastRequired, isDynamicSQLRequiredForFunctions, isInformixOuterJoin, isJDBCExecuteCompliant, isLockTimeoutException, isNullAllowedInSelectClause, isRowCountOutputParameterRequired, isXDBDocument, maximumNumericValues, minimumNumericValues, minimumTimeIncrement, prepareBatchStatement, printFieldIdentityClause, printFieldNotNullClause, printFieldNullClause, printFieldTypeSize, printFieldUnique, printFieldUnique, printStoredFunctionReturnKeyWord, printValuelist, printValuelist, registerOutputParameter, requiresNamedPrimaryKeyConstraints, requiresProcedureBrackets, requiresProcedureCallBrackets, requiresTableInIndexDropDDL, requiresTypeNameToRegisterOutputParameter, retrieveFirstPrimaryKeyOrOne, rollbackTransaction, setBatchWritingMechanism, setCastSizeForVarcharParameter, setClassTypes, setCursorCode, setDriverName, setFieldTypes, setIsCastRequired, setMaxBatchWritingSize, setNullFromDatabaseField, setParameterValueInDatabaseCall, setPartitioningCallback, setPingSQL, setPrintInnerJoinInWhereClause, setPrintOuterJoinInWhereClause, setSequenceCounterFieldName, setSequenceNameFieldName, setSequenceTableName, setShouldBindAllParameters, setShouldBindLiterals, setShouldCacheAllStatements, setShouldCreateIndicesOnForeignKeys, setShouldForceFieldNamesToUpperCase, setShouldIgnoreCaseOnFieldComparisons, setShouldOptimizeDataConversion, setShouldTrimStrings, setShouldUseRownumFiltering, setStatementCacheSize, setStringBindingSize, setSupportsAutoCommit, setTableCreationSuffix, setTransactionIsolation, setUseJDBCStoredProcedureSyntax, setUsesBatchWriting, setUsesByteArrayBinding, setUsesJDBCBatchWriting, setUsesNativeBatchWriting, setUsesNativeSQL, setUsesStreamsForBinding, setUsesStringBinding, shouldBindAllParameters, shouldCacheAllStatements, shouldCreateIndicesForPrimaryKeys, shouldCreateIndicesOnForeignKeys, shouldCreateIndicesOnUniqueKeys, shouldForceFieldNamesToUpperCase, shouldIgnoreCaseOnFieldComparisons, shouldIgnoreException, shouldPrintAliasForUpdate, shouldPrintConstraintNameAfter, shouldPrintFieldIdentityClause, shouldPrintInnerJoinInWhereClause, shouldPrintInOutputTokenBeforeType, shouldPrintInputTokenAtStart, shouldPrintLockingClauseAfterWhereClause, shouldPrintOutputTokenAtStart, shouldPrintOutputTokenBeforeType, shouldPrintStoredProcedureVariablesAfterBeginString, shouldTrimStrings, shouldUseCustomModifyForCall, shouldUseRownumFiltering, supportsANSIInnerJoinSyntax, supportsAutoCommit, supportsAutoConversionToNumericForArithmeticOperations, supportsCountDistinctWithMultipleFields, supportsDeleteOnCascade, supportsIndexes, supportsLockingQueriesWithMultipleTables, supportsNestingOuterJoins, supportsOuterJoinsWithBrackets, supportsPrimaryKeyConstraint, supportsTempTables, supportsUniqueColumns, supportsUniqueKeyConstraints, supportsVPD, usesBatchWriting, usesByteArrayBinding, usesJDBCBatchWriting, usesNativeBatchWriting, usesNativeSQL, usesSequenceTable, usesStreamsForBinding, wasFailureCommunicationBased, writeAutoAssignmentSetClause, writeAutoJoinWhereClause, writeCleanUpTempTableSql, writeCreateTempTableSql, writeDeleteFromTargetTableUsingTempTableSql, writeFields, writeFieldsAutoClause, writeFieldsList, writeInsertIntoTableSql, writeJoinWhereClause, writeLOB, writeParameterMarker, writeTableCreationSuffix, writeUpdateOriginalFromTempTableSql
 
Methods inherited from class org.eclipse.persistence.internal.databaseaccess.DatasourcePlatform
addOperator, addSequence, addSequence, buildNativeCall, buildSelectQueryForIdentity, buildSelectQueryForIdentity, buildSelectQueryForSequenceObject, clone, convertObject, createConnectionCustomizer, getConversionManager, getDataTypesConvertedFrom, getDataTypesConvertedTo, getDefaultNativeSequenceToTable, getDefaultSequence, getDefaultSequenceToWrite, getEndDelimiter, getOperator, getPlatformOperators, getSelectSequenceQuery, getSequence, getSequences, getSequencesToWrite, getStartDelimiter, getTableQualifier, getTimestampFromServer, getTimestampQuery, getUpdateSequenceQuery, hasDefaultSequence, initializeDefaultQueries, isAccess, isAttunity, isCloudscape, isDB2, isDBase, isDerby, isFirebird, isH2, isHSQL, isInformix, isMaxDB, isMySQL, isODBC, isOracle, isOracle9, isPervasive, isPointBase, isPostgreSQL, isSQLAnywhere, isSQLServer, isSybase, isSymfoware, isTimesTen, isTimesTen7, removeAllSequences, removeSequence, sequencesAfterCloneCleanup, setConversionManager, setDefaultNativeSequenceToTable, setDefaultSequence, setEndDelimiter, setSelectSequenceNumberQuery, setSequencePreallocationSize, setSequences, setStartDelimiter, setTableQualifier, setTimestampQuery, setUpdateSequenceQuery, shouldNativeSequenceUseTransaction, shouldPrepare, shouldSelectDistinctIncludeOrderBy, shouldSelectIncludeOrderBy, supportsIdentity, toString, usesPlatformDefaultSequence
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

HANAPlatform

public HANAPlatform()
Method Detail

isHANA

public boolean isHANA()
Specified by:
isHANA in interface org.eclipse.persistence.internal.databaseaccess.Platform
Overrides:
isHANA in class org.eclipse.persistence.internal.databaseaccess.DatasourcePlatform

usesStringBinding

public boolean usesStringBinding()
Overrides:
usesStringBinding in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform

requiresUniqueConstraintCreationOnTableCreate

public boolean requiresUniqueConstraintCreationOnTableCreate()
Overrides:
requiresUniqueConstraintCreationOnTableCreate in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform

isForUpdateCompatibleWithDistinct

public boolean isForUpdateCompatibleWithDistinct()
Overrides:
isForUpdateCompatibleWithDistinct in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform

supportsIndividualTableLocking

public boolean supportsIndividualTableLocking()
Overrides:
supportsIndividualTableLocking in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform

buildFieldTypes

protected final java.util.Hashtable buildFieldTypes()
Overrides:
buildFieldTypes in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform

printFieldTypeSize

protected void printFieldTypeSize(java.io.Writer writer,
                                  FieldDefinition field,
                                  org.eclipse.persistence.internal.databaseaccess.FieldTypeDefinition fieldType)
                           throws java.io.IOException
Overrides:
printFieldTypeSize in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
Throws:
java.io.IOException

initializePlatformOperators

protected final void initializePlatformOperators()
Overrides:
initializePlatformOperators in class org.eclipse.persistence.internal.databaseaccess.DatasourcePlatform

createLocateOperator

public static ExpressionOperator createLocateOperator()
INTERNAL: Build locate operator i.e. LOCATE("ob", t0.F_NAME)


createLocate2Operator

public static ExpressionOperator createLocate2Operator()
INTERNAL: Build locate operator with 3 params i.e. LOCATE("coffee", t0.DESCRIP, 4). Last parameter is a start at.


printSQLSelectStatement

public void printSQLSelectStatement(org.eclipse.persistence.internal.databaseaccess.DatabaseCall call,
                                    org.eclipse.persistence.internal.expressions.ExpressionSQLPrinter printer,
                                    org.eclipse.persistence.internal.expressions.SQLSelectStatement statement)
Overrides:
printSQLSelectStatement in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform

computeMaxRowsForSQL

public int computeMaxRowsForSQL(int firstResultIndex,
                                int maxResults)
Overrides:
computeMaxRowsForSQL in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform

shouldOptimizeDataConversion

public boolean shouldOptimizeDataConversion()
Overrides:
shouldOptimizeDataConversion in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform

supportsNativeSequenceNumbers

public final boolean supportsNativeSequenceNumbers()
Overrides:
supportsNativeSequenceNumbers in class org.eclipse.persistence.internal.databaseaccess.DatasourcePlatform

buildSelectQueryForSequenceObject

public final ValueReadQuery buildSelectQueryForSequenceObject(java.lang.String sequenceName,
                                                              java.lang.Integer size)
Overrides:
buildSelectQueryForSequenceObject in class org.eclipse.persistence.internal.databaseaccess.DatasourcePlatform

supportsGlobalTempTables

public final boolean supportsGlobalTempTables()
Overrides:
supportsGlobalTempTables in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform

getCreateTempTableSqlPrefix

protected final java.lang.String getCreateTempTableSqlPrefix()
Overrides:
getCreateTempTableSqlPrefix in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform

getTempTableForTable

public org.eclipse.persistence.internal.helper.DatabaseTable getTempTableForTable(org.eclipse.persistence.internal.helper.DatabaseTable table)
Overrides:
getTempTableForTable in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform

shouldTempTableSpecifyPrimaryKeys

protected boolean shouldTempTableSpecifyPrimaryKeys()
Overrides:
shouldTempTableSpecifyPrimaryKeys in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform

getMaxFieldNameSize

public final int getMaxFieldNameSize()
Overrides:
getMaxFieldNameSize in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform

supportsLocalTempTables

public final boolean supportsLocalTempTables()
Overrides:
supportsLocalTempTables in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform

shouldAlwaysUseTempStorageForModifyAll

public final boolean shouldAlwaysUseTempStorageForModifyAll()
Overrides:
shouldAlwaysUseTempStorageForModifyAll in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform

shouldBindLiterals

public final boolean shouldBindLiterals()
Overrides:
shouldBindLiterals in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform

shouldPrintOuterJoinInWhereClause

public final boolean shouldPrintOuterJoinInWhereClause()
Overrides:
shouldPrintOuterJoinInWhereClause in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform

shouldUseJDBCOuterJoinSyntax

public final boolean shouldUseJDBCOuterJoinSyntax()
Overrides:
shouldUseJDBCOuterJoinSyntax in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform

supportsSequenceObjects

public boolean supportsSequenceObjects()
Overrides:
supportsSequenceObjects in class org.eclipse.persistence.internal.databaseaccess.DatasourcePlatform

canBatchWriteWithOptimisticLocking

public boolean canBatchWriteWithOptimisticLocking(org.eclipse.persistence.internal.databaseaccess.DatabaseCall call)
Overrides:
canBatchWriteWithOptimisticLocking in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform

executeBatch

public int executeBatch(java.sql.Statement statement,
                        boolean isStatementPrepared)
                 throws java.sql.SQLException
Overrides:
executeBatch in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
Throws:
java.sql.SQLException

supportsForeignKeyConstraints

public boolean supportsForeignKeyConstraints()
Overrides:
supportsForeignKeyConstraints in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform

getInputProcedureToken

public java.lang.String getInputProcedureToken()
Used for stored procedure creation: Prefix for INPUT parameters. Not required on most platforms.

Overrides:
getInputProcedureToken in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform

getOutputProcedureToken

public java.lang.String getOutputProcedureToken()
This method is used to print the output parameter token when stored procedures are called

Overrides:
getOutputProcedureToken in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform

getProcedureCallTail

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

Overrides:
getProcedureCallTail in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform

shouldPrintStoredProcedureArgumentNameInCall

public boolean shouldPrintStoredProcedureArgumentNameInCall()
INTERNAL: Should the variable name of a stored procedure call be printed as part of the procedure call e.g. EXECUTE PROCEDURE MyStoredProc(myvariable = ?)

Overrides:
shouldPrintStoredProcedureArgumentNameInCall in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform

requiresProcedureCallOuputToken

public boolean requiresProcedureCallOuputToken()
Overrides:
requiresProcedureCallOuputToken in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform

supportsStoredFunctions

public boolean supportsStoredFunctions()
Overrides:
supportsStoredFunctions in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform

appendDate

protected void appendDate(java.sql.Date date,
                          java.io.Writer writer)
                   throws java.io.IOException
Overrides:
appendDate in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
Throws:
java.io.IOException

appendTime

protected void appendTime(java.sql.Time time,
                          java.io.Writer writer)
                   throws java.io.IOException
Overrides:
appendTime in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
Throws:
java.io.IOException

appendTimestamp

protected void appendTimestamp(java.sql.Timestamp timestamp,
                               java.io.Writer writer)
                        throws java.io.IOException
Overrides:
appendTimestamp in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
Throws:
java.io.IOException

appendCalendar

protected void appendCalendar(java.util.Calendar calendar,
                              java.io.Writer writer)
                       throws java.io.IOException
Overrides:
appendCalendar in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
Throws:
java.io.IOException

writeAddColumnClause

public void writeAddColumnClause(java.io.Writer writer,
                                 org.eclipse.persistence.internal.sessions.AbstractSession session,
                                 TableDefinition table,
                                 FieldDefinition field)
                          throws java.io.IOException
Overrides:
writeAddColumnClause in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
Throws:
java.io.IOException

EclipseLink 2.5.0, build 'v20130507-3faac2b' API Reference