public class BasicDataSource extends DataSource
BasicDataSource is the right class to extend when creating a custom DataSource connector.
inInitState, OP_ADD, OP_CLIENT_EXPORT, OP_CUSTOM, OP_FETCH, OP_REMOVE, OP_UPDATE, OP_VALIDATE
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getProperty(java.lang.Object key)
Returns a property from the DataSource config.
|
boolean |
shouldAutoJoinTransaction(DSRequest req)
Returns true if the parameter DSRequest should automatically join an existing transaction,
taking into account the DSRequest-specific override provided by
DSRequest.setJoinTransaction ,
the transaction policy of the controlling
RPCManager (if there is one), and autoJoinTransactions settings at the operationBinding,
DataSource, dbName and global system levels. |
boolean |
shouldAutoStartTransaction(DSRequest req,
boolean ignoreExistingTransaction)
Returns true if the parameter DSRequest should automatically start a new transaction,
taking into account the DSRequest-specific override provided by
DSRequest.setJoinTransaction ,
the transaction policy of the controlling
RPCManager (if there is one), and autoJoinTransactions settings at the operationBinding,
DataSource, dbName and global system levels |
add, addDynamicDSGenerator, addDynamicDSGenerator, addDynamicDSGenerator, clearDynamicDSGenerators, execute, executeAdd, executeClientExport, executeCustom, executeFetch, executeRemove, executeUpdate, fetch, fetch, fetchById, fetchSingle, fetchSingle, filter, filter, fromXML, fromXML, fromXML, fromXML, fromXML, fromXML, fromXML, fromXML, getEnumConstantProperty, getEnumOrdinalProperty, getEnumTranslateStrategy, getField, getFieldNames, getListProperties, getListProperties, getPrimaryKey, getProperties, getProperties, getProperties, getPropertyJavaClass, getRecordXPath, getTransactionObject, getTransactionObject, hasRecord, hasRecord, initialized, isModificationOperation, remove, removeDynamicDSGenerator, removeDynamicDSGenerator, removeDynamicDSGenerator, setEnumConstantProperty, setEnumOrdinalProperty, setEnumTranslateStrategy, setProperties, update, validate
public java.lang.String getProperty(java.lang.Object key)
myNewProperty="some useful value"to the
<DataSource>
tag in your .ds.xml
definition
file, calling this method with a parameter of "myNewProperty"
will return
"some useful value"
- the value you assigned in the DataSource definition.key
- The key to look uppublic boolean shouldAutoStartTransaction(DSRequest req, boolean ignoreExistingTransaction) throws java.lang.Exception
DSRequest.setJoinTransaction
,
the transaction policy
of the controlling
RPCManager (if there is one), and autoJoinTransactions settings at the operationBinding,
DataSource, dbName and global system levels
This method is part of the Automatic Transactions feature, which is effective only in Power edition and above.
req
- The DSRequest to checkignoreExistingTransaction
- If true, indicates that we should not take into account
any existing transaction for this RPCManager when deciding if a transaction should be
autoStarted. This is useful if you want to know if a request would have started a new
transaction if one hadn't already been started.java.lang.Exception
public boolean shouldAutoJoinTransaction(DSRequest req) throws java.lang.Exception
DSRequest.setJoinTransaction
,
the transaction policy
of the controlling
RPCManager (if there is one), and autoJoinTransactions settings at the operationBinding,
DataSource, dbName and global system levels.
This method is part of the Automatic Transactions feature, which is effective only in Power edition and above.
req
- The DSRequest to checkjava.lang.Exception