- 
- All Superinterfaces:
- Attachable,- Named,- QueryPart,- Serializable
 - All Known Implementing Classes:
- AbstractRoutine
 
 public interface Routine<T> extends Named, Attachable A routine is a callable object in your RDBMS.Callable objects are mainly stored procedures and stored functions. The distinction between those two object types is very subtle and not well defined across various RDBMS. In general, this can be said: Procedures: - Are called as callable statements
- Have no return value
- Support OUT parameters
 - Can be used in SQL statements
- Have a return value
- Don't support OUT parameters
 - DB2, H2, and HSQLDB don't allow for JDBC escape syntax when calling functions. Functions must be used in a SELECT statement
- H2 only knows functions (without OUT parameters)
- Oracle functions may have OUT parameters
- Oracle knows functions that mustn't be used in SQL statements
- Oracle parameters can have default values (to support this, jOOQ renders PL/SQL instead of the JDBC escape syntax)
- Postgres only knows functions (with all features combined)
- The Sybase JDBC driver doesn't handle null values correctly when using the JDBC escape syntax on functions
- etc...
 Hence, with #852, jOOQ 1.6.8, the distinction between procedures and functions becomes obsolete. All stored routines are simply referred to as "Routine". Instances of this type cannot be created directly. They are available from generated code. - Author:
- Lukas Eder
 
- 
- 
Method SummaryAll Methods Instance Methods Abstract Methods Modifier and Type Method Description intexecute()Execute the stored object on an underlying connectionintexecute(Configuration configuration)Execute the stored object using aConfigurationobject<Z> Zget(Parameter<Z> parameter)CataloggetCatalog()Get the routine catalog.List<Parameter<?>>getInParameters()A list of IN parameters passed to the stored procedure as argument.List<Parameter<?>>getOutParameters()A list of OUT parameters passed to the stored procedure as argument.PackagegetPackage()The container package of this stored procedure or function.List<Parameter<?>>getParameters()ResultsgetResults()Parameter<T>getReturnParameter()The parameter representing this routine'sgetReturnValue()TgetReturnValue()SchemagetSchema()Get the routine schema<Z> ZgetValue(Parameter<Z> parameter)<Z> voidset(Parameter<Z> parameter, Z value)Set the routine's IN value for an IN parameter.<Z> voidsetValue(Parameter<Z> parameter, Z value)Set the routine's IN value for an IN parameter.- 
Methods inherited from interface org.jooq.Attachableattach, configuration, detach
 - 
Methods inherited from interface org.jooq.NamedgetComment, getName, getQualifiedName, getUnqualifiedName
 
- 
 
- 
- 
- 
Method Detail- 
getCatalogCatalog getCatalog() Get the routine catalog.
 - 
getSchemaSchema getSchema() Get the routine schema
 - 
getPackage@Pro Package getPackage() The container package of this stored procedure or function.This is only supported in the SQLDialect.ORACLEdialect.- Returns:
- The container package of this object, or nullif there is no such container.
 
 - 
getReturnParameterParameter<T> getReturnParameter() The parameter representing this routine'sgetReturnValue()- Returns:
- The return parameter or nullif this routine doesn't have a return value.
- See Also:
- getParameters()
 
 - 
getOutParametersList<Parameter<?>> getOutParameters() A list of OUT parameters passed to the stored procedure as argument. This list contains all parameters that are either OUT or INOUT in their respective order of appearance ingetParameters().- Returns:
- The list of out parameters
- See Also:
- getParameters()
 
 - 
getInParametersList<Parameter<?>> getInParameters() A list of IN parameters passed to the stored procedure as argument. This list contains all parameters that are either IN or INOUT in their respective order of appearance ingetParameters().- Returns:
- The list of in parameters
- See Also:
- getParameters()
 
 - 
getParametersList<Parameter<?>> getParameters() - Returns:
- A list of parameters passed to the stored object as argument
 
 - 
executeint execute(Configuration configuration) throws DataAccessException Execute the stored object using aConfigurationobject- Throws:
- DataAccessException- if something went wrong executing the query
 
 - 
executeint execute() throws DataAccessExceptionExecute the stored object on an underlying connection- Throws:
- DataAccessException- if something went wrong executing the query
 
 - 
setValue<Z> void setValue(Parameter<Z> parameter, Z value) Set the routine's IN value for an IN parameter.
 - 
set<Z> void set(Parameter<Z> parameter, Z value) Set the routine's IN value for an IN parameter.
 - 
getValue<Z> Z getValue(Parameter<Z> parameter) - Returns:
- The routine's OUT value for an OUT parameter.
 
 - 
get<Z> Z get(Parameter<Z> parameter) - Returns:
- The routine's OUT value for an OUT parameter.
 
 - 
getReturnValueT getReturnValue() - Returns:
- The routine's return value (if it is a function)
 
 - 
getResultsResults getResults() - Returns:
- The routine's results (if available)
 
 
- 
 
-