Interface Platform
-
- All Superinterfaces:
java.lang.Cloneable,CorePlatform<ConversionManager>,java.io.Serializable
- All Known Implementing Classes:
AccessPlatform,AttunityPlatform,CloudscapePlatform,DatabasePlatform,DatabasePlatform,DatasourcePlatform,DB2MainframePlatform,DB2Platform,DB2ZPlatform,DBasePlatform,DerbyPlatform,DOMPlatform,EISPlatform,FirebirdPlatform,H2Platform,HANAPlatform,HSQLPlatform,Informix11Platform,InformixPlatform,JavaDBPlatform,MaxDBPlatform,MySQLPlatform,Oracle10Platform,Oracle11Platform,Oracle12Platform,Oracle18Platform,Oracle19Platform,Oracle21Platform,Oracle8Platform,Oracle9Platform,OraclePlatform,PervasivePlatform,PointBasePlatform,PostgreSQLPlatform,SAXPlatform,SQLAnywherePlatform,SQLServerPlatform,SybasePlatform,SymfowarePlatform,TimesTen7Platform,TimesTenPlatform,XMLPlatform
public interface Platform extends CorePlatform<ConversionManager>, java.io.Serializable, java.lang.Cloneable
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,EISPlatform
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaddSequence(Sequence sequence)Add sequence.voidaddSequence(Sequence sequence, boolean isConnected)Add sequence.voidappendParameter(Call call, java.io.Writer writer, java.lang.Object parameter)Add the parameter.java.lang.Objectclone()java.lang.ObjectconvertObject(java.lang.Object sourceObject, java.lang.Class javaClass)Convert the object to the appropriate type by invoking the appropriate ConversionManager methodvoidcopyInto(Platform platform)Copy the state into the new platform.ConversionManagergetConversionManager()The platform hold its own instance of conversion manager to allow customization.java.lang.ObjectgetCustomModifyValueForCall(Call call, java.lang.Object value, DatabaseField field, boolean shouldBind)Allow for the platform to handle the representation of parameters specially.SequencegetDefaultSequence()Get default sequence.SequencegetDefaultSequenceToWrite()INTERNAL: Used only for writing into XML or Java.java.lang.StringgetEndDelimiter()Delimiter to use for fields and tables using spaces or other special values.SequencegetSequence(java.lang.String seqName)Get sequence corresponding to the name.java.util.MapgetSequences()INTERNAL: Returns a map of sequence names to Sequences (may be null).java.util.MapgetSequencesToWrite()INTERNAL: Used only for writing into XML or Java.java.lang.StringgetStartDelimiter()Delimiter to use for fields and tables using spaces or other special values.java.lang.StringgetTableQualifier()Return the qualifier for the table.java.sql.TimestampgetTimestampFromServer(AbstractSession session, java.lang.String sessionName)Answer the timestamp from the server.ValueReadQuerygetTimestampQuery()This method can be overridden by subclasses to return a query that will return the timestamp from the server.voidinitialize()Allow the platform to initialize itself after login/init.booleanisAccess()booleanisAttunity()booleanisCloudscape()booleanisDB2()booleanisDB2Z()booleanisDBase()booleanisDerby()booleanisH2()booleanisHANA()booleanisHSQL()booleanisInformix()booleanisMaxDB()booleanisMySQL()booleanisODBC()booleanisOracle()booleanisOracle9()booleanisPointBase()booleanisPostgreSQL()booleanisSQLAnywhere()booleanisSQLServer()booleanisSybase()booleanisSymfoware()booleanisTimesTen()booleanisTimesTen7()voidremoveAllSequences()Remove all sequences that were added through addSequence method.SequenceremoveSequence(java.lang.String seqName)Remove sequence corresponding to the name (the sequence was added through addSequence method) Don't use if the session is connected.voidsetConversionManager(ConversionManager conversionManager)The platform hold its own instance of conversion manager to allow customization.voidsetDefaultSequence(Sequence sequence)Set default sequence.voidsetSequences(java.util.Map sequences)INTERNAL: Used only for reading from XML.voidsetTableQualifier(java.lang.String qualifier)Set the qualifier for the table.voidsetTimestampQuery(ValueReadQuery tsQuery)Can override the default query for returning a timestamp from the server.booleanshouldUseCustomModifyForCall(DatabaseField field)Allow for the platform to handle the representation of parameters specially.booleanusesPlatformDefaultSequence()INTERNAL: Indicates whether defaultSequence is the same as platform default sequence.
-
-
-
Method Detail
-
clone
java.lang.Object clone()
-
convertObject
java.lang.Object convertObject(java.lang.Object sourceObject, java.lang.Class javaClass) throws ConversionExceptionConvert the object to the appropriate type by invoking the appropriate ConversionManager method- Specified by:
convertObjectin interfaceCorePlatform<ConversionManager>- Parameters:
object- - the object that must be convertedjavaClass- - the class that the object must be converted to- Returns:
- - the newly converted object
- Throws:
ConversionException
-
copyInto
void copyInto(Platform platform)
Copy the state into the new platform.
-
getConversionManager
ConversionManager getConversionManager()
The platform hold its own instance of conversion manager to allow customization.- Specified by:
getConversionManagerin interfaceCorePlatform<ConversionManager>
-
setConversionManager
void setConversionManager(ConversionManager conversionManager)
The platform hold its own instance of conversion manager to allow customization.
-
getTableQualifier
java.lang.String getTableQualifier()
Return the qualifier for the table. Required by some databases such as Oracle and DB2
-
getTimestampFromServer
java.sql.Timestamp getTimestampFromServer(AbstractSession session, java.lang.String sessionName)
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.
-
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()
-
isMySQL
boolean isMySQL()
-
isODBC
boolean isODBC()
-
isOracle
boolean isOracle()
-
isOracle9
boolean isOracle9()
-
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
void setTableQualifier(java.lang.String qualifier)
Set the qualifier for the table. Required by some databases such as Oracle and DB2
-
setTimestampQuery
void setTimestampQuery(ValueReadQuery tsQuery)
Can override the default query for returning a timestamp from the server. See: getTimestampFromServer
-
appendParameter
void appendParameter(Call call, java.io.Writer writer, java.lang.Object parameter)
Add the parameter. Convert the parameter to a string and write it.
-
getCustomModifyValueForCall
java.lang.Object getCustomModifyValueForCall(Call call, java.lang.Object value, DatabaseField field, boolean shouldBind)
Allow for the platform to handle the representation of parameters specially.
-
getEndDelimiter
java.lang.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
java.lang.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
boolean shouldUseCustomModifyForCall(DatabaseField field)
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
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".
-
addSequence
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.
-
addSequence
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.
-
getSequence
Sequence getSequence(java.lang.String seqName)
Get sequence corresponding to the name. The name shouldn't be altered - don't do: getSequence(name).setName(newName)
-
removeSequence
Sequence removeSequence(java.lang.String seqName)
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
java.util.Map getSequences()
INTERNAL: Returns a map of sequence names to Sequences (may be null).
-
getSequencesToWrite
java.util.Map getSequencesToWrite()
INTERNAL: Used only for writing into XML or Java.
-
getDefaultSequenceToWrite
Sequence getDefaultSequenceToWrite()
INTERNAL: Used only for writing into XML or Java.
-
setSequences
void setSequences(java.util.Map sequences)
INTERNAL: Used only for reading from XML.
-
usesPlatformDefaultSequence
boolean usesPlatformDefaultSequence()
INTERNAL: Indicates whether defaultSequence is the same as platform default sequence.
-
-