Top Description Fields Constructors Methods
org.eclipse.persistence.platform.database

public Class PervasivePlatform

extends DatabasePlatform
Class Inheritance
Imports
java.io.IOException, .Writer, java.util.ArrayList, .Hashtable, .List, .Map, org.eclipse.persistence.exceptions.ValidationException, org.eclipse.persistence.expressions.ExpressionOperator, org.eclipse.persistence.internal.databaseaccess.FieldTypeDefinition, org.eclipse.persistence.internal.helper.ClassConstants, .DatabaseTable, org.eclipse.persistence.queries.ValueReadQuery, org.eclipse.persistence.tools.schemaframework.FieldDefinition

Purpose: Provides Pervasive SQL DBMS specific behavior.

Pervasive SQL Platform file
Contributed by: Pervasive Software, Inc.
Contributed under bug: 392109

Developed on Pervasive PSQL Server 11.30

Limitations

Field Summary

Modifier and TypeField and Description
public static final int
Inherited from org.eclipse.persistence.platform.database.DatabasePlatform:
DEFAULT_VARCHAR_SIZE

Constructor Summary

AccessConstructor and Description
public
PervasivePlatform()

Default constructor.

Method Summary

Modifier and TypeMethod and Description
protected Map<String, Class<?>>
buildClassTypes()

Overrides org.eclipse.persistence.internal.databaseaccess.DatabasePlatform.buildClassTypes.

Return the mapping of class types to database types for the schema framework.
protected Hashtable<Class<?>, FieldTypeDefinition>
buildFieldTypes()

Overrides org.eclipse.persistence.internal.databaseaccess.DatabasePlatform.buildFieldTypes.

Return the mapping of class types to database types for the schema framework.
public ValueReadQuery
protected ExpressionOperator
dateToStringOperator()

Cloned from MySQLPlatform.java

protected String
public String
public String
public String
public String
public String
getProcedureCallHeader()

Overrides org.eclipse.persistence.internal.databaseaccess.DatabasePlatform.getProcedureCallHeader.

Pervasive uses CALL or EXECUTE not CALL PROCEDURE or EXECUTE PROCEDURE
public String
public String
getSelectForUpdateString()

Overrides org.eclipse.persistence.internal.databaseaccess.DatabasePlatform.getSelectForUpdateString.

Temporary workaround to avoid joined queries with FOR UPDATE in them
public String
public DatabaseTable
getTempTableForTable(DatabaseTable
is original table for which temp table is created.
table
)

Overrides org.eclipse.persistence.internal.databaseaccess.DatabasePlatform.getTempTableForTable.

INTERNAL:
protected void
public boolean
public boolean
public void
printFieldIdentityClause(Writer writer)

Overrides org.eclipse.persistence.internal.databaseaccess.DatabasePlatform.printFieldIdentityClause.

Append the receiver's field 'identity' constraint clause to a writer.
public void
printFieldTypeSize(Writer writer, FieldDefinition field, FieldTypeDefinition fieldType, boolean shouldPrintFieldIdentityClause)

Overrides org.eclipse.persistence.internal.databaseaccess.DatabasePlatform.printFieldTypeSize.

Taken from org.eclipse.persistence\foundation\org.eclipse.persistence.core\src\org\eclipse\persistence\platform\database\AccessPlatform.java
public boolean
requiresProcedureBrackets()

Overrides org.eclipse.persistence.internal.databaseaccess.DatabasePlatform.requiresProcedureBrackets.

In CREATE PROCEDURE, Pervasive requires brackets after the procedure name, even if there are no arguments.
public boolean
public boolean
public boolean
shouldPrintStoredProcedureArgumentNameInCall()

Overrides org.eclipse.persistence.internal.databaseaccess.DatabasePlatform.shouldPrintStoredProcedureArgumentNameInCall.

INTERNAL: Pervasive SQL stored procedure calls do not require the argument name be printed in the call string e.g. call MyStoredProc(?) instead of call MyStoredProc(myvariable = ?)
public boolean
shouldUseJDBCOuterJoinSyntax()

