org.jooq
Interface Routine<T>

All Superinterfaces:
Adapter, Attachable, Comparable<NamedQueryPart>, NamedQueryPart, QueryPart, SchemaProvider, Serializable
All Known Implementing Classes:
AbstractRoutine

public interface Routine<T>
extends NamedQueryPart, SchemaProvider

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:

Functions

But there are exceptions to these rules:

Hence, with #852, jOOQ 1.6.8, the distinction between procedures and functions becomes obsolete. All stored routines are simply referred to as "Routine".

Author:
Lukas Eder

Method Summary
 int execute()
          Execute the stored object on an underlying connection
 int execute(Configuration configuration)
          Execute the stored object using a Configuration object
 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.
 Package getPackage()
          The container package of this stored procedure or function.
 List<Parameter<?>> getParameters()
           
 T getReturnValue()
           
 Schema getSchema()
          Get the routine schema
 
Methods inherited from interface org.jooq.NamedQueryPart
getName
 
Methods inherited from interface org.jooq.QueryPart
attach
 
Methods inherited from interface org.jooq.Adapter
internalAPI
 
Methods inherited from interface java.lang.Comparable
compareTo
 

Method Detail

getSchema

Schema getSchema()
Get the routine schema

Specified by:
getSchema in interface SchemaProvider
Returns:
The contained schema

getPackage

Package getPackage()
The container package of this stored procedure or function.

This is only supported in the SQLDialect.ORACLE dialect.

Returns:
The container package of this object, or null if there is no such container.

getOutParameters

List<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 in getParameters().

Returns:
The list of out parameters
See Also:
getParameters()

getInParameters

List<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 in getParameters().

Returns:
The list of in parameters
See Also:
getParameters()

getReturnValue

T getReturnValue()
Returns:
The routine's return value (if it is a function)

getParameters

List<Parameter<?>> getParameters()
Returns:
A list of parameters passed to the stored object as argument

execute

int execute(Configuration configuration)
            throws DataAccessException
Execute the stored object using a Configuration object

Throws:
DataAccessException - if something went wrong executing the query

execute

int execute()
            throws DataAccessException
Execute the stored object on an underlying connection

Throws:
DataAccessException - if something went wrong executing the query


Copyright © 2012. All Rights Reserved.