public abstract class AbstractRoutine<T> extends Object implements Routine<T>, AttachableInternal
This type is for JOOQ INTERNAL USE only. Do not reference directly
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractRoutine(String name,
Schema schema) |
protected |
AbstractRoutine(String name,
Schema schema,
DataType<T> type) |
protected |
AbstractRoutine(String name,
Schema schema,
Package pkg) |
protected |
AbstractRoutine(String name,
Schema schema,
Package pkg,
DataType<T> type) |
| Modifier and Type | Method and Description |
|---|---|
void |
accept(Context<?> ctx)
|
protected void |
addInOutParameter(Parameter<?> parameter) |
protected void |
addInParameter(Parameter<?> parameter) |
protected void |
addOutParameter(Parameter<?> parameter) |
AggregateFunction<T> |
asAggregateFunction() |
Field<T> |
asField() |
Field<T> |
asField(String alias) |
void |
attach(Configuration c)
Attach this object to a new
Configuration. |
void |
bind(BindContext ctx)
Deprecated.
|
Clause[] |
clauses(Context<?> ctx)
The
Clauses that are represented by this query part. |
Configuration |
configuration()
Get the underlying configuration
|
protected DSLContext |
create()
Internal convenience method
|
protected DSLContext |
create(Configuration configuration)
Internal convenience method
|
protected DSLContext |
create(Context<?> ctx)
Internal convenience method
|
protected static <T> Parameter<T> |
createParameter(String name,
DataType<T> type)
Subclasses may call this method to create
UDTField objects that
are linked to this table. |
protected static <T> Parameter<T> |
createParameter(String name,
DataType<T> type,
boolean isDefaulted)
Subclasses may call this method to create
UDTField objects that
are linked to this table. |
boolean |
declaresCTE()
Subclasses may override this
|
boolean |
declaresFields()
Subclasses may override this
|
boolean |
declaresTables()
Subclasses may override this
|
boolean |
declaresWindows()
Subclasses may override this
|
void |
detach()
Detach this object from its current
Configuration. |
boolean |
equals(Object that)
Check whether this
QueryPart can be considered equal to
another QueryPart. |
int |
execute()
Execute the stored object on an underlying connection
|
int |
execute(Configuration c)
Execute the stored object using a
Configuration object |
List<Parameter<?>> |
getInParameters()
A list of IN parameters passed to the stored procedure as argument.
|
protected Map<Parameter<?>,Field<?>> |
getInValues() |
String |
getName()
The name of this routine
|
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() |
protected Parameter<?> |
getReturnParameter() |
T |
getReturnValue() |
Schema |
getSchema()
Get the routine schema
|
protected <Z> Z |
getValue(Parameter<Z> parameter) |
int |
hashCode()
Generate a hash code from this
QueryPart. |
protected boolean |
isOverloaded() |
protected void |
setField(Parameter<?> parameter,
Field<?> value) |
protected void |
setNumber(Parameter<? extends Number> parameter,
Field<? extends Number> value) |
protected void |
setNumber(Parameter<? extends Number> parameter,
Number value) |
protected void |
setOverloaded(boolean overloaded) |
protected void |
setReturnParameter(Parameter<T> parameter) |
protected void |
setValue(Parameter<?> parameter,
Object value) |
void |
toSQL(RenderContext ctx)
Deprecated.
|
String |
toString()
Render a SQL string of this
QueryPart
For improved debugging, this renders a SQL string of this
QueryPart with inlined bind variables. |
protected DataAccessException |
translate(String sql,
SQLException e)
Internal convenience method
|
protected final void setNumber(Parameter<? extends Number> parameter, Field<? extends Number> value)
public final void attach(Configuration c)
AttachableConfiguration.attach in interface Attachablec - A configuration or null, if you wish to
detach this Attachable from its previous
configuration.public final void detach()
AttachableConfiguration.
This is the same as calling attach(null).
detach in interface Attachablepublic final Configuration configuration()
AttachableInternalconfiguration in interface AttachableInternalpublic final int execute(Configuration c)
RoutineConfiguration objectpublic final int execute()
Routinepublic final Clause[] clauses(Context<?> ctx)
QueryPartInternalClauses that are represented by this query part.
QueryParts can specify several Clauses for which an
event will be emitted before (in forward
order) and after (in reverse order) visiting
the the query part through Context.visit(QueryPart)
This method is for JOOQ INTERNAL USE only. Do not reference directly
clauses in interface QueryPartInternalClauses represented by this query part or
null or an empty array if this query part does not
represent a clause.public void accept(Context<?> ctx)
QueryPartInternalQueryPart can accept a Context object
in order to render a SQL string or to bind its variables.accept in interface QueryPartInternalpublic final T getReturnValue()
getReturnValue in interface Routine<T>protected final <Z> Z getValue(Parameter<Z> parameter)
public final List<Parameter<?>> getOutParameters()
RoutineRoutine.getParameters().getOutParameters in interface Routine<T>Routine.getParameters()public final List<Parameter<?>> getInParameters()
RoutineRoutine.getParameters().getInParameters in interface Routine<T>Routine.getParameters()public final List<Parameter<?>> getParameters()
getParameters in interface Routine<T>public final Schema getSchema()
Routinepublic final Package getPackage()
Routine
This is only supported in the SQLDialect.ORACLE dialect.
getPackage in interface Routine<T>null if
there is no such container.public final String getName()
Routineprotected final Parameter<?> getReturnParameter()
protected final void setOverloaded(boolean overloaded)
protected final boolean isOverloaded()
protected final void addInParameter(Parameter<?> parameter)
protected final void addInOutParameter(Parameter<?> parameter)
protected final void addOutParameter(Parameter<?> parameter)
public final AggregateFunction<T> asAggregateFunction()
protected static final <T> Parameter<T> createParameter(String name, DataType<T> type)
UDTField objects that
are linked to this table.name - The name of the field (case-sensitive!)type - The data type of the fieldprotected static final <T> Parameter<T> createParameter(String name, DataType<T> type, boolean isDefaulted)
UDTField objects that
are linked to this table.name - The name of the field (case-sensitive!)type - The data type of the fieldisDefaulted - Whether the parameter is defaulted (see
Parameter.isDefaulted()public int hashCode()
QueryPartQueryPart.
In general, QueryPart hash codes are the same as the hash
codes generated from QueryPart.toString(). This guarantees consistent
behaviour with QueryPart.equals(Object)
Some QueryPart implementations may choose to override this
behaviour for improved performance, as QueryPart.toString() is an
expensive operation, if called many times.
@Deprecated public void toSQL(RenderContext ctx)
QueryPartInternalQueryPart to a SQL string contained in
context.sql(). The context will contain
additional information about how to render this QueryPart,
e.g. whether this QueryPart should be rendered as a
declaration or reference, whether this QueryPart's contained
bind variables should be inlined or replaced by '?', etc.toSQL in interface QueryPartInternal@Deprecated public void bind(BindContext ctx) throws DataAccessException
QueryPartInternalQueryPart to a PreparedStatement
This method is for JOOQ INTERNAL USE only. Do not reference directly
bind in interface QueryPartInternalctx - The context holding the next bind index and other information
for variable bindingDataAccessException - If something went wrong while binding a
variablepublic boolean declaresFields()
declaresFields in interface QueryPartInternalpublic boolean declaresTables()
declaresTables in interface QueryPartInternalpublic boolean declaresWindows()
declaresWindows in interface QueryPartInternalpublic boolean declaresCTE()
declaresCTE in interface QueryPartInternalpublic boolean equals(Object that)
QueryPartQueryPart can be considered equal to
another QueryPart.
In general, QueryPart equality is defined in terms of
QueryPart.toString() equality. In other words, two query parts are
considered equal if their rendered SQL (with inlined bind variables) is
equal. This means that the two query parts do not necessarily have to be
of the same type.
Some QueryPart implementations may choose to override this
behaviour for improved performance, as QueryPart.toString() is an
expensive operation, if called many times.
public String toString()
QueryPartQueryPart
For improved debugging, this renders a SQL string of this
QueryPart with inlined bind variables. If you wish to gain
more control over the concrete SQL rendering of this
QueryPart, use DSLContext.renderContext() to obtain a
configurable render context for SQL rendering.
protected final DSLContext create()
protected final DSLContext create(Configuration configuration)
protected final DSLContext create(Context<?> ctx)
protected final DataAccessException translate(String sql, SQLException e)
Copyright © 2015. All Rights Reserved.