Overrides org.eclipse.persistence.internal.databaseaccess.DatabasePlatform.shouldUseJDBCOuterJoinSyntax.

JDBC defines an outer join syntax which many drivers do not support.
public ExpressionOperator
singleArgumentSubstringOperator()

Override the default SubstringSingleArg operator.

public boolean
supportsDeleteOnCascade()

Overrides org.eclipse.persistence.internal.databaseaccess.DatabasePlatform.supportsDeleteOnCascade.

Setting this to false (cf. Sybase) to work around problem that unspecified default delete rule is RESTRICT, even when not allowed due to self-referencing table.
public boolean
supportsGlobalTempTables()

Overrides org.eclipse.persistence.internal.databaseaccess.DatabasePlatform.supportsGlobalTempTables.

INTERNAL: Indicates whether the platform supports global temporary tables.
public boolean
public boolean
public boolean
supportsLockingQueriesWithMultipleTables()

Overrides org.eclipse.persistence.internal.databaseaccess.DatabasePlatform.supportsLockingQueriesWithMultipleTables.

INTERNAL: Indicates whether locking clause could be applied to the query that has more than one table
protected ExpressionOperator
toCharOperator()

Cloned from MySQLPlatform.java

protected ExpressionOperator
toDateOperator()

Cloned from MySQLPlatform.java

protected ExpressionOperator

Field Detail

DEFAULT_CHAR_SIZEback to summary
public static final int DEFAULT_CHAR_SIZE

Constructor Detail

PervasivePlatformback to summary
public PervasivePlatform()

Default constructor.

Method Detail

buildClassTypesback to summary
protected Map<String, Class<?>> buildClassTypes()

Overrides org.eclipse.persistence.internal.databaseaccess.DatabasePlatform.buildClassTypes.

Doc from org.eclipse.persistence.internal.databaseaccess.DatabasePlatform.buildClassTypes.

Return the mapping of class types to database types for the schema framework.

Annotations
@Override
buildFieldTypesback to summary
protected Hashtable<Class<?>, FieldTypeDefinition> buildFieldTypes()

Overrides org.eclipse.persistence.internal.databaseaccess.DatabasePlatform.buildFieldTypes.

Doc from org.eclipse.persistence.internal.databaseaccess.DatabasePlatform.buildFieldTypes.

Return the mapping of class types to database types for the schema framework.

Annotations
@Override
buildSelectQueryForIdentityback to summary
public ValueReadQuery buildSelectQueryForIdentity()

Overrides org.eclipse.persistence.internal.databaseaccess.DatasourcePlatform.buildSelectQueryForIdentity.

INTERNAL: Build the identity query for native sequencing. Taken verbatim from org.eclipse.persistence\foundation\org.eclipse.persistence.core\src\org\eclipse\persistence\platform\database\SQLServerPlatform.java

Annotations
@Override
dateToStringOperatorback to summary
protected ExpressionOperator dateToStringOperator()

Cloned from MySQLPlatform.java

getCreateTempTableSqlPrefixback to summary
protected String getCreateTempTableSqlPrefix()

Overrides org.eclipse.persistence.internal.databaseaccess.DatabasePlatform.getCreateTempTableSqlPrefix.

INTERNAL:

Annotations
@Override
getInOutputProcedureTokenback to summary
public String getInOutputProcedureToken()

Overrides org.eclipse.persistence.internal.databaseaccess.DatabasePlatform.getInOutputProcedureToken.

Pervasive uses the INOUT keyword, as opposed to "IN OUT".

Annotations
@Override
getInputProcedureTokenback to summary
public String getInputProcedureToken()

Overrides org.eclipse.persistence.internal.databaseaccess.DatabasePlatform.getInputProcedureToken.

Pervasive uses IN prefix for INPUT parameters.

Annotations
@Override
getProcedureArgumentStringback to summary
public String getProcedureArgumentString()

Overrides org.eclipse.persistence.internal.databaseaccess.DatabasePlatform.getProcedureArgumentString.

Pervasive uses ":" as prefix for procedure arguments.

Annotations
@Override
getProcedureBeginStringback to summary
public String getProcedureBeginString()

