com.googlecode.jdbw.metadata
Class StoredProcedure

java.lang.Object
  extended by com.googlecode.jdbw.metadata.StoredProcedure
All Implemented Interfaces:
Comparable<StoredProcedure>

public class StoredProcedure
extends Object
implements Comparable<StoredProcedure>

A stored procedure is normally a piece of programming code that has been pre-created on the server and has been compiled into some intermediate format, to be executed by a specific command. Normally this code is some kind of imperative SQL-like language, but could really be anything.

A stored procedure may or may not have input parameters and some database servers also supports output parameters to give data back to the caller.

You normally won't create instances of this class yourself, but rather will be supplied with them by asking a Schema to give you the list of stored procedures it has.

Author:
Martin Berglund
See Also:
Schema

Constructor Summary
StoredProcedure(MetaDataResolver metaDataResolver, Catalog catalog, Schema schema, String name)
           
 
Method Summary
 int compareTo(StoredProcedure o)
           
 Catalog getCatalog()
           
 String getCode()
           
 List<String> getInputParameterNames()
           
 String getName()
           
 Schema getSchema()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

StoredProcedure

public StoredProcedure(MetaDataResolver metaDataResolver,
                       Catalog catalog,
                       Schema schema,
                       String name)
Method Detail

getName

public String getName()
Returns:
Name of the stored procedure

getSchema

public Schema getSchema()
Returns:
Schema that owns this stored procedure

getCatalog

public Catalog getCatalog()
Returns:
Catalog this stored procedure is sorted under, i.e. the owner of this stored procedure's schema

getInputParameterNames

public List<String> getInputParameterNames()
                                    throws SQLException
Returns:
List of input parameter names, in the order the stored procedure expects them
Throws:
SQLException - If an error occurred while reading the information from the database

compareTo

public int compareTo(StoredProcedure o)
Specified by:
compareTo in interface Comparable<StoredProcedure>

getCode

public String getCode()
               throws SQLException
Throws:
SQLException

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2012. All Rights Reserved.