public class DatasourcePlatform extends java.lang.Object implements Platform
DatabasePlatform,
EISPlatform,
Serialized Form| Constructor 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 Platformpublic java.lang.Object getCustomModifyValueForCall(Call call, java.lang.Object value, DatabaseField field, boolean shouldBind)
getCustomModifyValueForCall in interface Platformpublic boolean shouldUseCustomModifyForCall(DatabaseField field)
shouldUseCustomModifyForCall in interface Platformpublic 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 Platformobject - - the object that must be convertedjavaClass - - the class that the object must be converted to- - ConversionException, all exceptions will be thrown as this type.ConversionExceptionpublic void copyInto(Platform platform)
public ConversionManager getConversionManager()
getConversionManager in interface CorePlatform<ConversionManager>getConversionManager in interface Platformpublic void setConversionManager(ConversionManager conversionManager)
setConversionManager in interface Platformpublic java.lang.String getEndDelimiter()
getEndDelimiter in interface Platformpublic 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 Platformpublic void setStartDelimiter(java.lang.String startDelimiter)
public java.lang.String getTableQualifier()
getTableQualifier in interface Platformpublic java.sql.Timestamp getTimestampFromServer(AbstractSession session, java.lang.String sessionName)
getTimestampFromServer in interface Platformpublic ValueReadQuery getTimestampQuery()
getTimestampQuery in interface Platformpublic DataModifyQuery getUpdateSequenceQuery()
public void initializeDefaultQueries(DescriptorQueryManager queryManager, AbstractSession session)
public boolean isAttunity()
isAttunity in interface Platformpublic boolean isCloudscape()
isCloudscape in interface Platformpublic boolean isInformix()
isInformix in interface Platformpublic boolean isPervasive()
public boolean isPostgreSQL()
isPostgreSQL in interface Platformpublic boolean isPointBase()
isPointBase in interface Platformpublic boolean isSQLAnywhere()
isSQLAnywhere in interface Platformpublic boolean isFirebird()
public boolean isSQLServer()
isSQLServer in interface Platformpublic boolean isSymfoware()
isSymfoware in interface Platformpublic boolean isTimesTen()
isTimesTen in interface Platformpublic boolean isTimesTen7()
isTimesTen7 in interface Platformpublic void initialize()
initialize in interface Platformpublic void setSelectSequenceNumberQuery(ValueReadQuery seqQuery)
public void setSequencePreallocationSize(int size)
public void setTableQualifier(java.lang.String qualifier)
setTableQualifier in interface Platformpublic void setTimestampQuery(ValueReadQuery tsQuery)
setTimestampQuery in interface Platformpublic void setUpdateSequenceQuery(DataModifyQuery updateSequenceNumberQuery)
public java.lang.String toString()
toString in class java.lang.Objectpublic 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 Platformpublic boolean hasDefaultSequence()
public void setDefaultSequence(Sequence sequence)
setDefaultSequence in interface Platformpublic void addSequence(Sequence sequence)
addSequence in interface Platformpublic void addSequence(Sequence sequence, boolean isSessionConnected)
addSequence in interface Platformpublic Sequence getSequence(java.lang.String seqName)
getSequence in interface Platformpublic Sequence removeSequence(java.lang.String seqName)
removeSequence in interface Platformpublic void removeAllSequences()
removeAllSequences in interface Platformpublic java.util.Map getSequences()
getSequences in interface Platformpublic java.util.Map getSequencesToWrite()
getSequencesToWrite in interface Platformpublic Sequence getDefaultSequenceToWrite()
getDefaultSequenceToWrite in interface Platformpublic void setSequences(java.util.Map sequences)
setSequences in interface Platformpublic boolean usesPlatformDefaultSequence()
usesPlatformDefaultSequence in interface Platformpublic 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