public abstract class AbstractStoredProcedure extends com.denodo.vdb.catalog.storage.MetaObjectStored implements StoredProcedure
doCall, and should use
the method getProcedureResultSet to add the generated results._createDate, _description, _lastUserModifier, _userCreator, id, serialVersionUID| Constructor and Description |
|---|
AbstractStoredProcedure()
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
StoredProcedureResultSet |
call(String accessName,
Object[] inputValues,
com.denodo.vdb.misc.IContext context)
Method which executes the stored procedure.
|
boolean |
caseSensitiveParameters()
Returns
true if the field names defined by the stored procedure are case sensitive. |
void |
close()
Deprecated.
As of Denodo 5.5, this method is deprecated because it is never invoked.
It will be removed in future versions of the Denodo Platform. |
void |
commit()
The Execution Engine invokes this method to confirm the current transaction.
|
static Array |
createArray(Collection<? extends Object> values,
int type)
Creates a SQL array object.
|
static Struct |
createStruct(List<String> fieldNames,
List<? extends Object> values)
Creates a SQL struct object.
|
protected abstract void |
doCall(Object[] inputValues)
The Execution Engine invokes this method when this procedure is called.
If the procedure has to return results, invoke getProcedureResultSet from this
method, to obtain an object of the class StoredProcedureResultSet, which will contain the results that this procedure will return. |
StoredProcedureParameter[] |
getCachedParameters()
Returns the parameters created by this procedure when it was
created.
|
com.denodo.vdb.interpreter.parser.ElementType |
getElementType() |
DatabaseEnvironment |
getEnvironment() |
int |
getNumOfAffectedRows()
Deprecated.
As of Denodo 5.5, this method is deprecated because its result is not used.
It will be removed in future versions of the Denodo Platform. |
StoredProcedureResultSet |
getProcedureResultSet()
Obtains the execution result of the stored procedure.
|
Boolean |
getUse60TypeMappings() |
void |
initialize(DatabaseEnvironment newEnvironment)
Initializes the stored procedure.
|
void |
log(int level,
String logMessage)
Log a message.
|
void |
prepare()
The Execution Engine invokes this method when it is about to begin a transaction involving this procedure.
|
void |
rollback()
The Execution Engine invokes this method to undo the current transaction.
|
void |
setEnvironment(DatabaseEnvironment environment) |
void |
setUse60TypeMappings(Boolean use60TypeMappings) |
boolean |
stop()
The Execution Engine invokes this method when a query involving the stored procedure is cancelled.
|
copyPropertiesToObject, exists, existsObjectByNameIgnoringCase, findByPublicName, findByPublicName, findByPublicName, findByPublicName, findIdByName, findIdsByName, getCreateDate, getCreateDateAsMillis, getElementDescription, getId, getIdByPublicName, getIdByPublicName, getJars, getLastUserModifier, getName, getPublicNameById, getPublicNameByIds, getUserCreator, initialize, renameMetaObjectStored, setCreateDate, setElementDescription, setId, setLastUserModifier, setName, setUserCreator, storeRenamedMetaObjectgetLatestModificationDate, getLatestModificationDateAsMillis, getLatestModificationEpoch, getLatestModificationInstant, setLatestModificationDate, setLatestModificationEpochclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetDescription, getNamegetParameterspublic void initialize(DatabaseEnvironment newEnvironment)
StoredProcedureinitialize in interface StoredProcedurenewEnvironment - An object which allows to the procedure to communicate with the VDP server.StoredProcedure.initialize(DatabaseEnvironment)public final StoredProcedureResultSet call(String accessName, Object[] inputValues, com.denodo.vdb.misc.IContext context)
StoredProcedureExecutorcall in interface StoredProcedureExecutoraccessName - the name of the procedure access.inputValues - the input parameters of the procedure.context - the execution context.StoredProcedureExecutor.call(String, Object[], IContext)protected abstract void doCall(Object[] inputValues) throws StoredProcedureException
getProcedureResultSet from this
method, to obtain an object of the class StoredProcedureResultSet, which will contain the results that this procedure will return. Then, invoke its method
StoredProcedureResultSet.addRow for each row you want to
return.inputValues - The list of parameters of the procedure.StoredProcedureException - if there is any error executing the procedure.public final StoredProcedureResultSet getProcedureResultSet()
StoredProcedureExecutorgetProcedureResultSet in interface StoredProcedureExecutorStoredProcedureExecutor.getProcedureResultSet()public void prepare()
StoredProcedureprepare in interface StoredProcedureStoredProcedure.prepare()public void commit()
StoredProcedurecommit in interface StoredProcedureStoredProcedure.commit()public void rollback()
StoredProcedurerollback in interface StoredProcedureStoredProcedure.rollback()@Deprecated public void close()
StoredProcedureExecutorclose in interface StoredProcedureExecutorStoredProcedureExecutor.close()@Deprecated public int getNumOfAffectedRows()
StoredProcedureExecutorgetNumOfAffectedRows in interface StoredProcedureExecutorStoredProcedureExecutor.getNumOfAffectedRows()public boolean stop()
StoredProcedureAbstractStoredProcedure provides a default implementation of this method that does not do anything and
only returns false.true, the procedure must guarantee that it will finish after this method is
invoked. If the procedure will not finish after invoking this procedure, return false. stop in interface StoredProceduretrue if the execution of the procedure has finished. false otherwise.StoredProcedure.stop()public boolean caseSensitiveParameters()
StoredProceduretrue if the field names defined by the stored procedure are case sensitive. If not, they are converted to lower
case.caseSensitiveParameters in interface StoredProceduretrue if the field names defined by the stored procedure are case sensitive.
false otherwiseStoredProcedure.caseSensitiveParameters()public final void setEnvironment(DatabaseEnvironment environment)
setEnvironment in interface StoredProcedureenvironment - An object which allows to the procedure to communicate with the Virtual DataPort server.StoredProcedure.setEnvironment(com.denodo.vdb.engine.storedprocedure.DatabaseEnvironment)public static final Array createArray(Collection<? extends Object> values, int type)
values - the values used to create the array.type - the SQL type of the values.public static final Struct createStruct(List<String> fieldNames, List<? extends Object> values) throws SQLException
fieldNames - a list with the names of the struct fields.values - a list with the struct values.SQLException - if there is any error creating the struct.public final StoredProcedureParameter[] getCachedParameters()
public DatabaseEnvironment getEnvironment()
public final void log(int level,
String logMessage)
DatabaseEnvironment.log(int,String)level - One of the following message level identifiers:
logMessage - The string messagepublic void setUse60TypeMappings(Boolean use60TypeMappings)
public Boolean getUse60TypeMappings()
public com.denodo.vdb.interpreter.parser.ElementType getElementType()
getElementType in class com.denodo.vdb.catalog.storage.MetaObjectStoredCopyright © 2024 Denodo Technologies. All rights reserved.