Top Description Fields Constructors Methods
org.eclipse.persistence.eis

public Class EISPlatform

extends DatasourcePlatform
Class Inheritance
Imports
java.util.*, java.io.*, java.lang.reflect.*, jakarta.resource.*, jakarta.resource.cci.*, org.w3c.dom.Element, org.eclipse.persistence.internal.helper.*, org.eclipse.persistence.exceptions.*, org.eclipse.persistence.queries.*, org.eclipse.persistence.eis.interactions.*, org.eclipse.persistence.internal.databaseaccess.DatasourceCall, .DatasourcePlatform, org.eclipse.persistence.internal.expressions.SQLStatement, org.eclipse.persistence.internal.oxm.XMLConversionManager, org.eclipse.persistence.internal.security.PrivilegedAccessHelper, org.eclipse.persistence.internal.sessions.AbstractRecord, .AbstractSession

An EISPlatform defines any EIS adapter specific behavior. This may include:

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.

Author
James
Since
OracleAS TopLink 10g (10.0.3)

Field Summary

Modifier and TypeField and Description
protected Method
domMethod

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
recordConverter

Can be used to convert from an adapter specific record.

protected boolean
requiresAutoCommit

Can be used if a commit is required after every interaction outside of a local transaction.

protected boolean
shouldConvertDataToStrings

Can be used for adapters that only support String data/XML.

protected boolean
supportsLocalTransactions

Allows for usage of transaction to be disabled if not supported.

protected XMLConversionManager
xmlConversionManager

For XML usage, an XMLConversionManager instance is required

Inherited from org.eclipse.persistence.internal.databaseaccess.DatasourcePlatform:
conversionManagerdataTypesConvertedFromAClassdataTypesConvertedToAClassdefaultNativeSequenceToTabledefaultSeqenceAtNextValuedefaultSequenceendDelimiterplatformOperatorssequencessequencesLockstartDelimitersupportsReturnGeneratedKeystableQualifiertimestampQueryuuidQuery

Constructor Summary

AccessConstructor and Description
public
EISPlatform()

Default constructor.

Method Summary

Modifier and TypeMethod and Description
public void
public DatasourceCall
buildCallFromStatement(SQLStatement statement, DatabaseQuery query, AbstractSession session)

INTERNAL: Override this method to throw an exception by default.

public InteractionSpec
buildInteractionSpec(EISInteraction interaction)

Allow the platform to build the interaction spec based on properties defined in the interaction.

public DatasourceCall
buildNativeCall(String queryString)

Overrides org.eclipse.persistence.internal.databaseaccess.DatasourcePlatform.buildNativeCall.

INTERNAL: Return the correct call type for the native query string.
public AbstractRecord
buildRow(Record record, EISInteraction interaction, EISAccessor accessor)

INTERNAL: Allow the platform to handle record to row conversion.

public Vector<AbstractRecord>
buildRows(Record record, EISInteraction interaction, EISAccessor accessor)

Allow the platform to handle record to row conversion.

public AbstractRecord
createDatabaseRowFromDOMRecord(Record record, EISInteraction call, EISAccessor accessor)

INTERNAL: Allow the platform to handle the creation of the Record for the DOM record.

public Record
createDOMRecord(String recordName, EISAccessor accessor)

Allow the platform to handle the creation of the DOM record.

public Record
createInputRecord(EISInteraction interaction, EISAccessor accessor)

Allow the platform to create the appropriate type of record for the interaction.

public Record
createOutputRecord(EISInteraction interaction, AbstractRecord translationRow, EISAccessor accessor)

Allow the platform to create the appropriate type of record for the interaction.

public ConversionManager
public RecordConverter
getRecordConverter()

Return the record converter.

public Object
getValueFromRecord(String key, MappedRecord<K, V> record, EISAccessor accessor)

Retrieves the field value from the record.

public boolean
isDOMRecordSupported()

Return if this platform supports XML/DOM Records.

public boolean
isIndexedRecordSupported()

Return if this platform supports JCA IndexedRecord.

public boolean
isMappedRecordSupported()

Return if this platform supports JCA MappedRecord.

public boolean
requiresAutoCommit()

Return if this platform requires auto commit of the local transaction for interactions outside of an interaction.

public void
setDOMInRecord(Element dom, Record record, EISInteraction call, EISAccessor accessor)

Stores the XML DOM value into the record.

public void
setIsDOMRecordSupported(boolean isDOMRecordSupported)

Set if this platform supports XML/DOM Records.

public void
setIsIndexedRecordSupported(boolean isIndexedRecordSupported)

Set if this platform supports JCA IndexedRecord.