Overrides org.eclipse.persistence.internal.databaseaccess.DatabasePlatform.getProcedureBeginString.

Pervasive requires BEGIN in a procedure statement.

Annotations
@Override
getProcedureCallHeaderback to summary
public String getProcedureCallHeader()

Overrides org.eclipse.persistence.internal.databaseaccess.DatabasePlatform.getProcedureCallHeader.

Pervasive uses CALL or EXECUTE not CALL PROCEDURE or EXECUTE PROCEDURE

Annotations
@Override
getProcedureEndStringback to summary
public String getProcedureEndString()

Overrides org.eclipse.persistence.internal.databaseaccess.DatabasePlatform.getProcedureEndString.

Pervasive requires END in a procedure statement.

Annotations
@Override
getSelectForUpdateStringback to summary
public String getSelectForUpdateString()

Overrides org.eclipse.persistence.internal.databaseaccess.DatabasePlatform.getSelectForUpdateString.

Temporary workaround to avoid joined queries with FOR UPDATE in them

Annotations
@Override
getStoredProcedureParameterPrefixback to summary
public String getStoredProcedureParameterPrefix()

Overrides org.eclipse.persistence.internal.databaseaccess.DatabasePlatform.getStoredProcedureParameterPrefix.

Pervasive uses ":" as prefix for procedure parameters.

Annotations
@Override
getTempTableForTableback to summary
public DatabaseTable getTempTableForTable(DatabaseTable table)

Overrides org.eclipse.persistence.internal.databaseaccess.DatabasePlatform.getTempTableForTable.

INTERNAL:

Parameters
table:DatabaseTable

Doc from org.eclipse.persistence.internal.databaseaccess.DatabasePlatform.getTempTableForTable.

is original table for which temp table is created.

Returns:DatabaseTable

Doc from org.eclipse.persistence.internal.databaseaccess.DatabasePlatform.getTempTableForTable.

temporary table

Annotations
@Override
initializePlatformOperatorsback to summary
protected void initializePlatformOperators()

Overrides org.eclipse.persistence.internal.databaseaccess.DatasourcePlatform.initializePlatformOperators.

Doc from org.eclipse.persistence.internal.databaseaccess.DatasourcePlatform.initializePlatformOperators.

Initialize any platform-specific operators

Annotations
@Override
isForUpdateCompatibleWithDistinctback to summary
public boolean isForUpdateCompatibleWithDistinct()

Overrides org.eclipse.persistence.internal.databaseaccess.DatabasePlatform.isForUpdateCompatibleWithDistinct.

