public class DatasourcePlatform extends java.lang.Object implements Platform
DatabasePlatform
,
EISPlatform
,
Serialized FormConstructor and Description |
---|
DatasourcePlatform() |
Modifier and Type | Method and Description |
---|---|
void |
addSequence(Sequence sequence)
Add sequence corresponding to the name
|
void |
addSequence(Sequence sequence,
boolean isSessionConnected)
Add sequence corresponding to the name.
|
void |
appendParameter(Call call,
java.io.Writer writer,
java.lang.Object parameter)
Add the parameter.
|
DatasourceCall |
buildNativeCall(java.lang.String queryString)
INTERNAL:
Return the correct call type for the native query string.
|
ValueReadQuery |
buildSelectQueryForIdentity()
INTERNAL:
Returns query used to read back the value generated by Identity.
|
ValueReadQuery |
buildSelectQueryForIdentity(java.lang.String seqName,
java.lang.Integer size)
INTERNAL:
Returns query used to read back the value generated by Identity.
|
ValueReadQuery |
buildSelectQueryForSequenceObject()
INTERNAL:
Returns query used to read value generated by sequence object (like Oracle sequence).
|
ValueReadQuery |
buildSelectQueryForSequenceObject(java.lang.String qualifiedSeqName,
java.lang.Integer size)
INTERNAL:
Returns query used to read value generated by sequence object (like Oracle sequence).
|
java.lang.Object |
clone() |
java.lang.Object |
convertObject(java.lang.Object sourceObject,
java.lang.Class javaClass)
Convert the object to the appropriate type by invoking the appropriate
ConversionManager method
|
void |
copyInto(Platform platform)
Copy the state into the new platform.
|
ConnectionCustomizer |
createConnectionCustomizer(Accessor accessor,
AbstractSession session)
INTERNAL:
|
ConversionManager |
getConversionManager()
The platform hold its own instance of conversion manager to allow customization.
|
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.
|
java.util.Vector |
getDataTypesConvertedFrom(java.lang.Class javaClass)
PUBLIC:
Return the list of Classes that can be converted to from the passed in javaClass.
|
java.util.Vector |
getDataTypesConvertedTo(java.lang.Class javaClass)
PUBLIC:
Return the list of Classes that can be converted from to the passed in javaClass.
|
boolean |
getDefaultNativeSequenceToTable()
Return if the native sequence type is not supported, if table sequencing should be used.
|
Sequence |
getDefaultSequence()
Get default sequence
|
Sequence |
getDefaultSequenceToWrite()
INTERNAL:
Used only for writing into XML or Java.
|
java.lang.String |
getEndDelimiter()
Delimiter to use for fields and tables using spaces or other special values.
|
java.lang.String |
getIdentifierQuoteCharacter()
Deprecated.
|
ExpressionOperator |
getOperator(int selector)
Return the operator for the operator constant defined in ExpressionOperator.
|
java.util.Map |
getPlatformOperators()
Return any platform-specific operators
|
ValueReadQuery |
getSelectSequenceQuery()
OBSOLETE:
This method lazy initializes the select sequence number query.
|
Sequence |
getSequence(java.lang.String seqName)
Get sequence corresponding to the name
|
int |
getSequencePreallocationSize() |
java.util.Map |
getSequences()
INTERNAL:
Returns a map of sequence names to Sequences (may be null).
|
java.util.Map |
getSequencesToWrite()
INTERNAL:
Used only for writing into XML or Java.
|
java.lang.String |
getStartDelimiter()
Delimiter to use for fields and tables using spaces or other special values.
|
java.lang.String |
getTableQualifier()
Return the qualifier for the table.
|
java.sql.Timestamp |
getTimestampFromServer(AbstractSession session,
java.lang.String sessionName)
Answer the timestamp from the server.
|
ValueReadQuery |
getTimestampQuery()
This method can be overridden by subclasses to return a
query that will return the timestamp from the server.
|
DataModifyQuery |
getUpdateSequenceQuery()
OBSOLETE:
This method lazy initializes the update sequence number query.
|
boolean |
hasDefaultSequence()
Get default sequence
|
void |
initialize()
Allow the platform to initialize itself after login/init.
|
void |
initializeDefaultQueries(DescriptorQueryManager queryManager,
AbstractSession session)
INTERNAL:
Allow the platform to initialize the CRUD queries to defaults.
|
boolean |
isAccess() |
boolean |
isAttunity() |
boolean |
isCloudscape() |
boolean |
isDB2() |
boolean |
isDBase() |
boolean |
isDerby() |
boolean |
isFirebird() |
boolean |
isH2() |
boolean |
isHANA() |
boolean |
isHSQL() |
boolean |
isInformix() |
boolean |
isMaxDB() |
boolean |
isMySQL() |
boolean |
isODBC() |
boolean |
isOracle() |
boolean |
isOracle9() |
boolean |
isPervasive() |
boolean |
isPointBase() |
boolean |
isPostgreSQL() |
boolean |
isSQLAnywhere() |
boolean |
isSQLServer() |
boolean |
isSybase() |
boolean |
isSymfoware() |
boolean |
isTimesTen() |
boolean |
isTimesTen7() |
void |
removeAllSequences()
Remove all sequences, but the default one.
|
Sequence |
removeSequence(java.lang.String seqName)
Remove sequence corresponding to name.
|
void |
setConversionManager(ConversionManager conversionManager)
The platform hold its own instance of conversion manager to allow customization.
|
void |
setDefaultNativeSequenceToTable(boolean defaultNativeSequenceToTable)
Set if the native sequence type is not supported, if table sequencing should be used.
|
void |
setDefaultSequence(Sequence sequence)
Set default sequence.
|
void |
setEndDelimiter(java.lang.String endDelimiter)
Delimiter to use for fields and tables using spaces or other special values.
|
void |
setSelectSequenceNumberQuery(ValueReadQuery seqQuery)
OBSOLETE:
Can override the default query for returning the sequence numbers.
|
void |
setSequencePreallocationSize(int size)
Set the number of sequence values to preallocate.
|
void |
setSequences(java.util.Map sequences)
INTERNAL:
Sets sequences - for XML support only
|
void |
setStartDelimiter(java.lang.String startDelimiter)
Delimiter to use for fields and tables using spaces or other special values.
|
void |
setTableQualifier(java.lang.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 |
setUpdateSequenceQuery(DataModifyQuery updateSequenceNumberQuery)
This method sets the update sequence number query.
|
boolean |
shouldNativeSequenceUseTransaction()
INTERNAL:
Indicates whether a separate transaction is required for NativeSequence.
|
boolean |
shouldPrepare(DatabaseQuery query)
Allows query prepare to be disable in the platform.
|
boolean |
shouldSelectDistinctIncludeOrderBy()
Return if the database requires the ORDER BY fields to be part of the select clause.
|
boolean |
shouldSelectIncludeOrderBy()
Return if the database requires the ORDER BY fields to be part of the select clause.
|
boolean |
shouldUseCustomModifyForCall(DatabaseField field)
Used by SQLCall.appendModify(..)
If the field should be passed to customModifyInDatabaseCall, retun true,
otherwise false.
|
boolean |
supportsIdentity()
INTERNAL:
Indicates whether the platform supports identity.
|
boolean |
supportsNativeSequenceNumbers() |
boolean |
supportsSequenceObjects()
INTERNAL:
Indicates whether the platform supports sequence objects.
|
java.lang.String |
toString() |
boolean |
usesPlatformDefaultSequence()
INTERNAL:
Indicates whether defaultSequence is the same as platform default sequence.
|
public boolean getDefaultNativeSequenceToTable()
public void setDefaultNativeSequenceToTable(boolean defaultNativeSequenceToTable)
public void appendParameter(Call call, java.io.Writer writer, java.lang.Object parameter)
appendParameter
in interface Platform
public java.lang.Object getCustomModifyValueForCall(Call call, java.lang.Object value, DatabaseField field, boolean shouldBind)
getCustomModifyValueForCall
in interface Platform
public boolean shouldUseCustomModifyForCall(DatabaseField field)
shouldUseCustomModifyForCall
in interface Platform
public java.lang.Object clone()
public java.lang.Object convertObject(java.lang.Object sourceObject, java.lang.Class javaClass) throws ConversionException
convertObject
in interface CorePlatform<ConversionManager>
convertObject
in interface Platform
object
- - the object that must be convertedjavaClass
- - the class that the object must be converted to-
- ConversionException, all exceptions will be thrown as this type.ConversionException
public void copyInto(Platform platform)
public ConversionManager getConversionManager()
getConversionManager
in interface CorePlatform<ConversionManager>
getConversionManager
in interface Platform
public void setConversionManager(ConversionManager conversionManager)
setConversionManager
in interface Platform
public java.lang.String getEndDelimiter()
getEndDelimiter
in interface Platform
public void setEndDelimiter(java.lang.String endDelimiter)
public ExpressionOperator getOperator(int selector)
public java.util.Map getPlatformOperators()
public ValueReadQuery getSelectSequenceQuery()
public int getSequencePreallocationSize()
public java.lang.String getStartDelimiter()
getStartDelimiter
in interface Platform
public void setStartDelimiter(java.lang.String startDelimiter)
public java.lang.String getTableQualifier()
getTableQualifier
in interface Platform
public java.sql.Timestamp getTimestampFromServer(AbstractSession session, java.lang.String sessionName)
getTimestampFromServer
in interface Platform
public ValueReadQuery getTimestampQuery()
getTimestampQuery
in interface Platform
public DataModifyQuery getUpdateSequenceQuery()
public void initializeDefaultQueries(DescriptorQueryManager queryManager, AbstractSession session)
public boolean isAttunity()
isAttunity
in interface Platform
public boolean isCloudscape()
isCloudscape
in interface Platform
public boolean isInformix()
isInformix
in interface Platform
public boolean isPervasive()
public boolean isPostgreSQL()
isPostgreSQL
in interface Platform
public boolean isPointBase()
isPointBase
in interface Platform
public boolean isSQLAnywhere()
isSQLAnywhere
in interface Platform
public boolean isFirebird()
public boolean isSQLServer()
isSQLServer
in interface Platform
public boolean isSymfoware()
isSymfoware
in interface Platform
public boolean isTimesTen()
isTimesTen
in interface Platform
public boolean isTimesTen7()
isTimesTen7
in interface Platform
public void initialize()
initialize
in interface Platform
public void setSelectSequenceNumberQuery(ValueReadQuery seqQuery)
public void setSequencePreallocationSize(int size)
public void setTableQualifier(java.lang.String qualifier)
setTableQualifier
in interface Platform
public void setTimestampQuery(ValueReadQuery tsQuery)
setTimestampQuery
in interface Platform
public void setUpdateSequenceQuery(DataModifyQuery updateSequenceNumberQuery)
public java.lang.String toString()
toString
in class java.lang.Object
public java.util.Vector getDataTypesConvertedFrom(java.lang.Class javaClass)
javaClass
- - the class that is converted frompublic java.util.Vector getDataTypesConvertedTo(java.lang.Class javaClass)
javaClass
- - the class that is converted topublic Sequence getDefaultSequence()
getDefaultSequence
in interface Platform
public boolean hasDefaultSequence()
public void setDefaultSequence(Sequence sequence)
setDefaultSequence
in interface Platform
public void addSequence(Sequence sequence)
addSequence
in interface Platform
public void addSequence(Sequence sequence, boolean isSessionConnected)
addSequence
in interface Platform
public Sequence getSequence(java.lang.String seqName)
getSequence
in interface Platform
public Sequence removeSequence(java.lang.String seqName)
removeSequence
in interface Platform
public void removeAllSequences()
removeAllSequences
in interface Platform
public java.util.Map getSequences()
getSequences
in interface Platform
public java.util.Map getSequencesToWrite()
getSequencesToWrite
in interface Platform
public Sequence getDefaultSequenceToWrite()
getDefaultSequenceToWrite
in interface Platform
public void setSequences(java.util.Map sequences)
setSequences
in interface Platform
public boolean usesPlatformDefaultSequence()
usesPlatformDefaultSequence
in interface Platform
public java.lang.String getIdentifierQuoteCharacter()
getStartDelimiter()
,
getEndDelimiter()
public ConnectionCustomizer createConnectionCustomizer(Accessor accessor, AbstractSession session)
public boolean shouldPrepare(DatabaseQuery query)
public boolean shouldSelectIncludeOrderBy()
public boolean shouldSelectDistinctIncludeOrderBy()
public boolean shouldNativeSequenceUseTransaction()
public boolean supportsIdentity()
public boolean supportsNativeSequenceNumbers()
public boolean supportsSequenceObjects()
public ValueReadQuery buildSelectQueryForSequenceObject()
public ValueReadQuery buildSelectQueryForSequenceObject(java.lang.String qualifiedSeqName, java.lang.Integer size)
public ValueReadQuery buildSelectQueryForIdentity()
public ValueReadQuery buildSelectQueryForIdentity(java.lang.String seqName, java.lang.Integer size)
public DatasourceCall buildNativeCall(java.lang.String queryString)
EclipseLink 2.6.3, "build v20160428-59c81c5" API Reference