public void
setIsMappedRecordSupported(boolean isMappedRecordSupported)

Set if this platform supports JCA MappedRecord.

public void
setRecordConverter(RecordConverter recordConverter)

Set the record converter.

public void
setRequiresAutoCommit(boolean requiresAutoCommit)

Set if this platform requires auto commit of the local transaction for interactions outside of an interaction.

public void
setShouldConvertDataToStrings(boolean shouldConvertDataToStrings)

Set if all data set into the adapter should be first converted to strings.

public void
setSupportsLocalTransactions(boolean supportsLocalTransactions)

Set if this platform supports local transactions.

public void
setValueInRecord(String key, Object value, MappedRecord<K, V> record, EISAccessor accessor)

Stores the field value into the record.

public boolean
shouldConvertDataToStrings()

Return if all data set into the adapter should be first converted to strings.

public boolean
supportsLocalTransactions()

Return if this platform supports local transactions.

Inherited from org.eclipse.persistence.internal.databaseaccess.DatasourcePlatform:
addOperatoraddSequenceaddSequencebuildSelectQueryForIdentitybuildSelectQueryForIdentitybuildSelectQueryForSequenceObjectbuildSelectQueryForSequenceObjectcloneconvertObjectcopyIntocreateConnectionCustomizercreateExpressionForcreatePlatformDefaultSequencegetCustomModifyValueForCallgetDataTypesConvertedFromgetDataTypesConvertedTogetDefaultNativeSequenceToTablegetDefaultSeqenceAtNextValuegetDefaultSequencegetDefaultSequenceToWritegetDriverVersiongetEndDelimitergetINClauseLimitgetOperatorgetPlatformOperatorsgetSelectSequenceQuerygetSequencegetSequencePreallocationSizegetSequencesgetSequencesToWritegetStartDelimitergetTableQualifiergetTimestampFromServergetTimestampQuerygetUpdateSequenceQuerygetUUIDQueryhasDefaultSequenceinitializeinitializeDefaultQueriesinitializePlatformOperatorsinitIdentitySequencesisAccessisAttunityisCloudscapeisDB2isDB2ZisDBaseisDerbyisFirebirdisH2isHANAisHSQLisInformixisMariaDBisMaxDBisMySQLisODBCisOracleisOracle12isOracle23isOracle9isPervasiveisPointBaseisPostgreSQLisSQLAnywhereisSQLServerisSybaseisSymfowareisTimesTenisTimesTen7removeAllSequencesremoveIdentitySequencesremoveSequencesequencesAfterCloneCleanupsetConversionManagersetDefaultNativeSequenceToTablesetDefaultSeqenceAtNextValuesetDefaultSequencesetEndDelimitersetSelectSequenceNumberQuerysetSequencePreallocationSizesetSequencessetStartDelimitersetSupportsReturnGeneratedKeyssetTableQualifiersetTimestampQuerysetUpdateSequenceQuerysetUUIDQueryshouldNativeSequenceUseTransactionshouldPrepareshouldSelectDistinctIncludeOrderByshouldSelectIncludeOrderByshouldUseCustomModifyForCallsupportsIdentitysupportsNativeSequenceNumberssupportsReturnGeneratedKeyssupportsSequenceObjectstoStringusesPlatformDefaultSequence

Field Detail

domMethodback to summary
protected Method domMethod

Used to reflectively provide XML record support as DOMRecord is not part of the JCA-CCI spec.

isDOMRecordSupportedback to summary
protected boolean isDOMRecordSupported
isIndexedRecordSupportedback to summary
protected boolean isIndexedRecordSupported
isMappedRecordSupportedback to summary
protected boolean isMappedRecordSupported
recordConverterback to summary
protected RecordConverter recordConverter

Can be used to convert from an adapter specific record.

requiresAutoCommitback to summary
protected boolean requiresAutoCommit

Can be used if a commit is required after every interaction outside of a local transaction.

shouldConvertDataToStringsback to summary
protected boolean shouldConvertDataToStrings

Can be used for adapters that only support String data/XML.

supportsLocalTransactionsback to summary
protected boolean supportsLocalTransactions

Allows for usage of transaction to be disabled if not supported.

xmlConversionManagerback to summary
protected XMLConversionManager xmlConversionManager

For XML usage, an XMLConversionManager instance is required

Constructor Detail

EISPlatformback to summary
public EISPlatform()

Default constructor.

Method Detail

appendParameterback to summary
public void appendParameter(Call call, Writer writer, Object parameter)

Overrides org.eclipse.persistence.internal.databaseaccess.DatasourcePlatform.appendParameter.

