Top Description Methods
org.eclipse.persistence.internal.databaseaccess

public Interface Platform

extends CorePlatform<ConversionManager>, Serializable, Cloneable
Known Direct Implementers
org.eclipse.persistence.internal.databaseaccess.DatasourcePlatform
Imports
java.io.Serializable, .Writer, java.util.Collections, .Map, .Properties, .Set, org.eclipse.persistence.exceptions.ConversionException, org.eclipse.persistence.internal.core.databaseaccess.CorePlatform, org.eclipse.persistence.internal.helper.ConversionManager, .DatabaseField, org.eclipse.persistence.internal.sessions.AbstractSession, org.eclipse.persistence.queries.Call, .ValueReadQuery, org.eclipse.persistence.sequencing.Sequence, org.eclipse.persistence.sessions.Session

Platform is private to TopLink. It encapsulates behavior specific to a datasource platform (eg. Oracle, Sybase, DB2, Attunity, MQSeries), and provides the interface for TopLink to access this behavior.
Since
OracleAS TopLink 10g (10.0.3)
See Also
DatasourcePlatform, DatabasePlatform, org.eclipse.persistence.eis.EISPlatform

Method Summary

Modifier and TypeMethod and Description
public void
addSequence(Sequence sequence)

Add sequence.

public void
addSequence(Sequence sequence, boolean isConnected)

Add sequence.

public void
appendParameter(Call call, Writer writer, Object parameter)

Add the parameter.

public Object
public default Map<Object, Object>

Returns:

properties to be added to connection properties
connectionProperties
()

INTERNAL: Get platform specific connection properties.

public <T> T

Returns:

the newly converted object
convertObject
(Object
the object that must be converted
sourceObject
,
Class<T>
the class that the object must be converted to
javaClass
)

Redeclares org.eclipse.persistence.internal.core.databaseaccess.CorePlatform.convertObject.

Convert the object to the appropriate type by invoking the appropriate ConversionManager method
public void
copyInto(Platform platform)

Copy the state into the new platform.

public ConversionManager
getConversionManager()

Redeclares org.eclipse.persistence.internal.core.databaseaccess.CorePlatform.getConversionManager.

The platform hold its own instance of conversion manager to allow customization.
public Object
getCustomModifyValueForCall(Call call, Object value, DatabaseField field, boolean shouldBind)

Allow for the platform to handle the representation of parameters specially.

public Sequence
getDefaultSequence()

Get default sequence.

public Sequence
getDefaultSequenceToWrite()

INTERNAL: Used only for writing into XML or Java.

public String
getDriverVersion()

Return the driver version.

public String
getEndDelimiter()

Delimiter to use for fields and tables using spaces or other special values.

public Sequence
getSequence(String seqName)

Get sequence corresponding to the name.

public Map<String, Sequence>
getSequences()

INTERNAL: Returns a map of sequence names to Sequences (may be null).

public Map<String, Sequence>
getSequencesToWrite()

INTERNAL: Used only for writing into XML or Java.

public String
getStartDelimiter()

Delimiter to use for fields and tables using spaces or other special values.

public String
getTableQualifier()

Return the qualifier for the table.

public Timestamp
getTimestampFromServer(AbstractSession session, String sessionName)

Answer the timestamp from the server.

public ValueReadQuery
getTimestampQuery()

This method can be overridden by subclasses to return a query that will return the timestamp from the server.

public ValueReadQuery
getUUIDQuery()

This method can be overridden by subclasses to return a query that will return the UUID from the server.

public void
initialize()

Allow the platform to initialize itself after login/init.

public void
initIdentitySequences(final Session
Active database session (in connected state).
session
,
final String
Default identity generator sequence name.
defaultIdentityGenerator
)

INTERNAL: Initialize platform specific identity sequences.

public boolean
public boolean
public boolean
public boolean
public boolean
public boolean
public boolean
public boolean
isH2()

public boolean
public boolean
public boolean
public boolean
public boolean
public boolean
public boolean
public boolean
public boolean
public boolean
public boolean
public boolean
public boolean
public boolean
public boolean
public boolean
public boolean
public boolean
public boolean
public void
removeAllSequences()

Remove all sequences that were added through addSequence method.

public void
removeIdentitySequences(final Session
Active database session (in connected state).
session
,
final String
Default identity generator sequence name.
defaultIdentityGenerator
,
final Set<String>
Set of table names to check for identity sequence removal.
tableNames
)

INTERNAL: Remove platform specific identity sequences for specified tables.

public Sequence
removeSequence(String seqName)

