java.lang.Object
org.eclipse.persistence.internal.databaseaccess.DatasourcePlatform
org.eclipse.persistence.eis.EISPlatform
- All Implemented Interfaces:
Serializable
,Cloneable
,CorePlatform<ConversionManager>
,Platform
- Direct Known Subclasses:
AQPlatform
,JMSPlatform
,MongoPlatform
,OracleNoSQLPlatform
,OracleNoSQLPlatform
,XMLFilePlatform
An EISPlatform
defines any EIS adapter specific behavior.
This may include:
- Instantiation of the adapter InteractionSpec
- Conversion from an adapter custom Record
- Perform platform specific record access
- Provide XML DOM record conversion
- Provide sequence support
EISPlatform
also supports behavior for specifying the record
types supported and automatic data-conversion to strings.
Although use of the generic EISPlatform
may be sufficient,
some adapters may require that a specific platform be defined.
- Since:
- OracleAS TopLink 10g (10.0.3)
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Method
Used to reflectively provide XML record support as DOMRecord is not part of the JCA-CCI spec.protected boolean
protected boolean
protected boolean
protected RecordConverter
Can be used to convert from an adapter specific record.protected boolean
Can be used if a commit is required after every interaction outside of a local transaction.protected boolean
Can be used for adapters that only support String data/XML.protected boolean
Allows for usage of transaction to be disabled if not supported.protected XMLConversionManager
For XML usage, an XMLConversionManager instance is requiredFields inherited from class org.eclipse.persistence.internal.databaseaccess.DatasourcePlatform
conversionManager, dataTypesConvertedFromAClass, dataTypesConvertedToAClass, defaultNativeSequenceToTable, defaultSeqenceAtNextValue, defaultSequence, endDelimiter, platformOperators, sequences, sequencesLock, startDelimiter, supportsReturnGeneratedKeys, tableQualifier, timestampQuery, uuidQuery
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
appendParameter
(Call call, Writer writer, Object parameter) Add the parameter.buildCallFromStatement
(SQLStatement statement, DatabaseQuery query, AbstractSession session) INTERNAL: Override this method to throw an exception by default.buildInteractionSpec
(EISInteraction interaction) Allow the platform to build the interaction spec based on properties defined in the interaction.buildNativeCall
(String queryString) INTERNAL: Return the correct call type for the native query string.buildRow
(Record record, EISInteraction interaction, EISAccessor accessor) INTERNAL: Allow the platform to handle record to row conversion.buildRows
(Record record, EISInteraction interaction, EISAccessor accessor) Allow the platform to handle record to row conversion.createDatabaseRowFromDOMRecord
(Record record, EISInteraction call, EISAccessor accessor) INTERNAL: Allow the platform to handle the creation of the Record for the DOM record.createDOMRecord
(String recordName, EISAccessor accessor) Allow the platform to handle the creation of the DOM record.createInputRecord
(EISInteraction interaction, EISAccessor accessor) Allow the platform to create the appropriate type of record for the interaction.createOutputRecord
(EISInteraction interaction, AbstractRecord translationRow, EISAccessor accessor) Allow the platform to create the appropriate type of record for the interaction.The platform holds its own instance of conversion manager to allow customization.Return the record converter.getValueFromRecord
(String key, MappedRecord record, EISAccessor accessor) Retrieves the field value from the record.boolean
Return if this platform supports XML/DOM Records.boolean
Return if this platform supports JCA IndexedRecord.boolean
Return if this platform supports JCA MappedRecord.boolean
Return if this platform requires auto commit of the local transaction for interactions outside of an interaction.void
setDOMInRecord
(Element dom, Record record, EISInteraction call, EISAccessor accessor) Stores the XML DOM value into the record.void
setIsDOMRecordSupported
(boolean isDOMRecordSupported) Set if this platform supports XML/DOM Records.void
setIsIndexedRecordSupported
(boolean isIndexedRecordSupported) Set if this platform supports JCA IndexedRecord.void
setIsMappedRecordSupported
(boolean isMappedRecordSupported) Set if this platform supports JCA MappedRecord.void
setRecordConverter
(RecordConverter recordConverter) Set the record converter.void
setRequiresAutoCommit
(boolean requiresAutoCommit) Set if this platform requires auto commit of the local transaction for interactions outside of an interaction.void
setShouldConvertDataToStrings
(boolean shouldConvertDataToStrings) Set if all data set into the adapter should be first converted to strings.void
setSupportsLocalTransactions
(boolean supportsLocalTransactions) Set if this platform supports local transactions.void
setValueInRecord
(String key, Object value, MappedRecord record, EISAccessor accessor) Stores the field value into the record.boolean
Return if all data set into the adapter should be first converted to strings.boolean
Return if this platform supports local transactions.Methods inherited from class org.eclipse.persistence.internal.databaseaccess.DatasourcePlatform
addOperator, addSequence, addSequence, buildSelectQueryForIdentity, buildSelectQueryForIdentity, buildSelectQueryForSequenceObject, buildSelectQueryForSequenceObject, clone, convertObject, copyInto, createConnectionCustomizer, createExpressionFor, createPlatformDefaultSequence, getCustomModifyValueForCall, getDataTypesConvertedFrom, getDataTypesConvertedTo, getDefaultNativeSequenceToTable, getDefaultSeqenceAtNextValue, getDefaultSequence, getDefaultSequenceToWrite, getDriverVersion, getEndDelimiter, getINClauseLimit, getOperator, getPlatformOperators, getSelectSequenceQuery, getSequence, getSequencePreallocationSize, getSequences, getSequencesToWrite, getStartDelimiter, getTableQualifier, getTimestampFromServer, getTimestampQuery, getUpdateSequenceQuery, getUUIDQuery, hasDefaultSequence, initialize, initializeDefaultQueries, initializePlatformOperators, initIdentitySequences, isAccess, isAttunity, isCloudscape, isDB2, isDB2Z, isDBase, isDerby, isFirebird, isH2, isHANA, isHSQL, isInformix, isMariaDB, isMaxDB, isMySQL, isODBC, isOracle, isOracle12, isOracle23, isOracle9, isPervasive, isPointBase, isPostgreSQL, isSQLAnywhere, isSQLServer, isSybase, isSymfoware, isTimesTen, isTimesTen7, removeAllSequences, removeIdentitySequences, removeSequence, sequencesAfterCloneCleanup, setConversionManager, setDefaultNativeSequenceToTable, setDefaultSeqenceAtNextValue, setDefaultSequence, setEndDelimiter, setSelectSequenceNumberQuery, setSequencePreallocationSize, setSequences, setStartDelimiter, setSupportsReturnGeneratedKeys, setTableQualifier, setTimestampQuery, setUpdateSequenceQuery, setUUIDQuery, shouldNativeSequenceUseTransaction, shouldPrepare, shouldSelectDistinctIncludeOrderBy, shouldSelectIncludeOrderBy, shouldUseCustomModifyForCall, supportsIdentity, supportsNativeSequenceNumbers, supportsReturnGeneratedKeys, supportsSequenceObjects, toString, usesPlatformDefaultSequence
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.eclipse.persistence.internal.databaseaccess.Platform
connectionProperties
-
Field Details
-
isIndexedRecordSupported
protected boolean isIndexedRecordSupported -
isMappedRecordSupported
protected boolean isMappedRecordSupported -
isDOMRecordSupported
protected boolean isDOMRecordSupported -
shouldConvertDataToStrings
protected boolean shouldConvertDataToStringsCan be used for adapters that only support String data/XML. -
supportsLocalTransactions
protected boolean supportsLocalTransactionsAllows for usage of transaction to be disabled if not supported. -
requiresAutoCommit
protected boolean requiresAutoCommitCan be used if a commit is required after every interaction outside of a local transaction. -
recordConverter
Can be used to convert from an adapter specific record. -
domMethod
Used to reflectively provide XML record support as DOMRecord is not part of the JCA-CCI spec. -
xmlConversionManager
For XML usage, an XMLConversionManager instance is required
-
-
Constructor Details
-
EISPlatform
public EISPlatform()Default constructor.
-
-
Method Details
-
getRecordConverter
Return the record converter. -
setRecordConverter
Set the record converter. Can be used to convert from an adapter specific record. -
requiresAutoCommit
public boolean requiresAutoCommit()Return if this platform requires auto commit of the local transaction for interactions outside of an interaction. -
setRequiresAutoCommit
public void setRequiresAutoCommit(boolean requiresAutoCommit) Set if this platform requires auto commit of the local transaction for interactions outside of an interaction. -
supportsLocalTransactions
public boolean supportsLocalTransactions()Return if this platform supports local transactions. -
setSupportsLocalTransactions
public void setSupportsLocalTransactions(boolean supportsLocalTransactions) Set if this platform supports local transactions. -
isIndexedRecordSupported
public boolean isIndexedRecordSupported()Return if this platform supports JCA IndexedRecord. -
setIsIndexedRecordSupported
public void setIsIndexedRecordSupported(boolean isIndexedRecordSupported) Set if this platform supports JCA IndexedRecord. -
isMappedRecordSupported
public boolean isMappedRecordSupported()Return if this platform supports JCA MappedRecord. -
setIsMappedRecordSupported
public void setIsMappedRecordSupported(boolean isMappedRecordSupported) Set if this platform supports JCA MappedRecord. -
isDOMRecordSupported
public boolean isDOMRecordSupported()Return if this platform supports XML/DOM Records. -
setIsDOMRecordSupported
public void setIsDOMRecordSupported(boolean isDOMRecordSupported) Set if this platform supports XML/DOM Records. -
shouldConvertDataToStrings
public boolean shouldConvertDataToStrings()Return if all data set into the adapter should be first converted to strings. -
setShouldConvertDataToStrings
public void setShouldConvertDataToStrings(boolean shouldConvertDataToStrings) Set if all data set into the adapter should be first converted to strings. -
buildInteractionSpec
Allow the platform to build the interaction spec based on properties defined in the interaction. -
createInputRecord
Allow the platform to create the appropriate type of record for the interaction. -
createOutputRecord
public Record createOutputRecord(EISInteraction interaction, AbstractRecord translationRow, EISAccessor accessor) Allow the platform to create the appropriate type of record for the interaction. If an output record is not required then null is returned. -
buildRow
INTERNAL: Allow the platform to handle record to row conversion. -
buildRows
public Vector<AbstractRecord> buildRows(Record record, EISInteraction interaction, EISAccessor accessor) Allow the platform to handle record to row conversion. -
createDOMRecord
Allow the platform to handle the creation of the DOM record. By default create a mapped record an assume it implements DOM as well. -
createDatabaseRowFromDOMRecord
public AbstractRecord createDatabaseRowFromDOMRecord(Record record, EISInteraction call, EISAccessor accessor) INTERNAL: Allow the platform to handle the creation of the Record for the DOM record. By default instantiate an EISDOMRecord which introspects the record for a getDOM method. -
getValueFromRecord
Retrieves the field value from the record. This allows for the platform to perform any platform specific translation or conversion. -
setDOMInRecord
Stores the XML DOM value into the record. This must be implemented by the platform if it support XML/DOM records. -
setValueInRecord
Stores the field value into the record. This allows for the platform to perform any platform specific translation or conversion. -
appendParameter
Add the parameter. Convert the parameter to a string and write it. Convert rows to XML strings.- Specified by:
appendParameter
in interfacePlatform
- Overrides:
appendParameter
in classDatasourcePlatform
-
getConversionManager
The platform holds its own instance of conversion manager to allow customization.- Specified by:
getConversionManager
in interfaceCorePlatform<ConversionManager>
- Specified by:
getConversionManager
in interfacePlatform
- Overrides:
getConversionManager
in classDatasourcePlatform
-
buildCallFromStatement
public DatasourceCall buildCallFromStatement(SQLStatement statement, DatabaseQuery query, AbstractSession session) INTERNAL: Override this method to throw an exception by default. Platforms that support dynamic querying can override this to generate an EISInteraction. -
buildNativeCall
INTERNAL: Return the correct call type for the native query string. This allows EIS platforms to use different types of native calls.- Overrides:
buildNativeCall
in classDatasourcePlatform
-