Implements org.eclipse.persistence.internal.databaseaccess.Platform.appendParameter.

Add the parameter. Convert the parameter to a string and write it. Convert rows to XML strings.

Annotations
@Override
buildCallFromStatementback to summary
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.

buildInteractionSpecback to summary
public InteractionSpec buildInteractionSpec(EISInteraction interaction)

Allow the platform to build the interaction spec based on properties defined in the interaction.

buildNativeCallback to summary
public DatasourceCall buildNativeCall(String queryString)

Overrides org.eclipse.persistence.internal.databaseaccess.DatasourcePlatform.buildNativeCall.

INTERNAL: Return the correct call type for the native query string. This allows EIS platforms to use different types of native calls.

Annotations
@Override
buildRowback to summary
public AbstractRecord buildRow(Record record, EISInteraction interaction, EISAccessor accessor)

INTERNAL: Allow the platform to handle record to row conversion.

buildRowsback to summary
public Vector<AbstractRecord> buildRows(Record record, EISInteraction interaction, EISAccessor accessor)

Allow the platform to handle record to row conversion.

createDatabaseRowFromDOMRecordback to summary
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.

createDOMRecordback to summary
public Record createDOMRecord(String recordName, EISAccessor accessor)

Allow the platform to handle the creation of the DOM record. By default create a mapped record an assume it implements DOM as well.

createInputRecordback to summary
public Record createInputRecord(EISInteraction interaction, EISAccessor accessor)

Allow the platform to create the appropriate type of record for the interaction.

createOutputRecordback to summary
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.

getConversionManagerback to summary
public ConversionManager getConversionManager()

Overrides org.eclipse.persistence.internal.databaseaccess.DatasourcePlatform.getConversionManager.

Implements org.eclipse.persistence.internal.databaseaccess.Platform.getConversionManager.

The platform holds its own instance of conversion manager to allow customization.

Annotations
@Override
getRecordConverterback to summary
public RecordConverter getRecordConverter()

Return the record converter.

getValueFromRecordback to summary
public Object getValueFromRecord(String key, MappedRecord<K, V> record, EISAccessor accessor)

Retrieves the field value from the record. This allows for the platform to perform any platform specific translation or conversion.

isDOMRecordSupportedback to summary
public boolean isDOMRecordSupported()

Return if this platform supports XML/DOM Records.

isIndexedRecordSupportedback to summary
public boolean isIndexedRecordSupported()

Return if this platform supports JCA IndexedRecord.

isMappedRecordSupportedback to summary
public boolean isMappedRecordSupported()

Return if this platform supports JCA MappedRecord.

requiresAutoCommitback to summary
public boolean requiresAutoCommit()

Return if this platform requires auto commit of the local transaction for interactions outside of an interaction.

setDOMInRecordback to summary
public void setDOMInRecord(Element dom, Record record, EISInteraction call, EISAccessor accessor)

Stores the XML DOM value into the record. This must be implemented by the platform if it support XML/DOM records.

setIsDOMRecordSupportedback to summary
public void setIsDOMRecordSupported(boolean isDOMRecordSupported)

Set if this platform supports XML/DOM Records.

setIsIndexedRecordSupportedback to summary
public void setIsIndexedRecordSupported(boolean isIndexedRecordSupported)

Set if this platform supports JCA IndexedRecord.

setIsMappedRecordSupportedback to summary
public void setIsMappedRecordSupported(boolean isMappedRecordSupported)

Set if this platform supports JCA MappedRecord.

setRecordConverterback to summary
public void setRecordConverter(RecordConverter recordConverter)

Set the record converter. Can be used to convert from an adapter specific record.

setRequiresAutoCommitback to summary
public void setRequiresAutoCommit(boolean requiresAutoCommit)

Set if this platform requires auto commit of the local transaction for interactions outside of an interaction.

setShouldConvertDataToStringsback to summary
public void setShouldConvertDataToStrings(boolean shouldConvertDataToStrings)

Set if all data set into the adapter should be first converted to strings.

setSupportsLocalTransactionsback to summary
public void setSupportsLocalTransactions(boolean supportsLocalTransactions)

Set if this platform supports local transactions.

setValueInRecordback to summary
public void setValueInRecord(String key, Object value, MappedRecord<K, V> record, EISAccessor accessor)

Stores the field value into the record. This allows for the platform to perform any platform specific translation or conversion.

shouldConvertDataToStringsback to summary
public boolean shouldConvertDataToStrings()

Return if all data set into the adapter should be first converted to strings.

supportsLocalTransactionsback to summary
public boolean supportsLocalTransactions()

Return if this platform supports local transactions.