- All Superinterfaces:
- Attachable,- Named,- Qualified,- QueryPart,- Serializable
- All Known Implementing Classes:
- AbstractRoutine
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 SummaryModifier and TypeMethodDescriptionintexecute()Execute the stored object on an underlying connectionintexecute(Configuration configuration) Execute the stored object using aConfigurationobject<Z> ZA list of IN parameters passed to the stored procedure as argument.<Z> ZgetInValue(Parameter<Z> parameter) A list of OUT parameters passed to the stored procedure as argument.@Nullable PackageThe container package of this stored procedure or function.@NotNull ResultsThe parameter representing this routine'sgetReturnValue()<Z> Z<Z> voidSet the routine's IN value for an IN parameter.<Z> voidSet the routine's IN value for an IN parameter.Methods inherited from interface org.jooq.Attachableattach, configuration, detachMethods inherited from interface org.jooq.Named$name, getComment, getCommentPart, getName, getQualifiedName, getUnqualifiedNameMethods inherited from interface org.jooq.Qualified$schema, getCatalog, getSchema
- 
Method Details- 
getPackageThe 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.
 
- 
getReturnParameterThe parameter representing this routine'sgetReturnValue()- Returns:
- The return parameter or nullif this routine doesn't have a return value.
- See Also:
 
- 
getOutParametersA 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:
 
- 
getInParametersA 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- Returns:
- A list of parameters passed to the stored object as argument
 
- 
executeExecute the stored object using aConfigurationobject- Throws:
- DataAccessException- if something went wrong executing the query
 
- 
executeExecute the stored object on an underlying connection- Throws:
- DataAccessException- if something went wrong executing the query
 
- 
setValueSet the routine's IN value for an IN parameter.
- 
setSet the routine's IN value for an IN parameter.
- 
getValue- Returns:
- The routine's OUT value for an OUT parameter.
 
- 
getInValue- Returns:
- The routine's IN value for an IN parameter.
 
- 
get- Returns:
- The routine's OUT value for an OUT parameter.
 
- 
getReturnValue- Returns:
- The routine's return value (if it is a function)
 
- 
getResults- Returns:
- The routine's results (if available)
 
 
-