Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle Real-Time Decisions
11g Release 1 (11.1.1)

E17787-01


com.sigmadynamics.server.DataServices.DatabaseProvider
Interface StoredProcedure

All Superinterfaces:
WriteOnlyStoredProcedure

public interface StoredProcedure
extends WriteOnlyStoredProcedure

Interface that provides the functionality to call stored procedures.


Field Summary
static int NO_MORE_RESULTS
           
static int RESULT_SET_RESULT
           
static int UPDATE_COUNT_RESULT
           

 

Method Summary
 int execute()
          executes a stored procedure.
 SDResultSet executeWithResultSet()
          executes a stored procedure and returns the result set.
 int executeWithUpdateCount()
          executes a stored procedure that returns an update count.
 java.io.InputStream getBinaryStream(int paramIndex)
          Returns the value of a stored procedure parameter.
 long getDate(int paramIndex)
          Returns the value of a stored procedure parameter.
 long getDate(int paramIndex, java.util.Calendar cal)
           
 double getDouble(int paramIndex)
          Returns the value of a stored procedure parameter.
 int getInt(int paramIndex)
          Returns the value of a stored procedure parameter.
 long getLong(int paramIndex)
          Returns the value of a stored procedure parameter.
 int getMoreResults()
          returns an indication of whether there are more results from the stored procedure and whether the next result is a result set or an update count.
 SDResultSet getResultSet()
          gets a result set returned from a stored procedure.
 java.lang.String getString(int paramIndex)
          Returns the value of a stored procedure parameter.
 int getUpdateCount()
          gets an update count returned from a stored procedure.
 void set(int paramIndex, byte[] value)
          Deprecated.  
 void set(int paramIndex, double value)
          sets a stored procedure parameter with a double value.
 void set(int paramIndex, java.io.InputStream value, int length)
          sets a stored procedure parameter with a InputStream value.
 void set(int paramIndex, int value)
          sets a stored procedure parameter with a int value.
 void set(int paramIndex, long value)
          sets a stored procedure parameter with a long value.
 void set(int paramIndex, java.lang.String value)
          sets a stored procedure parameter with a String value.
 void setDate(int paramIndex, long value)
          sets a stored procedure parameter with a long value.
 void setDate(int paramIndex, long value, java.util.Calendar cal)
          sets a stored procedure parameter with a long value.
 void setNull(int paramIndex)
           
 boolean wasNull()
          Retrieves whether the last OUT parameter read had the value of SQL NULL.

 

Methods inherited from interface com.sigmadynamics.server.DataServices.DatabaseProvider.WriteOnlyStoredProcedure
close, flush, getName, getParameterCount

 

Field Detail

NO_MORE_RESULTS

static final int NO_MORE_RESULTS
See Also:
Constant Field Values

RESULT_SET_RESULT

static final int RESULT_SET_RESULT
See Also:
Constant Field Values

UPDATE_COUNT_RESULT

static final int UPDATE_COUNT_RESULT
See Also:
Constant Field Values

Method Detail

set

void set(int paramIndex,
         java.lang.String value)
sets a stored procedure parameter with a String value.

The parameter set is at the ordinal position specified by the paramIndex parameter. The parameter must be either an IN or INOUT parameter.

Specified by:
set in interface WriteOnlyStoredProcedure
Parameters:
paramIndex - specifies which parameter. The first parameter is 1, the second is 2, etc.
value - the value for the parameter

set

void set(int paramIndex,
         double value)
sets a stored procedure parameter with a double value.

The parameter set is at the ordinal position specified by the paramIndex parameter. The parameter must be either an IN or INOUT parameter.

Specified by:
set in interface WriteOnlyStoredProcedure
Parameters:
paramIndex - specifies which parameter. The first parameter is 1, the second is 2, etc.
value - the value for the parameter

set

void set(int paramIndex,
         int value)
sets a stored procedure parameter with a int value.

The parameter set is at the ordinal position specified by the paramIndex parameter. The parameter must be either an IN or INOUT parameter.

Specified by:
set in interface WriteOnlyStoredProcedure
Parameters:
paramIndex - specifies which parameter. The first parameter is 1, the second is 2, etc.
value - the value for the parameter

set

void set(int paramIndex,
         long value)
sets a stored procedure parameter with a long value.

The parameter set is at the ordinal position specified by the paramIndex parameter. The parameter must be either an IN or INOUT parameter.

Specified by:
set in interface WriteOnlyStoredProcedure
Parameters:
paramIndex - specifies which parameter. The first parameter is 1, the second is 2, etc.
value - the value for the parameter

setDate

void setDate(int paramIndex,
             long value,
             java.util.Calendar cal)
sets a stored procedure parameter with a long value.

The parameter set is at the ordinal position specified by the paramIndex parameter. The parameter must be either an IN or INOUT parameter.

NB. This call will work on TIMESTAMP columns and will also work for DATE or TIME columns but you may need to obey JDBC rules about the date or time values derived from the long in order to avoid problems with drivers.

Specified by:
setDate in interface WriteOnlyStoredProcedure
Parameters:
paramIndex - specifies which parameter. The first parameter is 1, the second is 2, etc.
value - the value for the parameter
cal - a Calendar with which to specify timezone

setDate

void setDate(int paramIndex,
             long value)
sets a stored procedure parameter with a long value.

The parameter set is at the ordinal position specified by the paramIndex parameter. The parameter must be either an IN or INOUT parameter.

NB. This call will work on TIMESTAMP columns and will also work for DATE or TIME columns but you may need to obey JDBC rules about the date or time values derived from the long in order to avoid problems with drivers.