Remove sequence corresponding to the name (the sequence was added through addSequence method) Don't use if the session is connected.

public void
setConversionManager(ConversionManager conversionManager)

The platform hold its own instance of conversion manager to allow customization.

public void
setDefaultSequence(Sequence sequence)

Set default sequence.

public void
setSequences(Map<String, Sequence> sequences)

INTERNAL: Used only for reading from XML.

public void
setTableQualifier(String qualifier)

Set the qualifier for the table.

public void
setTimestampQuery(ValueReadQuery tsQuery)

Can override the default query for returning a timestamp from the server.

public void
setUUIDQuery(ValueReadQuery uuidQuery)

Can override the default query for returning a UUID from the server.

public boolean
shouldUseCustomModifyForCall(DatabaseField field)

Allow for the platform to handle the representation of parameters specially.

public boolean
usesPlatformDefaultSequence()

INTERNAL: Indicates whether defaultSequence is the same as platform default sequence.

Method Detail

addSequenceback to summary
public void addSequence(Sequence sequence)

Add sequence. The sequence should have a unique name that shouldn't be altered after the sequence has been added - don't do: getSequence(name).setName(newName)) Don't use if the session is connected.

addSequenceback to summary
public void addSequence(Sequence sequence, boolean isConnected)

Add sequence. The sequence should have a unique name that shouldn't be altered after the sequence has been added - don't do: getSequence(name).setName(newName)) Use this method with isConnected parameter set to true to add a sequence to connected session. If sequencing is connected then the sequence is added only if there is no sequence with the same name already in use.

appendParameterback to summary
public void appendParameter(Call call, Writer writer, Object parameter)

Add the parameter. Convert the parameter to a string and write it.

cloneback to summary
public Object clone()
connectionPropertiesback to summary
public default Map<Object, Object> connectionProperties()

INTERNAL: Get platform specific connection properties.

Returns:Map<Object, Object>

properties to be added to connection properties

convertObjectback to summary
public <T> T convertObject(Object sourceObject, Class<T> javaClass) throws ConversionException

Redeclares org.eclipse.persistence.internal.core.databaseaccess.CorePlatform.convertObject.

Convert the object to the appropriate type by invoking the appropriate ConversionManager method

Parameters
sourceObject:Object

the object that must be converted

javaClass:Class<T>

the class that the object must be converted to

Returns:T

the newly converted object

Annotations
@Override
Exceptions
ConversionException:
all exceptions will be thrown as this type.
copyIntoback to summary
public void copyInto(Platform platform)

Copy the state into the new platform.

getConversionManagerback to summary
public ConversionManager getConversionManager()

Redeclares org.eclipse.persistence.internal.core.databaseaccess.CorePlatform.getConversionManager.

The platform hold its own instance of conversion manager to allow customization.

Annotations
@Override
getCustomModifyValueForCallback to summary
public Object getCustomModifyValueForCall(Call call, Object value, DatabaseField field, boolean shouldBind)

Allow for the platform to handle the representation of parameters specially.

getDefaultSequenceback to summary
public Sequence getDefaultSequence()

Get default sequence. Sequence name shouldn't be altered - don't do: getDefaultSequence().setName(newName).

getDefaultSequenceToWriteback to summary
public Sequence getDefaultSequenceToWrite()

INTERNAL: Used only for writing into XML or Java.

getDriverVersionback to summary
public String getDriverVersion()

Return the driver version.

getEndDelimiterback to summary
public String getEndDelimiter()

Delimiter to use for fields and tables using spaces or other special values. Some databases use different delimiters for the beginning and end of the value. This delimiter indicates the end of the value.

getSequenceback to summary
public Sequence getSequence(String seqName)

Get sequence corresponding to the name. The name shouldn't be altered - don't do: getSequence(name).setName(newName)

getSequencesback to summary
public Map<String, Sequence> getSequences()

INTERNAL: Returns a map of sequence names to Sequences (may be null).

getSequencesToWriteback to summary
public Map<String, Sequence> getSequencesToWrite()

INTERNAL: Used only for writing into XML or Java.

getStartDelimiterback to summary
public String getStartDelimiter()

Delimiter to use for fields and tables using spaces or other special values. Some databases use different delimiters for the beginning and end of the value. This delimiter indicates the start of the value.

getTableQualifierback to summary
public String getTableQualifier()

Return the qualifier for the table. Required by some databases such as Oracle and DB2

getTimestampFromServerback to summary
public Timestamp getTimestampFromServer(AbstractSession session, String sessionName)

