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()
CustomWrapperInputParameterCustomWrapperInputParameterCustomWrapperInputParameter[] getInputParameters()
CustomWrapperInputParameterCustomWrapperInputParameterCustomWrapperSchemaParameter[] 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 any error during the process of
obtaining the schema of the wrapper based on these parameters. The execution engine will
capture this exception and will interrupt the execution of this custom wrapper, interrupt
the query and return the error message of this exception to the client application.CustomWrapperSchemaParametervoid 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 this custom wrapper, interrupt the query and return the error message of
this exception to the client application.CustomWrapperConditionHolder,
CustomWrapperFieldExpression,
CustomWrapperResultboolean 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 from your code if there is an error inserting a row in the
underlying data source. The execution engine will capture this exception and will
interrupt the execution of this custom wrapper, interrupt the query and return the error
message of this exception to the client application.CustomWrapperFieldExpressionint 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 from your code if there is an error deleting
a row in the underlying data source. The execution engine will capture this exception and
will interrupt the execution of this custom wrapper, interrupt the query and return the
error message of this exception to the client application.CustomWrapperConditionHolderint 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 CustomWrapperFieldExpressioncondition - 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 updating a row in the
underlying data source. The execution engine will capture this exception and will
interrupt the execution of this custom wrapper, interrupt the query and return the error
message of this exception to the client application.CustomWrapperFieldExpression,
CustomWrapperConditionHoldervoid 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.