Specified by:
setDate in interface WriteOnlyStoredProcedure
Parameters:
paramIndex - specifies which parameter. The first parameter is 1, the second is 2, etc.
value - the value for the parameter

set

void set(int paramIndex,
         java.io.InputStream value,
         int length)
sets a stored procedure parameter with a InputStream value.

The parameter set is at the ordinal position specified by the paramIndex parameter. The parameter must be either an IN or INOUT parameter.

Specified by:
set in interface WriteOnlyStoredProcedure
Parameters:
paramIndex - specifies which parameter. The first parameter is 1, the second is 2, etc.
value - the value for the parameter

set

@Deprecated
void set(int paramIndex,
                    byte[] value)
Deprecated. 
sets a stored procedure parameter with values from a byte[].

The parameter set is at the ordinal position specified by the paramIndex parameter. The parameter must be either an IN or INOUT parameter.

Specified by:
set in interface WriteOnlyStoredProcedure
Parameters:
paramIndex - specifies which parameter. The first parameter is 1, the second is 2, etc.
value - the value for the parameter

setNull

void setNull(int paramIndex)
Specified by:
setNull in interface WriteOnlyStoredProcedure

getString

java.lang.String getString(int paramIndex)
Returns the value of a stored procedure parameter.

Returns the value of the parameter specified by the paramIndex parameter. The parameter must be either an OUT or INOUT parameter.

Parameters:
paramIndex - specifies which parameter. The first parameter is 1, the second is 2, etc.
Returns:
the value of the OUT parameter

getDouble

double getDouble(int paramIndex)
Returns the value of a stored procedure parameter.

Returns the value of the parameter specified by the paramIndex parameter. The parameter must be either an OUT or INOUT parameter.

Parameters:
paramIndex - specifies which parameter. The first parameter is 1, the second is 2, etc.
Returns:
the value of the OUT parameter

getLong

long getLong(int paramIndex)
Returns the value of a stored procedure parameter.

Returns the value of the parameter specified by the paramIndex parameter. The parameter must be either an OUT or INOUT parameter.

Parameters:
paramIndex - specifies which parameter. The first parameter is 1, the second is 2, etc.
Returns:
the value of the OUT parameter

getDate

long getDate(int paramIndex)
Returns the value of a stored procedure parameter.

Returns the value of the parameter specified by the paramIndex parameter. The parameter must be either an OUT or INOUT parameter.

Parameters:
paramIndex - specifies which parameter. The first parameter is 1, the second is 2, etc.
Returns:
the value of the OUT parameter

getDate

long getDate(int paramIndex,
             java.util.Calendar cal)

getInt

int getInt(int paramIndex)
Returns the value of a stored procedure parameter.

Returns the value of the parameter specified by the paramIndex parameter. The parameter must be either an OUT or INOUT parameter.

Parameters:
paramIndex - specifies which parameter. The first parameter is 1, the second is 2, etc.
Returns:
the value of the OUT parameter

getBinaryStream

java.io.InputStream getBinaryStream(int paramIndex)
Returns the value of a stored procedure parameter.

Returns the value of the parameter specified by the paramIndex parameter. The parameter must be either an OUT or INOUT parameter.

Parameters:
paramIndex - specifies which parameter. The first parameter is 1, the second is 2, etc.
Returns:
the value of the OUT parameter

wasNull

boolean wasNull()
Retrieves whether the last OUT parameter read had the value of SQL NULL. Note that this method should be called only after calling a getter method; otherwise, there is no value to use in determining whether it is NULL or not.
Returns:
true if the last parameter read was SQL NULL; false otherwise
Throws:
DatabaseProviderException - if a database access error occurs

executeWithResultSet

SDResultSet executeWithResultSet()
executes a stored procedure and returns the result set.

Executes a stored procedure that is known to return a result set. You must set all IN or INOUT parameters using the set methods before calling this method.

Returns:
the result set

executeWithUpdateCount

int executeWithUpdateCount()
executes a stored procedure that returns an update count.

Executes a stored procedure that is known to return an update count. You must set all IN or INOUT parameters using the set methods before calling this method.

Returns:
the update count

execute

int execute()
executes a stored procedure.

Call this method to execute a stored procedure when you don't know whether the stored procedure returns a result set or an update count. It returns either RESULT_SET_RESULT to indicate a result set or UPDATE_COUNT_RESULT to indicate an update count.

You must set all IN and INOUT parameters using the set methods before calling this method.

Specified by:
execute in interface WriteOnlyStoredProcedure
Returns:
returns RESULT_SET_RESULT to indicate a result set or UPDATE_COUNT_RESULT to indicate an update count

getUpdateCount

int getUpdateCount()
gets an update count returned from a stored procedure.

Call this method after a call to getMoreResults indicates that an update count is the next result.

Returns:
the update count

getResultSet

SDResultSet getResultSet()
gets a result set returned from a stored procedure.

Call this method after a call to getMoreResults indicates that a result set is the next result.

Returns:
the result set

getMoreResults

int getMoreResults()
returns an indication of whether there are more results from the stored procedure and whether the next result is a result set or an update count.
Returns:
returns NO_MORE_RESULTS to indicate that there are no more results; RESULT_SET_RESULT to indicate that the next result is a result set; or UPDATE_COUNT_RESULT to indicate the next result is an update count.

Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle Real-Time Decisions
11g Release 1 (11.1.1)

E17787-01


Copyright © 2010, Oracle. All rights reserved.