Answer the timestamp from the server.

getTimestampQueryback to summary
public ValueReadQuery getTimestampQuery()

This method can be overridden by subclasses to return a query that will return the timestamp from the server. return null if the time should be the local time.

getUUIDQueryback to summary
public ValueReadQuery getUUIDQuery()

This method can be overridden by subclasses to return a query that will return the UUID from the server. return null if UUID generation is not available at the server.

initializeback to summary
public void initialize()

Allow the platform to initialize itself after login/init.

initIdentitySequencesback to summary
public void initIdentitySequences(final Session session, final String defaultIdentityGenerator)

INTERNAL: Initialize platform specific identity sequences. This method is called from EntityManagerSetupImpl after login and optional schema generation. Method is also called from TableCreator class during tables creation and update..

Parameters
session:Session

Active database session (in connected state).

defaultIdentityGenerator:String

Default identity generator sequence name.

Since
2.7
isAccessback to summary
public boolean isAccess()
isAttunityback to summary
public boolean isAttunity()
isCloudscapeback to summary
public boolean isCloudscape()
isDB2back to summary
public boolean isDB2()
isDB2Zback to summary
public boolean isDB2Z()
isDBaseback to summary
public boolean isDBase()
isDerbyback to summary
public boolean isDerby()
isH2back to summary
public boolean isH2()
isHANAback to summary
public boolean isHANA()
isHSQLback to summary
public boolean isHSQL()
isInformixback to summary
public boolean isInformix()
isMariaDBback to summary
public boolean isMariaDB()
isMaxDBback to summary
public boolean isMaxDB()
isMySQLback to summary
public boolean isMySQL()
isODBCback to summary
public boolean isODBC()
isOracleback to summary
public boolean isOracle()
isOracle12back to summary
public boolean isOracle12()
isOracle23back to summary
public boolean isOracle23()
isOracle9back to summary
public boolean isOracle9()
isPointBaseback to summary
public boolean isPointBase()
isPostgreSQLback to summary
public boolean isPostgreSQL()
isSQLAnywhereback to summary
public boolean isSQLAnywhere()
isSQLServerback to summary
public boolean isSQLServer()
isSybaseback to summary
public boolean isSybase()
isSymfowareback to summary
public boolean isSymfoware()
isTimesTenback to summary
public boolean isTimesTen()
isTimesTen7back to summary
public boolean isTimesTen7()
removeAllSequencesback to summary
public void removeAllSequences()

Remove all sequences that were added through addSequence method.

removeIdentitySequencesback to summary
public void removeIdentitySequences(final Session session, final String defaultIdentityGenerator, final Set<String> tableNames)

INTERNAL: Remove platform specific identity sequences for specified tables. Default identity sequences are restored. Method is also called from TableCreator class during tables removal.

Parameters
session:Session

Active database session (in connected state).

defaultIdentityGenerator:String

Default identity generator sequence name.

tableNames:Set<String>

Set of table names to check for identity sequence removal.

Since
2.7
removeSequenceback to summary
public Sequence removeSequence(String seqName)

Remove sequence corresponding to the name (the sequence was added through addSequence method) Don't use if the session is connected.

setConversionManagerback to summary
public void setConversionManager(ConversionManager conversionManager)

The platform hold its own instance of conversion manager to allow customization.

setDefaultSequenceback to summary
public void setDefaultSequence(Sequence sequence)

Set default sequence. The sequence should have a unique name that shouldn't be altered after the sequence has been set: don't do: getDefaultSequence().setName(newName)). Default constructors for Sequence subclasses set name to "SEQ".

setSequencesback to summary
public void setSequences(Map<String, Sequence> sequences)

INTERNAL: Used only for reading from XML.

setTableQualifierback to summary
public void setTableQualifier(String qualifier)

Set the qualifier for the table. Required by some databases such as Oracle and DB2

setTimestampQueryback to summary
public void setTimestampQuery(ValueReadQuery tsQuery)

Can override the default query for returning a timestamp from the server. See: getTimestampFromServer

setUUIDQueryback to summary
public void setUUIDQuery(ValueReadQuery uuidQuery)

Can override the default query for returning a UUID from the server.

shouldUseCustomModifyForCallback to summary
public boolean shouldUseCustomModifyForCall(DatabaseField field)

Allow for the platform to handle the representation of parameters specially.

usesPlatformDefaultSequenceback to summary
public boolean usesPlatformDefaultSequence()

INTERNAL: Indicates whether defaultSequence is the same as platform default sequence.