Skip to content

Commit

Permalink
[#4107] Add Routine.getReturnParameter()
Browse files Browse the repository at this point in the history
  • Loading branch information
lukaseder committed Mar 2, 2015
1 parent 27d2684 commit cd58f98
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 6 deletions.
19 changes: 14 additions & 5 deletions jOOQ/src/main/java/org/jooq/Routine.java
Expand Up @@ -109,6 +109,15 @@ public interface Routine<T> extends QueryPart {
*/ */
Package getPackage(); Package getPackage();


/**
* The parameter representing this routine's {@link #getReturnValue()}
*
* @return The return parameter or <code>null</code> if this routine doesn't
* have a return value.
* @see #getParameters()
*/
Parameter<T> getReturnParameter();

/** /**
* A list of OUT parameters passed to the stored procedure as argument. This * 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 * list contains all parameters that are either OUT or INOUT in their
Expand All @@ -129,6 +138,11 @@ public interface Routine<T> extends QueryPart {
*/ */
List<Parameter<?>> getInParameters(); List<Parameter<?>> getInParameters();


/**
* @return A list of parameters passed to the stored object as argument
*/
List<Parameter<?>> getParameters();

/** /**
* @return The routine's return value (if it is a function) * @return The routine's return value (if it is a function)
*/ */
Expand All @@ -139,11 +153,6 @@ public interface Routine<T> extends QueryPart {
*/ */
List<Result<Record>> getResults(); List<Result<Record>> getResults();


/**
* @return A list of parameters passed to the stored object as argument
*/
List<Parameter<?>> getParameters();

/** /**
* Execute the stored object using a {@link Configuration} object * Execute the stored object using a {@link Configuration} object
* *
Expand Down
3 changes: 2 additions & 1 deletion jOOQ/src/main/java/org/jooq/impl/AbstractRoutine.java
Expand Up @@ -688,7 +688,8 @@ public final String getName() {
return name; return name;
} }


protected final Parameter<?> getReturnParameter() { @Override
public final Parameter<T> getReturnParameter() {
return returnParameter; return returnParameter;
} }


Expand Down

0 comments on commit cd58f98

Please sign in to comment.