public interface CustomWrapper
AbstractCustomWrapper
). For convenience, the user is
encouraged to extend AbstractCustomWrapper
instead of implementing
CustomWrapper
directly.Modifier and Type | Method and Description |
---|---|
void |
commit()
Defines how this Custom Wrappers performs a
commit operation in its
data source in the context of a distributed transaction. |
int |
delete(CustomWrapperConditionHolder condition,
Map<String,String> inputValues)
Defines how this Custom Wrapper deletes data from the data source.
|
CustomWrapperConfiguration |
getConfiguration()
Defines this Custom Wrapper's configuration based on several configurable properties
provided by the
CustomWrapperConfiguration class. |
CustomWrapperInputParameter[] |
getDataSourceInputParameters()
Defines what input parameters supports the Data Source associated to the wrapper.
|
CustomWrapperInputParameter[] |
getInputParameters()
Defines what input parameters supports this Custom Wrapper.
|
CustomWrapperSchemaParameter[] |
getSchemaParameters(Map<String,String> inputValues)
Defines the schema of this Custom Wrapper.
|
int |
insert(Map<CustomWrapperFieldExpression,Object> insertValues,
Map<String,String> inputValues)
Defines how this Custom Wrapper inserts values into the data source.
|
void |
prepare()
Defines how this Custom Wrapper performs a
prepare operation in its
data source in the context of a distributed transaction. |
void |
rollback()
Defines how this Custom Wrapper performs a
rollback operation in its
data source in the context of a distributed transaction. |
void |
run(CustomWrapperConditionHolder condition,
List<CustomWrapperFieldExpression> projectedFields,
CustomWrapperResult result,
Map<String,String> inputValues)
Defines how this Custom Wrapper acts when being queried.
|
boolean |
stop()
Stops the execution of this Custom Wrapper.
|
int |
update(Map<CustomWrapperFieldExpression,Object> updateValues,
CustomWrapperConditionHolder condition,
Map<String,String> inputValues)
Defines how this Custom Wrapper updates data in the data source.
|
CustomWrapperInputParameter[] getDataSourceInputParameters()
CustomWrapperInputParameter
CustomWrapperInputParameter
CustomWrapperInputParameter[] getInputParameters()
CustomWrapperInputParameter
CustomWrapperInputParameter
CustomWrapperSchemaParameter[] getSchemaParameters(Map<String,String> inputValues) throws CustomWrapperException
inputValues
- a Map<String, String> which associates this Custom Wrapper's input
parameters' names (as defined in getInputParameters()
) with their current values.CustomWrapperSchemaParameter
that defines the schema of this
Custom Wrapper.CustomWrapperException
- Throw this exception if there is an error during the process of
obtaining the schema of the wrapper based on these parameters.CustomWrapperSchemaParameter
void run(CustomWrapperConditionHolder condition, List<CustomWrapperFieldExpression> projectedFields, CustomWrapperResult result, Map<String,String> inputValues) throws CustomWrapperException
condition
and inputValues
, constructing a query taking into
account the passed projectedFields
, retrieving data from this Custom Wrapper data
source and finally inserting such data in the passed result
object.condition
- the query's condition (akin to the WHERE
clause in a
SQL query).projectedFields
- the query's projected fields (akin to the SELECT
clause in a
SQL query).result
- an object which receives the data retrieved by this Custom Wrapper.inputValues
- a Map<String, String> which associates this Custom Wrapper's input
parameters' names (as defined in getInputParameters()
) with their current values.CustomWrapperException
- Throw this exception if there is an error during the execution of
this wrapper. The Execution Engine will capture this exception and will interrupt the
execution of the procedure.CustomWrapperConditionHolder
,
CustomWrapperFieldExpression
,
CustomWrapperResult
boolean stop()
true
if this Custom Wrapper can stop its execution,
false
otherwise.int insert(Map<CustomWrapperFieldExpression,Object> insertValues, Map<String,String> inputValues) throws CustomWrapperException
insertValues
and then accessing the data source
to perform the required insertion.insertValues
- a Map<CustomWrapperFieldExpression, Object> which associates
fields with values, in similar fashion to the INSERT
statement in SQL
.inputValues
- a Map<String, String> which associates this Custom Wrapper's
input parameters' names (as defined in getInputParameters()
) with their
current values.CustomWrapperException
- Throw this exception if there is an error during the execution of
this method. The Execution Engine will capture this exception and will interrupt the
execution of the procedure.CustomWrapperFieldExpression
int delete(CustomWrapperConditionHolder condition, Map<String,String> inputValues) throws CustomWrapperException
condition
and then accessing the data source to perform the
required deletions.condition
- the deletion condition (akin to the WHERE
clause in a
SQL
DELETE
statement).inputValues
- a Map<String, String> which associates this Custom Wrapper's input
parameters' names (as defined in getInputParameters()
) with their current values.CustomWrapperException
- Throw this exception if there is an error during the execution of
this method. The Execution Engine will capture this exception and will interrupt the
execution of the procedure.CustomWrapperConditionHolder
int update(Map<CustomWrapperFieldExpression,Object> updateValues, CustomWrapperConditionHolder condition, Map<String,String> inputValues) throws CustomWrapperException
updateValues
and condition
, and then accessing the
data source to perform the required updates.updateValues
- a Map<CustomWrapperFieldExpression, Object> which associates fields
with values, in similar fashion to the UPDATE
statement in SQL
.
The value can be a literal expressed as a Java object or a field expressed as a
CustomWrapperFieldExpression
condition
- the insert condition (akin to the WHERE
clause in a
SQL
UPDATE
statement).inputValues
- a Map<String, String> which associates this Custom Wrapper's input
parameters' names (as defined in getInputParameters()
) with their current values.CustomWrapperException
- Throw this exception if there is an error during the execution of
this method. The Execution Engine will capture this exception and will interrupt the
execution of the procedure.CustomWrapperFieldExpression
,
CustomWrapperConditionHolder
void commit()
commit
operation in its
data source in the context of a distributed transaction.void rollback()
rollback
operation in its
data source in the context of a distributed transaction.void prepare()
prepare
operation in its
data source in the context of a distributed transaction.CustomWrapperConfiguration getConfiguration()
CustomWrapperConfiguration
class.CustomWrapperConfiguration
instance defining this Custom Wrapper
configuration parameters.Copyright © 2024 Denodo Technologies. All rights reserved.