public class DatabasePlatform extends DatasourcePlatform
AccessPlatform
,
DB2Platform
,
DBasePlatform
,
OraclePlatform
,
SybasePlatform
,
Serialized FormModifier and Type | Field and Description |
---|---|
protected Hashtable |
classTypes
Stores mapping of class types to database types for schema creation.
|
protected int |
cursorCode
Allow for the code that is used for preparing cursored outs for a storedprocedure to be settable.
|
protected Hashtable |
fieldTypes
Holds a hashtable of values used to map JAVA types to database types for table creation
|
protected boolean |
shouldBindAllParameters
Bind all arguments to any SQL statement.
|
protected boolean |
shouldCacheAllStatements
Cache all prepared statements, this requires full parameter binding as well.
|
protected boolean |
shouldForceFieldNamesToUpperCase
Can be used if the app expects upper case but the database is not return consistent case, i.e.
|
protected static boolean |
shouldIgnoreCaseOnFieldComparisons
Allow for case in field names to be ignored as some databases are not case sensitive and when using custom this can be an issue.
|
protected boolean |
shouldOptimizeDataConversion
Allow for driver level data conversion optimization to be disabled,
required because some drivers can loose precision.
|
protected boolean |
shouldTrimStrings
Indicates (if true) to remove blanks characters from the right of CHAR strings.
|
protected int |
statementCacheSize
The statement cache size for prepare parameterized statements.
|
protected int |
stringBindingSize
Indicates the size above which strings will be bound NOTE: does not work with ODBC
|
protected boolean |
supportsAutoCommit
Some JDBC drivers do not support AutoCommit in the way TopLink expects.
|
protected int |
transactionIsolation
The transaction isolation level to be set on the connection (optional).
|
protected boolean |
usesByteArrayBinding
Indicates that binding will be used for BLOB data.
|
protected boolean |
usesNativeSQL
Indicates that native SQL should be used for literal values instead of ODBC esacpe format
Only used with Oracle, Sybase & DB2
|
protected boolean |
usesStreamsForBinding
Indicates that streams will be used to store BLOB data.
|
protected boolean |
usesStringBinding
Indicates that strings will above the stringBindingSize will be bound NOTE: does not work with ODBC
|
conversionManager, dataTypesConvertedFromAClass, dataTypesConvertedToAClass, defaultSequence, platformOperators, sequences, tableQualifier, timestampQuery
Constructor and Description |
---|
DatabasePlatform() |
Modifier and Type | Method and Description |
---|---|
boolean |
allowsSizeInProcedureArguments()
Used for sp defs.
|
protected void |
appendBoolean(Boolean bool,
Writer writer)
Appends a Boolean value as a number
|
protected void |
appendByteArray(byte[] bytes,
Writer writer)
Append the ByteArray in ODBC literal format ({b hexString}).
|
protected void |
appendCalendar(Calendar calendar,
Writer writer)
Answer a platform correct string representation of a Calendar as a Timestamp, suitable for SQL generation.
|
protected void |
appendDate(Date date,
Writer writer)
Answer a platform correct string representation of a Date, suitable for SQL generation.
|
void |
appendLiteralToCall(Call call,
Writer writer,
Object literal)
INTERNAL
In case shouldBindLiterals is true, instead of null value a DatabaseField
value may be passed (so that it's type could be used for binding null).
|
protected void |
appendLiteralToCallWithBinding(Call call,
Writer writer,
Object literal)
INTERNAL
Override this method in case the platform needs to do something special for binding literals.
|
protected void |
appendNumber(Number number,
Writer writer)
Write number to SQL string.
|
void |
appendParameter(Call call,
Writer writer,
Object parameter)
Write a database-friendly representation of the given parameter to the writer.
|
int |
appendParameterInternal(Call call,
Writer writer,
Object parameter)
Returns the number of parameters that used binding.
|
protected void |
appendString(String string,
Writer writer)
Write the string.
|
protected void |
appendTime(Time time,
Writer writer)
Answer a platform correct string representation of a Time, suitable for SQL generation.
|
protected void |
appendTimestamp(Timestamp timestamp,
Writer writer)
Answer a platform correct string representation of a Timestamp, suitable for SQL generation.
|
void |
autoCommit(DatabaseAccessor accessor)
Used by JDBC drivers that do not support autocommit so simulate an autocommit.
|
void |
beginTransaction(DatabaseAccessor accessor)
Used for jdbc drivers which do not support autocommit to explicitly begin a transaction
This method is a no-op for databases which implement autocommit as expected.
|
DatabaseCall |
buildCallWithReturning(SQLCall sqlCall,
Vector returnFields)
INTERNAL
Returns null unless the platform supports call with returning
|
protected Hashtable |
buildClassTypes()
Return the mapping of class types to database types for the schema framework.
|
protected Hashtable |
buildFieldTypes()
Return the mapping of class types to database types for the schema framework.
|
ValueReadQuery |
buildSelectQueryForNativeSequence()
INTERNAL:
|
ValueReadQuery |
buildSelectQueryForNativeSequence(String seqName,
Integer size)
INTERNAL:
|
boolean |
canBuildCallWithReturning()
INTERNAL
Indicates whether the platform can build call with returning.
|
void |
commitTransaction(DatabaseAccessor accessor)
Used for jdbc drivers which do not support autocommit to explicitly commit a transaction
This method is a no-op for databases which implement autocommit as expected.
|
Object |
convertToDatabaseType(Object value)
INTERNAL
We support more primitive than JDBC does so we must do conversion before printing or binding.
|
void |
copyInto(Platform platform)
Copy the state into the new platform.
|
protected Sequence |
createPlatformDefaultSequence()
INTERNAL:
Create platform-default Sequence
|
boolean |
dontBindUpdateAllQueryUsingTempTables()
INTERNAL:
May need to override this method if the sql generated for UpdateAllQuery
using temp tables fails in case parameter binding is used.
|
Object |
executeStoredProcedure(DatabaseCall dbCall,
PreparedStatement statement,
DatabaseAccessor accessor,
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
|
String |
getAssignmentString()
Used for stored function calls.
|
String |
getBatchBeginString()
Used for batch writing and sp defs.
|
String |
getBatchDelimiterString()
Used for batch writing and sp defs.
|
String |
getBatchEndString()
Used for batch writing and sp defs.
|
Hashtable |
getClassTypes()
Return the class type to database type mapping for the schema framework.
|
String |
getConstraintDeletionString()
Used for constraint deletion.
|
protected String |
getCreateTempTableSqlBodyForTable(DatabaseTable table)
INTERNAL:
May override this method if the platform supports temporary tables.
|
protected String |
getCreateTempTableSqlPrefix()
INTERNAL:
Override this method if the platform supports temporary tables.
|
protected String |
getCreateTempTableSqlSuffix()
INTERNAL:
May override this method if the platform support temporary tables.
|
String |
getCreateViewString()
Used for view creation.
|
String |
getCreationInOutputProcedureToken()
This method is used to print the required output parameter token for the
specific platform.
|
String |
getCreationOutputProcedureToken()
This method is used to print the required output parameter token for the
specific platform.
|
int |
getCursorCode()
ADVANCED:
Return the code for preparing cursored output
parameters in a stored procedure
|
FieldTypeDefinition |
getFieldTypeDefinition(Class javaClass)
Return the field type object describing this databases platform specific representation
of the Java primitive class name.
|
Hashtable |
getFieldTypes()
Return the class type to database type mappings for the schema framework.
|
String |
getFunctionCallHeader()
Used for stored function calls.
|
String |
getInOutputProcedureToken()
This method is used to print the output parameter token when stored
procedures are called
|
String |
getJDBCOuterJoinString()
Returns the JDBC outer join operator for SELECT statements.
|
int |
getJDBCType(Class javaType)
Return the JDBC type for the Java type.
|
int |
getJDBCType(DatabaseField field)
Return the JDBC type for the given database field.
|
String |
getJdbcTypeName(int jdbcType)
INTERNAL:
Returns the type name corresponding to the jdbc type
|
int |
getMaxFieldNameSize()
INTERNAL:
returns the maximum number of characters that can be used in a field
name on this platform.
|
int |
getMaxForeignKeyNameSize()
INTERNAL:
returns the maximum number of characters that can be used in a foreign key
name on this platform.
|
int |
getMaxUniqueKeyNameSize()
INTERNAL:
returns the maximum number of characters that can be used in a unique key
name on this platform.
|
Object |
getObjectFromResultSet(ResultSet resultSet,
int columnNumber,
int type)
INTERNAL:
Get the object from the JDBC Result set.
|
String |
getOutputProcedureToken()
This method is used to print the output parameter token when stored
procedures are called
|
String |
getProcedureArgumentSetter()
Used for sp calls.
|
String |
getProcedureArgumentString()
Used for sp defs.
|
String |
getProcedureAsString()
Used for stored procedure defs.
|
String |
getProcedureBeginString()
Used for stored procedure defs.
|
String |
getProcedureCallHeader()
Used for sp calls.
|
String |
getProcedureCallTail()
Used for sp calls.
|
String |
getProcedureEndString()
Used for stored procedure defs.
|
String |
getQualifiedSequenceTableName() |
String |
getSelectForUpdateNoWaitString()
This syntax does no wait on the lock.
|
String |
getSelectForUpdateOfString()
For fine-grained pessimistic locking the column names can be
specified individually.
|
String |
getSelectForUpdateString()
Most database support a syntax.
|
String |
getSequenceCounterFieldName() |
String |
getSequenceNameFieldName() |
int |
getSequencePreallocationSize() |
String |
getSequenceTableName() |
int |
getStatementCacheSize()
The statement cache size for prepare parameterized statements.
|
String |
getStoredProcedureParameterPrefix() |
String |
getStoredProcedureTerminationToken() |
int |
getStringBindingSize() |
DatabaseTable |
getTempTableForTable(DatabaseTable table)
INTERNAL:
May override this method if the platform support temporary tables.
|
int |
getTransactionIsolation()
Returns the transaction isolation setting for a connection.
|
boolean |
isInformixOuterJoin()
Some database require outer joins to be given in the where clause, others require it in the from clause.
|
boolean |
isNullAllowedInSelectClause()
INTERNAL:
Override this if the platform cannot handle NULL in select clause.
|
Hashtable |
maximumNumericValues()
Builds a table of maximum numeric values keyed on java class.
|
Hashtable |
minimumNumericValues()
Builds a table of minimum numeric values keyed on java class.
|
void |
printFieldIdentityClause(Writer writer)
Append the receiver's field 'identity' constraint clause to a writer.
|
void |
printFieldIdentityClause(Writer writer,
AbstractSession session,
String qualifiedFieldName)
Append the receiver's field 'identity' constraint clause to a writer.
|
void |
printFieldNotNullClause(Writer writer)
Append the receiver's field 'NOT NULL' constraint clause to a writer.
|
void |
printFieldNullClause(Writer writer)
Append the receiver's field 'NULL' constraint clause to a writer.
|
void |
printFieldTypeSize(Writer writer,
FieldDefinition field,
FieldTypeDefinition fieldType,
AbstractSession session,
String qualifiedFieldName) |
void |
printFieldUnique(Writer writer,
boolean isUnique,
AbstractSession session,
String qualifiedFieldName) |
int |
printValuelist(int[] theObjects,
DatabaseCall call,
Writer writer)
Added November 7, 2000 JED
Prs reference: 24501
Tracker reference: 14111
Print the int array on the writer.
|
int |
printValuelist(Vector theObjects,
DatabaseCall call,
Writer writer)
Returns the number of objects using binding.
|
protected Object |
processResultSet(ResultSet resultSet,
DatabaseCall dbCall,
PreparedStatement statement,
DatabaseAccessor accessor,
AbstractSession session) |
void |
registerOutputParameter(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 |
requiresNamedPrimaryKeyConstraints()
This is used as some databases create the primary key constraint differently, i.e.
|
boolean |
requiresProcedureCallBrackets()
USed for sp calls.
|
boolean |
requiresProcedureCallOuputToken()
Used for sp calls.
|
boolean |
requiresTypeNameToRegisterOutputParameter()
INTERNAL:
Indicates whether the version of CallableStatement.registerOutputParameter method
that takes type name should be used.
|
void |
rollbackTransaction(DatabaseAccessor accessor)
Used for jdbc drivers which do not support autocommit to explicitly rollback a transaction
This method is a no-op for databases which implement autocommit as expected.
|
protected void |
setClassTypes(Hashtable classTypes) |
void |
setCursorCode(int cursorCode)
ADVANCED:
Set the code for preparing cursored output
parameters in a stored procedure
|
protected void |
setFieldTypes(Hashtable theFieldTypes) |
void |
setParameterValueInDatabaseCall(Object parameter,
PreparedStatement statement,
int index,
AbstractSession session)
INTERNAL
Note that index (not index+1) is used in statement.setObject(index, parameter)
Binding starts with a 1 not 0, so make sure that index > 0.
|
void |
setParameterValueInDatabaseCall(Vector parameters,
PreparedStatement statement,
int parameterIndex,
AbstractSession session)
INTERNAL
Used by SQLCall.prepareStatement(..)
Note that parameterIndex corresponds to parameters vector and
index corresponds to statement:
statement.setObject(parameterIndex + 1, parameters.elementAt(parameterIndex))
Therefore parameterIndex may be 0.
|
void |
setParameterValueInDatabaseCall(Vector parameters,
PreparedStatement statement,
int parameterIndex,
int index,
AbstractSession session)
INTERNAL
Used by StoredProcedureCall.prepareStatement(..)
Note that parameterIndex corresponds to parameters vector and
index corresponds to statement:
statement.setObject(index, parameters.elementAt(parameterIndex))
Therefore parameterIndex may be 0, but index > 0.
|
protected void |
setPrimitiveParameterValue(PreparedStatement statement,
int index,
Object parameter)
Set a primitive parameter.
|
void |
setSequenceCounterFieldName(String name) |
void |
setSequenceNameFieldName(String name) |
void |
setSequenceTableName(String name) |
void |
setShouldBindAllParameters(boolean shouldBindAllParameters)
Bind all arguments to any SQL statement.
|
void |
setShouldCacheAllStatements(boolean shouldCacheAllStatements)
Cache all prepared statements, this requires full parameter binding as well.
|
void |
setShouldForceFieldNamesToUpperCase(boolean shouldForceFieldNamesToUpperCase)
Can be used if the app expects upper case but the database is not return consistent case, i.e.
|
static void |
setShouldIgnoreCaseOnFieldComparisons(boolean newShouldIgnoreCaseOnFieldComparisons)
Allow for case in field names to be ignored as some databases are not case sensitive and when using custom this can be an issue.
|
void |
setShouldOptimizeDataConversion(boolean value)
PUBLIC:
Set if our driver level data conversion optimization is enabled.
|
void |
setShouldTrimStrings(boolean aBoolean) |
void |
setStatementCacheSize(int statementCacheSize)
The statement cache size for prepare parameterized statements.
|
void |
setStringBindingSize(int aSize) |
void |
setSupportsAutoCommit(boolean supportsAutoCommit)
supportsAutoCommit can be set to false for JDBC drivers which do not support autocommit
|
void |
setTransactionIsolation(int isolationLevel)
Set the transaction isolation setting for a connection.
|
void |
setUsesByteArrayBinding(boolean usesByteArrayBinding) |
void |
setUsesNativeSQL(boolean usesNativeSQL) |
void |
setUsesStreamsForBinding(boolean usesStreamsForBinding) |
void |
setUsesStringBinding(boolean aBool) |
boolean |
shouldAcquireSequenceValueAfterInsert(AbstractSession session,
String qualifiedFieldName) |
boolean |
shouldAlwaysUseTempStorageForModifyAll()
INTERNAL:
That method affects UpdateAllQuery and DeleteAllQuery execution.
|
boolean |
shouldBindAllParameters()
Bind all arguments to any SQL statement.
|
boolean |
shouldBindLiterals()
INTERNAL
Allows platform to choose whether to bind literals in DatabaseCalls or not.
|
boolean |
shouldCacheAllStatements()
Cache all prepared statements, this requires full parameter binding as well.
|
boolean |
shouldForceFieldNamesToUpperCase()
Can be used if the app expects upper case but the database is not return consistent case, i.e.
|
static boolean |
shouldIgnoreCaseOnFieldComparisons()
Allow for case in field names to be ignored as some databases are not case sensitive and when using custom this can be an issue.
|
boolean |
shouldIgnoreException(SQLException exception)
Allow for the platform to ignore exceptions.
|
boolean |
shouldNativeSequenceAcquireValueAfterInsert()
INTERNAL:
Indicates whether NativeSequence should retrieve
sequence value after the object has been inserted into the db
This method is to be used *ONLY* by sequencing classes
|
boolean |
shouldNativeSequenceUseTransaction()
INTERNAL
Indicates whether a separate transaction is required for NativeSequence.
|
boolean |
shouldOptimizeDataConversion()
Return if our driver level data conversion optimization is enabled.
|
boolean |
shouldPrintConstraintNameAfter()
Some Platforms want the constraint name after the constraint definition.
|
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 |
shouldPrintOutputTokenAtStart()
This is required in the construction of the stored procedures with
output parameters
|
boolean |
shouldPrintOutputTokenBeforeType()
This is required in the construction of the stored procedures with
output parameters
|
protected boolean |
shouldTempTableSpecifyPrimaryKeys()
INTERNAL:
Indicates whether temporary table can specify primary keys (some platforms don't allow that).
|
boolean |
shouldTrimStrings() |
boolean |
shouldUseJDBCOuterJoinSyntax()
JDBC defines and outer join syntax, many drivers do not support this.
|
boolean |
supportsAutoCommit()
supportsAutoCommit must sometimes be set to false for JDBC drivers which do not
support autocommit.
|
boolean |
supportsForeignKeyConstraints() |
boolean |
supportsGlobalTempTables()
INTERNAL:
Indicates whether the platform supports global temporary tables.
|
boolean |
supportsLocalTempTables()
INTERNAL:
Indicates whether the platform supports local temporary tables.
|
boolean |
supportsNativeSequenceNumbers() |
boolean |
supportsPrimaryKeyConstraint() |
boolean |
supportsStoredFunctions() |
boolean |
supportsTempTables()
INTERNAL:
Indicates whether the platform supports temporary tables.
|
boolean |
supportsUniqueKeyConstraints() |
boolean |
usesByteArrayBinding() |
boolean |
usesNativeSQL() |
boolean |
usesSequenceTable() |
boolean |
usesStreamsForBinding() |
boolean |
usesStringBinding() |
protected static void |
writeAutoAssignmentSetClause(Writer writer,
String tableName1,
String tableName2,
Collection fields)
INTERNAL:
helper method, don't override.
|
protected static void |
writeAutoJoinWhereClause(Writer writer,
String tableName1,
String tableName2,
Collection pkFields)
INTERNAL:
helper method, don't override.
|
void |
writeCleanUpTempTableSql(Writer writer,
DatabaseTable table)
INTERNAL:
Don't override this method.
|
void |
writeCreateTempTableSql(Writer writer,
DatabaseTable table,
AbstractSession session,
Collection pkFields,
Collection usedFields,
Collection allFields)
INTERNAL:
Don't override this method.
|
void |
writeDeleteFromTargetTableUsingTempTableSql(Writer writer,
DatabaseTable table,
DatabaseTable targetTable,
Collection pkFields,
Collection targetPkFields)
INTERNAL:
Write an sql string for deletion from target table using temporary table.
|
protected static void |
writeFields(Writer writer,
String tableName1,
String tableName2,
Collection fields1,
Collection fields2,
String separator)
INTERNAL:
helper method, don't override.
|
protected static void |
writeFieldsAutoClause(Writer writer,
String tableName1,
String tableName2,
Collection fields,
String separator)
INTERNAL:
helper method, don't override.
|
protected static void |
writeFieldsList(Writer writer,
Collection fields)
INTERNAL:
helper method, don't override.
|
void |
writeInsertIntoTableSql(Writer writer,
DatabaseTable table,
Collection usedFields)
INTERNAL:
May need to override this method if the platform supports temporary tables
and the generated sql doesn't work.
|
protected static void |
writeJoinWhereClause(Writer writer,
String tableName1,
String tableName2,
Collection pkFields1,
Collection pkFields2)
INTERNAL:
helper method, don't override.
|
void |
writeLOB(DatabaseField field,
Object value,
ResultSet resultSet,
AbstractSession session)
INTERNAL:
Write LOB value - only on Oracle8 and up
|
void |
writeParameterMarker(Writer writer,
ParameterExpression expression) |
void |
writeUpdateOriginalFromTempTableSql(Writer writer,
DatabaseTable table,
Collection pkFields,
Collection assignedFields)
INTERNAL:
May need to override this method if the platform supports temporary tables
and the generated sql doesn't work.
|
addOperator, addSequence, clone, convertObject, createSequences, getConversionManager, getCustomModifyValueForCall, getDataTypesConvertedFrom, getDataTypesConvertedTo, getDefaultSequence, getDefaultSequenceToWrite, getOperator, getPlatformOperators, getSequence, getSequences, getSequencesToWrite, getTableQualifier, getTimestampFromServer, getTimestampQuery, hasDefaultSequence, initializePlatformOperators, isAccess, isAttunity, isCloudscape, isDB2, isDBase, isDerby, isHSQL, isInformix, isMySQL, isODBC, isOracle, isPointBase, isPostgreSQL, isSQLAnywhere, isSQLServer, isSybase, isTimesTen, platformSpecificSequencingInitialization, removeAllSequences, removeSequence, sequencesAfterCloneCleanup, setConversionManager, setDefaultSequence, setSequences, setTableQualifier, setTimestampQuery, shouldUseCustomModifyForCall, toString, usesPlatformDefaultSequence
protected transient Hashtable fieldTypes
protected boolean usesNativeSQL
protected boolean usesByteArrayBinding
protected boolean shouldBindAllParameters
protected boolean shouldCacheAllStatements
protected int statementCacheSize
protected boolean shouldForceFieldNamesToUpperCase
protected boolean shouldTrimStrings
protected boolean usesStreamsForBinding
protected int stringBindingSize
protected boolean usesStringBinding
protected int cursorCode
protected int transactionIsolation
protected boolean supportsAutoCommit
protected boolean shouldOptimizeDataConversion
protected transient Hashtable classTypes
protected static boolean shouldIgnoreCaseOnFieldComparisons
public boolean allowsSizeInProcedureArguments()
protected void appendBoolean(Boolean bool, Writer writer) throws IOException
IOException
protected void appendByteArray(byte[] bytes, Writer writer) throws IOException
IOException
protected void appendDate(Date date, Writer writer) throws IOException
IOException
protected void appendNumber(Number number, Writer writer) throws IOException
IOException
public void appendLiteralToCall(Call call, Writer writer, Object literal)
protected void appendLiteralToCallWithBinding(Call call, Writer writer, Object literal)
public void appendParameter(Call call, Writer writer, Object parameter)
appendParameter
in interface Platform
appendParameter
in class DatasourcePlatform
public int appendParameterInternal(Call call, Writer writer, Object parameter)
protected void appendString(String string, Writer writer) throws IOException
IOException
protected void appendTime(Time time, Writer writer) throws IOException
IOException
protected void appendTimestamp(Timestamp timestamp, Writer writer) throws IOException
IOException
protected void appendCalendar(Calendar calendar, Writer writer) throws IOException
IOException
public void autoCommit(DatabaseAccessor accessor) throws SQLException
SQLException
public void beginTransaction(DatabaseAccessor accessor) throws SQLException
SQLException
public DatabaseCall buildCallWithReturning(SQLCall sqlCall, Vector returnFields)
protected Hashtable buildClassTypes()
protected Hashtable buildFieldTypes()
public boolean canBuildCallWithReturning()
public void commitTransaction(DatabaseAccessor accessor) throws SQLException
SQLException
public Object convertToDatabaseType(Object value)
public void copyInto(Platform platform)
copyInto
in interface Platform
copyInto
in class DatasourcePlatform
public String getBatchBeginString()
public String getBatchDelimiterString()
public String getBatchEndString()
public String getConstraintDeletionString()
public String getCreateViewString()
public String getProcedureEndString()
public String getProcedureBeginString()
public String getProcedureAsString()
public Hashtable getClassTypes()
public String getAssignmentString()
public String getCreationInOutputProcedureToken()
public String getCreationOutputProcedureToken()
public int getCursorCode()
public FieldTypeDefinition getFieldTypeDefinition(Class javaClass)
public Hashtable getFieldTypes()
public String getFunctionCallHeader()
public String getInOutputProcedureToken()
public String getJDBCOuterJoinString()
public int getJDBCType(DatabaseField field)
public int getJDBCType(Class javaType)
public String getJdbcTypeName(int jdbcType)
public int getMaxFieldNameSize()
public int getMaxForeignKeyNameSize()
public int getMaxUniqueKeyNameSize()
public Object getObjectFromResultSet(ResultSet resultSet, int columnNumber, int type) throws SQLException
SQLException
oracle.toplink.essentials.oraclespecific.Oracle9Platform
public String getOutputProcedureToken()
public String getProcedureArgumentSetter()
public String getProcedureArgumentString()
public String getProcedureCallHeader()
public String getProcedureCallTail()
public String getQualifiedSequenceTableName()
public String getSelectForUpdateNoWaitString()
public String getSelectForUpdateOfString()
public String getSelectForUpdateString()
public String getSequenceCounterFieldName()
public String getSequenceNameFieldName()
public int getSequencePreallocationSize()
getSequencePreallocationSize
in class DatasourcePlatform
public String getSequenceTableName()
public int getStatementCacheSize()
public String getStoredProcedureParameterPrefix()
public String getStoredProcedureTerminationToken()
public int getStringBindingSize()
public int getTransactionIsolation()
public boolean isInformixOuterJoin()
public Hashtable maximumNumericValues()
NOTE: BigInteger & BigDecimal maximums are dependent upon their precision & Scale
public Hashtable minimumNumericValues()
NOTE: BigInteger & BigDecimal minimums are dependent upon their precision & Scale
public void printFieldIdentityClause(Writer writer, AbstractSession session, String qualifiedFieldName) throws ValidationException
ValidationException
public void printFieldIdentityClause(Writer writer) throws ValidationException
ValidationException
public void printFieldNotNullClause(Writer writer) throws ValidationException
ValidationException
public void printFieldNullClause(Writer writer) throws ValidationException
ValidationException
public int printValuelist(int[] theObjects, DatabaseCall call, Writer writer) throws IOException
IOException
public int printValuelist(Vector theObjects, DatabaseCall call, Writer writer) throws IOException
IOException
protected Object processResultSet(ResultSet resultSet, DatabaseCall dbCall, PreparedStatement statement, DatabaseAccessor accessor, AbstractSession session) throws SQLException
SQLException
public void registerOutputParameter(CallableStatement statement, int index, int jdbcType) throws SQLException
SQLException
public boolean requiresNamedPrimaryKeyConstraints()
public boolean requiresProcedureCallBrackets()
public boolean requiresProcedureCallOuputToken()
public boolean requiresTypeNameToRegisterOutputParameter()
public void rollbackTransaction(DatabaseAccessor accessor) throws SQLException
SQLException
protected void setClassTypes(Hashtable classTypes)
public void setCursorCode(int cursorCode)
protected void setFieldTypes(Hashtable theFieldTypes)
public void setSequenceCounterFieldName(String name)
public void setSequenceNameFieldName(String name)
public void setSequenceTableName(String name)
public void setShouldBindAllParameters(boolean shouldBindAllParameters)
public void setShouldCacheAllStatements(boolean shouldCacheAllStatements)
public void setShouldForceFieldNamesToUpperCase(boolean shouldForceFieldNamesToUpperCase)
public static void setShouldIgnoreCaseOnFieldComparisons(boolean newShouldIgnoreCaseOnFieldComparisons)
public void setShouldOptimizeDataConversion(boolean value)
public void setShouldTrimStrings(boolean aBoolean)
public void setStatementCacheSize(int statementCacheSize)
public void setStringBindingSize(int aSize)
public void setSupportsAutoCommit(boolean supportsAutoCommit)
public void setTransactionIsolation(int isolationLevel)
public void setUsesByteArrayBinding(boolean usesByteArrayBinding)
public void setUsesNativeSQL(boolean usesNativeSQL)
public void setUsesStreamsForBinding(boolean usesStreamsForBinding)
public void setUsesStringBinding(boolean aBool)
public boolean shouldBindAllParameters()
public boolean shouldCacheAllStatements()
public boolean shouldForceFieldNamesToUpperCase()
public static boolean shouldIgnoreCaseOnFieldComparisons()
public boolean shouldIgnoreException(SQLException exception)
public boolean shouldOptimizeDataConversion()
public boolean shouldPrintConstraintNameAfter()
public boolean shouldPrintInOutputTokenBeforeType()
public boolean shouldPrintOuterJoinInWhereClause()
public boolean shouldPrintOutputTokenBeforeType()
public boolean shouldPrintOutputTokenAtStart()
public boolean shouldTrimStrings()
public boolean shouldUseJDBCOuterJoinSyntax()
public boolean supportsAutoCommit()
public boolean supportsForeignKeyConstraints()
public boolean supportsUniqueKeyConstraints()
public boolean supportsNativeSequenceNumbers()
public boolean supportsPrimaryKeyConstraint()
public boolean supportsStoredFunctions()
public Object executeStoredProcedure(DatabaseCall dbCall, PreparedStatement statement, DatabaseAccessor accessor, AbstractSession session) throws SQLException
SQLException
public void setParameterValueInDatabaseCall(Object parameter, PreparedStatement statement, int index, AbstractSession session) throws SQLException
SQLException
protected void setPrimitiveParameterValue(PreparedStatement statement, int index, Object parameter) throws SQLException
SQLException
public void setParameterValueInDatabaseCall(Vector parameters, PreparedStatement statement, int parameterIndex, AbstractSession session) throws SQLException
SQLException
public void setParameterValueInDatabaseCall(Vector parameters, PreparedStatement statement, int parameterIndex, int index, AbstractSession session) throws SQLException
SQLException
public boolean usesByteArrayBinding()
public boolean usesSequenceTable()
public boolean usesNativeSQL()
public boolean usesStreamsForBinding()
public boolean usesStringBinding()
public void writeLOB(DatabaseField field, Object value, ResultSet resultSet, AbstractSession session) throws SQLException
SQLException
public boolean shouldNativeSequenceUseTransaction()
public boolean shouldNativeSequenceAcquireValueAfterInsert()
public ValueReadQuery buildSelectQueryForNativeSequence()
public ValueReadQuery buildSelectQueryForNativeSequence(String seqName, Integer size)
protected Sequence createPlatformDefaultSequence()
createPlatformDefaultSequence
in class DatasourcePlatform
public boolean supportsTempTables()
public boolean supportsLocalTempTables()
public boolean supportsGlobalTempTables()
protected String getCreateTempTableSqlPrefix()
public DatabaseTable getTempTableForTable(DatabaseTable table)
protected String getCreateTempTableSqlSuffix()
protected String getCreateTempTableSqlBodyForTable(DatabaseTable table)
protected boolean shouldTempTableSpecifyPrimaryKeys()
public void writeCreateTempTableSql(Writer writer, DatabaseTable table, AbstractSession session, Collection pkFields, Collection usedFields, Collection allFields) throws IOException
IOException
public void writeInsertIntoTableSql(Writer writer, DatabaseTable table, Collection usedFields) throws IOException
IOException
public boolean isNullAllowedInSelectClause()
public void writeUpdateOriginalFromTempTableSql(Writer writer, DatabaseTable table, Collection pkFields, Collection assignedFields) throws IOException
IOException
public void writeDeleteFromTargetTableUsingTempTableSql(Writer writer, DatabaseTable table, DatabaseTable targetTable, Collection pkFields, Collection targetPkFields) throws IOException
IOException
public void writeCleanUpTempTableSql(Writer writer, DatabaseTable table) throws IOException
IOException
public boolean shouldAlwaysUseTempStorageForModifyAll()
public boolean dontBindUpdateAllQueryUsingTempTables()
protected static void writeFieldsList(Writer writer, Collection fields) throws IOException
IOException
protected static void writeAutoAssignmentSetClause(Writer writer, String tableName1, String tableName2, Collection fields) throws IOException
IOException
protected static void writeAutoJoinWhereClause(Writer writer, String tableName1, String tableName2, Collection pkFields) throws IOException
IOException
protected static void writeFieldsAutoClause(Writer writer, String tableName1, String tableName2, Collection fields, String separator) throws IOException
IOException
protected static void writeJoinWhereClause(Writer writer, String tableName1, String tableName2, Collection pkFields1, Collection pkFields2) throws IOException
IOException
protected static void writeFields(Writer writer, String tableName1, String tableName2, Collection fields1, Collection fields2, String separator) throws IOException
IOException
public boolean shouldAcquireSequenceValueAfterInsert(AbstractSession session, String qualifiedFieldName)
public void printFieldTypeSize(Writer writer, FieldDefinition field, FieldTypeDefinition fieldType, AbstractSession session, String qualifiedFieldName) throws IOException
IOException
public void printFieldUnique(Writer writer, boolean isUnique, AbstractSession session, String qualifiedFieldName) throws IOException
IOException
public void writeParameterMarker(Writer writer, ParameterExpression expression) throws IOException
IOException
public boolean shouldBindLiterals()
Copyright © 2022. All rights reserved.