Module org.eclipse.persistence.core
Interface Platform
- All Superinterfaces:
Cloneable
,CorePlatform<ConversionManager>
,Serializable
- All Known Implementing Classes:
AccessPlatform
,AQPlatform
,AttunityPlatform
,CloudscapePlatform
,DatabasePlatform
,DatabasePlatform
,DatasourcePlatform
,DB2MainframePlatform
,DB2Platform
,DB2ZPlatform
,DBasePlatform
,DerbyPlatform
,DOMPlatform
,EISPlatform
,FirebirdPlatform
,H2Platform
,HANAPlatform
,HSQLPlatform
,Informix11Platform
,InformixPlatform
,JavaDBPlatform
,JMSPlatform
,MariaDBPlatform
,MaxDBPlatform
,MongoPlatform
,MySQLPlatform
,Oracle10Platform
,Oracle10Platform
,Oracle11Platform
,Oracle11Platform
,Oracle12Platform
,Oracle12Platform
,Oracle18Platform
,Oracle18Platform
,Oracle19Platform
,Oracle19Platform
,Oracle21Platform
,Oracle21Platform
,Oracle23Platform
,Oracle23Platform
,Oracle8Platform
,Oracle8Platform
,Oracle9Platform
,Oracle9Platform
,OracleNoSQLPlatform
,OracleNoSQLPlatform
,OraclePlatform
,PervasivePlatform
,PointBasePlatform
,PostgreSQL10Platform
,PostgreSQLPlatform
,SAXPlatform
,SQLAnywherePlatform
,SQLServerPlatform
,SybasePlatform
,SymfowarePlatform
,TimesTen7Platform
,TimesTenPlatform
,XMLFilePlatform
,XMLPlatform
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:
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addSequence
(Sequence sequence) Add sequence.void
addSequence
(Sequence sequence, boolean isConnected) Add sequence.void
appendParameter
(Call call, Writer writer, Object parameter) Add the parameter.clone()
INTERNAL: Get platform specific connection properties.<T> T
convertObject
(Object sourceObject, Class<T> javaClass) Convert the object to the appropriate type by invoking the appropriate ConversionManager methodvoid
Copy the state into the new platform.The platform hold its own instance of conversion manager to allow customization.getCustomModifyValueForCall
(Call call, Object value, DatabaseField field, boolean shouldBind) Allow for the platform to handle the representation of parameters specially.Get default sequence.INTERNAL: Used only for writing into XML or Java.Return the driver version.Delimiter to use for fields and tables using spaces or other special values.getSequence
(String seqName) Get sequence corresponding to the name.INTERNAL: Returns a map of sequence names to Sequences (may be null).INTERNAL: Used only for writing into XML or Java.Delimiter to use for fields and tables using spaces or other special values.Return the qualifier for the table.getTimestampFromServer
(AbstractSession session, String sessionName) Answer the timestamp from the server.This method can be overridden by subclasses to return a query that will return the timestamp from the server.This method can be overridden by subclasses to return a query that will return the UUID from the server.void
Allow the platform to initialize itself after login/init.void
initIdentitySequences
(Session session, String defaultIdentityGenerator) INTERNAL: Initialize platform specific identity sequences.boolean
isAccess()
boolean
boolean
boolean
isDB2()
boolean
isDB2Z()
boolean
isDBase()
boolean
isDerby()
boolean
isH2()
boolean
isHANA()
boolean
isHSQL()
boolean
boolean
boolean
isMaxDB()
boolean
isMySQL()
boolean
isODBC()
boolean
isOracle()
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
isSybase()
boolean
boolean
boolean
void
Remove all sequences that were added through addSequence method.void
removeIdentitySequences
(Session session, String defaultIdentityGenerator, Set<String> tableNames) INTERNAL: Remove platform specific identity sequences for specified tables.removeSequence
(String seqName) Remove sequence corresponding to the name (the sequence was added through addSequence method) Don't use if the session is connected.void
setConversionManager
(ConversionManager conversionManager) The platform hold its own instance of conversion manager to allow customization.void
setDefaultSequence
(Sequence sequence) Set default sequence.void
setSequences
(Map<String, Sequence> sequences) INTERNAL: Used only for reading from XML.void
setTableQualifier
(String qualifier) Set the qualifier for the table.void
setTimestampQuery
(ValueReadQuery tsQuery) Can override the default query for returning a timestamp from the server.void
setUUIDQuery
(ValueReadQuery uuidQuery) Can override the default query for returning a UUID from the server.boolean
Allow for the platform to handle the representation of parameters specially.boolean
INTERNAL: Indicates whether defaultSequence is the same as platform default sequence.
-
Method Details
-
clone
Object clone() -
convertObject
Convert the object to the appropriate type by invoking the appropriate ConversionManager method- Specified by:
convertObject
in interfaceCorePlatform<ConversionManager>
- Parameters:
sourceObject
- the object that must be convertedjavaClass
- the class that the object must be converted to- Returns:
- the newly converted object
- Throws:
ConversionException
- all exceptions will be thrown as this type.
-
copyInto
Copy the state into the new platform. -
getConversionManager
ConversionManager getConversionManager()The platform hold its own instance of conversion manager to allow customization.- Specified by:
getConversionManager
in interfaceCorePlatform<ConversionManager>
-
setConversionManager
The platform hold its own instance of conversion manager to allow customization. -
getDriverVersion
String getDriverVersion()Return the driver version. -
getTableQualifier
String getTableQualifier()Return the qualifier for the table. Required by some databases such as Oracle and DB2 -
getTimestampFromServer
Answer the timestamp from the server. -
getTimestampQuery
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. -
getUUIDQuery
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. -
isH2
boolean isH2() -
isAccess
boolean isAccess() -
isAttunity
boolean isAttunity() -
isCloudscape
boolean isCloudscape() -
isDerby
boolean isDerby() -
isDB2
boolean isDB2() -
isDB2Z
boolean isDB2Z() -
isDBase
boolean isDBase() -
isHANA
boolean isHANA() -
isHSQL
boolean isHSQL() -
isInformix
boolean isInformix() -
isMaxDB
boolean isMaxDB() -
isMariaDB
boolean isMariaDB() -
isMySQL
boolean isMySQL() -
isODBC
boolean isODBC() -
isOracle
boolean isOracle() -
isOracle9
boolean isOracle9() -
isOracle12
boolean isOracle12() -
isOracle23
boolean isOracle23() -
isPointBase
boolean isPointBase() -
isSQLAnywhere
boolean isSQLAnywhere() -
isSQLServer
boolean isSQLServer() -
isSybase
boolean isSybase() -
isSymfoware
boolean isSymfoware() -
isTimesTen
boolean isTimesTen() -
isTimesTen7
boolean isTimesTen7() -
isPostgreSQL
boolean isPostgreSQL() -
initialize
void initialize()Allow the platform to initialize itself after login/init. -
setTableQualifier
Set the qualifier for the table. Required by some databases such as Oracle and DB2 -
setTimestampQuery
Can override the default query for returning a timestamp from the server. See: getTimestampFromServer -
setUUIDQuery
Can override the default query for returning a UUID from the server. -
appendParameter
Add the parameter. Convert the parameter to a string and write it. -
getCustomModifyValueForCall
Object getCustomModifyValueForCall(Call call, Object value, DatabaseField field, boolean shouldBind) Allow for the platform to handle the representation of parameters specially. -
getEndDelimiter
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. -
getStartDelimiter
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. -
shouldUseCustomModifyForCall
Allow for the platform to handle the representation of parameters specially. -
getDefaultSequence
Sequence getDefaultSequence()Get default sequence. Sequence name shouldn't be altered - don't do: getDefaultSequence().setName(newName). -
setDefaultSequence
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". -
addSequence
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. -
addSequence
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. -
getSequence
Get sequence corresponding to the name. The name shouldn't be altered - don't do: getSequence(name).setName(newName) -
removeSequence
Remove sequence corresponding to the name (the sequence was added through addSequence method) Don't use if the session is connected. -
removeAllSequences
void removeAllSequences()Remove all sequences that were added through addSequence method. -
getSequences
INTERNAL: Returns a map of sequence names to Sequences (may be null). -
getSequencesToWrite
INTERNAL: Used only for writing into XML or Java. -
getDefaultSequenceToWrite
Sequence getDefaultSequenceToWrite()INTERNAL: Used only for writing into XML or Java. -
setSequences
INTERNAL: Used only for reading from XML. -
usesPlatformDefaultSequence
boolean usesPlatformDefaultSequence()INTERNAL: Indicates whether defaultSequence is the same as platform default sequence. -
initIdentitySequences
INTERNAL: Initialize platform specific identity sequences. This method is called fromEntityManagerSetupImpl
after login and optional schema generation. Method is also called fromTableCreator
class during tables creation and update..- Parameters:
session
- Active database session (in connected state).defaultIdentityGenerator
- Default identity generator sequence name.- Since:
- 2.7
-
removeIdentitySequences
void removeIdentitySequences(Session session, String defaultIdentityGenerator, Set<String> tableNames) INTERNAL: Remove platform specific identity sequences for specified tables. Default identity sequences are restored. Method is also called fromTableCreator
class during tables removal.- Parameters:
session
- Active database session (in connected state).defaultIdentityGenerator
- Default identity generator sequence name.tableNames
- Set of table names to check for identity sequence removal.- Since:
- 2.7
-
connectionProperties
INTERNAL: Get platform specific connection properties.- Returns:
- properties to be added to connection properties
-