com.iplanet.jato.model.sql
Interface StoredProcModel

All Superinterfaces:
ExecutingModel, Model, SQLModel
All Known Implementing Classes:
StoredProcModelBase

public interface StoredProcModel
extends SQLModel

A model that uses a stored procedure (accessed via JDBC) as its backing data store

Version:
JATO/1.2.2 $Id: StoredProcModel.java,v 1.9 2002/03/16 03:26:34 todd Exp $

Method Summary
 void clearParameterValues()
          Clears all cached parameter values.
 java.lang.Object executeProcedure(ModelExecutionContext context)
          Executes the model's associated stored procedure, using the provided execution context
 java.lang.Object getParameterValue(java.lang.String name)
          Returns the named parameter value.
 StoredProcSchema getProcedureSchema()
          Returns the schema containing the procedure metadata
 java.lang.Object getResultParameterValue()
          Returns the result parameter value from the last execution of the procedure
 void removeParameterValue(java.lang.String name)
          Removes the named parameter value.
 void setParameterValue(java.lang.String name, java.lang.Object value)
          Sets the named parameter value.
 
Methods inherited from interface com.iplanet.jato.model.sql.SQLModel
getDataSourceName
 
Methods inherited from interface com.iplanet.jato.model.ExecutingModel
execute
 
Methods inherited from interface com.iplanet.jato.model.Model
getName, getValue, getValues, setName, setValue, setValues
 

Method Detail

getProcedureSchema

public StoredProcSchema getProcedureSchema()
Returns the schema containing the procedure metadata

executeProcedure

public java.lang.Object executeProcedure(ModelExecutionContext context)
                                  throws java.sql.SQLException,
                                         ModelControlException
Executes the model's associated stored procedure, using the provided execution context
Parameters:
context - The execution context to be used during the execution of this query
Returns:
The result parameter value from the execution of the procedure. The object returned by this method is generally also available via the getResultParameterValue() method.

getResultParameterValue

public java.lang.Object getResultParameterValue()
Returns the result parameter value from the last execution of the procedure

getParameterValue

public java.lang.Object getParameterValue(java.lang.String name)
Returns the named parameter value. This method is valid both before and after the procedure has been executed. If called before procedure execution, it returns the parameter value previously set under the specified logical parameter name (if any). After procedure execution, it returns the value of the OUT or INOUT parameter identified by the logical parameter name.
Parameters:
name - The logical parameter name. This name identifies the parameter descriptor that will be used to look up the physical parameter name used for procedure execution.

setParameterValue

public void setParameterValue(java.lang.String name,
                              java.lang.Object value)
Sets the named parameter value. This method is generally only valid before the procedure has been executed, when it sets the value of the IN or INOUT parameter specified by the provided logical parameter name.
Parameters:
name - The logical parameter name. This name identifies the parameter descriptor that will be used to look up the physical parameter name used for procedure execution.
value - The value of the IN or INOUT parameter to set

removeParameterValue

public void removeParameterValue(java.lang.String name)
Removes the named parameter value. This method is generally only valid before the procedure has been executed, when it clears the value of the IN, INOUT, or OUT parameter specified by the provided logical parameter name.
Parameters:
name - The logical parameter name. This name identifies the parameter descriptor that will be used to look up the physical parameter name used for procedure execution.

clearParameterValues

public void clearParameterValues()
Clears all cached parameter values. This method is generally only valid before the procedure has been executed, when it clears the cached values of all IN, INOUT, or OUT parameters.