INTERNAL: Indicates whether SELECT DISTINCT ... FOR UPDATE is allowed by the platform (Oracle doesn't allow this).

Annotations
@Override
isPervasiveback to summary
public boolean isPervasive()

Overrides org.eclipse.persistence.internal.databaseaccess.DatasourcePlatform.isPervasive.

Answers whether platform is Pervasive

Annotations
@Override
printFieldIdentityClauseback to summary
public void printFieldIdentityClause(Writer writer) throws ValidationException

Overrides org.eclipse.persistence.internal.databaseaccess.DatabasePlatform.printFieldIdentityClause.

Append the receiver's field 'identity' constraint clause to a writer. Taken from org.eclipse.persistence\foundation\org.eclipse.persistence.core\src\org\eclipse\persistence\platform\database\AccessPlatform.java

Annotations
@Override
printFieldTypeSizeback to summary
public void printFieldTypeSize(Writer writer, FieldDefinition field, FieldTypeDefinition fieldType, boolean shouldPrintFieldIdentityClause) throws IOException

Overrides org.eclipse.persistence.internal.databaseaccess.DatabasePlatform.printFieldTypeSize.

Taken from org.eclipse.persistence\foundation\org.eclipse.persistence.core\src\org\eclipse\persistence\platform\database\AccessPlatform.java

Annotations
@Override
requiresProcedureBracketsback to summary
public boolean requiresProcedureBrackets()

Overrides org.eclipse.persistence.internal.databaseaccess.DatabasePlatform.requiresProcedureBrackets.

In CREATE PROCEDURE, Pervasive requires brackets after the procedure name, even if there are no arguments.

Annotations
@Override
requiresProcedureCallOuputTokenback to summary
public boolean requiresProcedureCallOuputToken()

Overrides org.eclipse.persistence.internal.databaseaccess.DatabasePlatform.requiresProcedureCallOuputToken.

Pervasive requires the OUTPUT keyword for output parameters

Annotations
@Override
shouldPrintLockingClauseAfterWhereClauseback to summary
public boolean shouldPrintLockingClauseAfterWhereClause()

Overrides org.eclipse.persistence.internal.databaseaccess.DatabasePlatform.shouldPrintLockingClauseAfterWhereClause.

Attempts to remove FOR UPDATE from queries

Annotations
@Override
shouldPrintStoredProcedureArgumentNameInCallback to summary
public boolean shouldPrintStoredProcedureArgumentNameInCall()

Overrides org.eclipse.persistence.internal.databaseaccess.DatabasePlatform.shouldPrintStoredProcedureArgumentNameInCall.

INTERNAL: Pervasive SQL stored procedure calls do not require the argument name be printed in the call string e.g. call MyStoredProc(?) instead of call MyStoredProc(myvariable = ?)

Annotations
@Override
shouldUseJDBCOuterJoinSyntaxback to summary
public boolean shouldUseJDBCOuterJoinSyntax()

Overrides org.eclipse.persistence.internal.databaseaccess.DatabasePlatform.shouldUseJDBCOuterJoinSyntax.

JDBC defines an outer join syntax which many drivers do not support. So we normally avoid it.

Annotations
@Override
singleArgumentSubstringOperatorback to summary
public ExpressionOperator singleArgumentSubstringOperator()

Override the default SubstringSingleArg operator. Cloned from SybasePlatform.java

supportsDeleteOnCascadeback to summary
public boolean supportsDeleteOnCascade()

Overrides org.eclipse.persistence.internal.databaseaccess.DatabasePlatform.supportsDeleteOnCascade.

Setting this to false (cf. Sybase) to work around problem that unspecified default delete rule is RESTRICT, even when not allowed due to self-referencing table.

Annotations
@Override
supportsGlobalTempTablesback to summary
public boolean supportsGlobalTempTables()

Overrides org.eclipse.persistence.internal.databaseaccess.DatabasePlatform.supportsGlobalTempTables.

Doc from org.eclipse.persistence.internal.databaseaccess.DatabasePlatform.supportsGlobalTempTables.

INTERNAL: Indicates whether the platform supports global temporary tables. "Global" means that an attempt to create temporary table with the same name for the second time results in exception. EclipseLink attempts to create global temporary table in the beginning of UpdateAllQuery, execution and assumes that it already exists in case SQLException results. In the end of UpdateAllQuery execution all rows are removed from the temporary table - it is necessary in case the same temporary table will be used by another UpdateAllQuery in the same transaction. Override this method if the platform supports global temporary tables. Note that this method is ignored in case supportsLocalTempTables() returns true.

Annotations
@Override
supportsIdentityback to summary
public boolean supportsIdentity()

Overrides org.eclipse.persistence.internal.databaseaccess.DatasourcePlatform.supportsIdentity.

Indicates whether the platform supports identity.

Annotations
@Override
supportsLocalTempTablesback to summary
public boolean supportsLocalTempTables()

Overrides org.eclipse.persistence.internal.databaseaccess.DatabasePlatform.supportsLocalTempTables.

INTERNAL:

Annotations
@Override
supportsLockingQueriesWithMultipleTablesback to summary
public boolean supportsLockingQueriesWithMultipleTables()

Overrides org.eclipse.persistence.internal.databaseaccess.DatabasePlatform.supportsLockingQueriesWithMultipleTables.

INTERNAL: Indicates whether locking clause could be applied to the query that has more than one table

Annotations
@Override
toCharOperatorback to summary
protected ExpressionOperator toCharOperator()

Cloned from MySQLPlatform.java

toDateOperatorback to summary
protected ExpressionOperator toDateOperator()

Cloned from MySQLPlatform.java

toNumberOperatorback to summary
protected ExpressionOperator toNumberOperator()