com.dotmarketing.db
Class DotStoredProcedure

java.lang.Object
  extended by com.dotmarketing.db.DotStoredProcedure

public class DotStoredProcedure
extends java.lang.Object

This class alows user to run store procedures

Author:
Oswaldo

Field Summary
 int returnValue
           
 
Constructor Summary
DotStoredProcedure()
           
 
Method Summary
 void addInOutObject(java.lang.Object x, int paramType)
           
 void addInOutParam(boolean x, int paramType)
          Adds a feature to the Param attribute of the dotConnect object and register the same attribute as an output
 void addInOutParam(int x, int paramType)
          This method adds an int parameter to the prepared SQL statement and register the same attribute as an output
 void addInOutParam(java.lang.Object x, int paramType)
           
 void addInOutParam(java.lang.String x, int paramType)
          This method adds a String parameter to the prepared SQL statement and register the same attribute as an output
 void addObject(java.lang.Object x)
           
 void addParam(boolean x)
          Adds a feature to the Param attribute of the dotConnect object
 void addParam(java.util.Date x)
          Adds a date parameter to the prepared SQL statement.
 void addParam(java.util.Date x, int paramType)
          Adds a date parameter to the prepared SQL statement and register the same attribute as an output
 void addParam(double x)
          Adds a double parameter to the prepared SQL statement.
 void addParam(double x, int paramType)
          Adds a double parameter to the prepared SQL statement and register the same attribute as an output
 void addParam(int x)
          This method adds an int parameter to the prepared SQL statement.
 void addParam(long x)
          Adds a long parameter to the prepared SQL statement.
 void addParam(long x, int paramType)
          Adds a long parameter to the prepared SQL statement and register the same attribute as an output
 void addParam(java.lang.Object x)
           
 void addParam(java.lang.String x)
          This method adds a String parameter to the prepared SQL statement.
 void executeStoredProcedure()
          Execute the configure stored procedure with the default data source
 void executeStoredProcedure(java.lang.String dataSource)
          Execute the configure stored procedure with a specific data source
 int getInt(java.lang.String x)
          Deprecated. 
 int getMaxRows()
           
 int getNumRows()
           
 java.lang.Object getObject(java.lang.Object x)
          Deprecated. 
 java.lang.Object getObject(java.lang.String x)
          Deprecated. 
 java.lang.Object[] getObjectArray(java.lang.String ObjName)
          Deprecated. 
 void getResult()
          Deprecated. 
 void getResult(java.lang.String dataSource)
          Deprecated. 
 java.util.List<java.util.Map<java.lang.String,java.lang.String>> getResults()
          Deprecated. 
 java.util.List<java.util.Map<java.lang.String,java.lang.String>> getResults(java.lang.String dataSource)
          Deprecated. 
 java.lang.String getSQL()
           
 int getStartRow()
          Returns the startRow.
 java.util.HashMap<java.lang.Integer,java.lang.Object> getStoredProcedureResults()
          Returns the results of the configure stored procedure with the default data source.
 java.util.HashMap<java.lang.Integer,java.lang.Object> getStoredProcedureResults(java.lang.String dataSource)
          Returns the results of the configure stored procedure with a specific data source.
 java.lang.String getString(java.lang.String x)
          Deprecated. 
 void registerOutParameter(int paramType)
           
 void setFunction(java.lang.String functionName, int numParam)
           
 void setMaxRows(int x)
           
 void setMaxRows(java.lang.String x)
           
 void setProcedure(java.lang.String procedureName, int numParam)
           
 void setSQL(java.lang.String x)
          Deprecated. 
 void setStartRow(int startRow)
          Sets the startRow.
 void setStartRow(java.lang.String x)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

returnValue

public final int returnValue
See Also:
Constant Field Values
Constructor Detail

DotStoredProcedure

public DotStoredProcedure()
Method Detail

getInt

@Deprecated
public int getInt(java.lang.String x)
Deprecated. 


setMaxRows

public void setMaxRows(int x)

setMaxRows

public void setMaxRows(java.lang.String x)

getMaxRows

public int getMaxRows()

getNumRows

public int getNumRows()

getObject

@Deprecated
public java.lang.Object getObject(java.lang.String x)
Deprecated. 


getObject

@Deprecated
public java.lang.Object getObject(java.lang.Object x)
Deprecated. 


getObjectArray

@Deprecated
public java.lang.Object[] getObjectArray(java.lang.String ObjName)
Deprecated. 


getResult

@Deprecated
public void getResult(java.lang.String dataSource)
Deprecated. 


getResult

@Deprecated
public void getResult()
Deprecated. 

Executes SQL, Pulls a result set, sets the rs and rsmd variables.


setSQL

@Deprecated
public void setSQL(java.lang.String x)
Deprecated. 


setProcedure

public void setProcedure(java.lang.String procedureName,
                         int numParam)

setFunction

public void setFunction(java.lang.String functionName,
                        int numParam)

getSQL

public java.lang.String getSQL()

getString

@Deprecated
public java.lang.String getString(java.lang.String x)
Deprecated. 

Returns a single result as a String.

Parameters:
x - Description of Parameter
Returns:
The string value

getResults

@Deprecated
public java.util.List<java.util.Map<java.lang.String,java.lang.String>> getResults()
Deprecated. 

Returns the results.

Returns:
ArrayList

getResults

@Deprecated
public java.util.List<java.util.Map<java.lang.String,java.lang.String>> getResults(java.lang.String dataSource)
Deprecated. 

Returns the results.

Returns:
ArrayList

setStartRow

public void setStartRow(int startRow)
Sets the startRow.

Parameters:
startRow - The startRow to set

setStartRow

public void setStartRow(java.lang.String x)

getStartRow

public int getStartRow()
Returns the startRow.

Returns:
int

addObject

public void addObject(java.lang.Object x)

addParam

public void addParam(java.lang.Object x)

addParam

public void addParam(boolean x)
Adds a feature to the Param attribute of the dotConnect object

Parameters:
x - The feature to be added to the Param attribute

addParam

public void addParam(int x)
This method adds an int parameter to the prepared SQL statement.

Parameters:
x - The feature to be added to the Param attribute

addParam

public void addParam(java.lang.String x)
This method adds a String parameter to the prepared SQL statement.

Parameters:
x - The feature to be added to the Param attribute

addParam

public void addParam(long x)
Adds a long parameter to the prepared SQL statement.

Parameters:
x - The feature to be added to the Param attribute

addParam

public void addParam(double x)
Adds a double parameter to the prepared SQL statement.

Parameters:
x - The feature to be added to the Param attribute

addParam

public void addParam(java.util.Date x)
Adds a date parameter to the prepared SQL statement.

Parameters:
x - The feature to be added to the Param attribute

registerOutParameter

public void registerOutParameter(int paramType)

addInOutObject

public void addInOutObject(java.lang.Object x,
                           int paramType)

addInOutParam

public void addInOutParam(java.lang.Object x,
                          int paramType)

addInOutParam

public void addInOutParam(boolean x,
                          int paramType)
Adds a feature to the Param attribute of the dotConnect object and register the same attribute as an output

Parameters:
x - The feature to be added to the Param attribute
paramType - Output parameter type

addInOutParam

public void addInOutParam(int x,
                          int paramType)
This method adds an int parameter to the prepared SQL statement and register the same attribute as an output

Parameters:
x - The feature to be added to the Param attribute
paramType - Output parameter type

addInOutParam

public void addInOutParam(java.lang.String x,
                          int paramType)
This method adds a String parameter to the prepared SQL statement and register the same attribute as an output

Parameters:
x - The feature to be added to the Param attribute
paramType - Output parameter type

addParam

public void addParam(long x,
                     int paramType)
Adds a long parameter to the prepared SQL statement and register the same attribute as an output

Parameters:
x - The feature to be added to the Param attribute
paramType - Output parameter type

addParam

public void addParam(double x,
                     int paramType)
Adds a double parameter to the prepared SQL statement and register the same attribute as an output

Parameters:
x - The feature to be added to the Param attribute
paramType - Output parameter type

addParam

public void addParam(java.util.Date x,
                     int paramType)
Adds a date parameter to the prepared SQL statement and register the same attribute as an output

Parameters:
x - The feature to be added to the Param attribute
paramType - Output parameter type

executeStoredProcedure

public void executeStoredProcedure()
Execute the configure stored procedure with the default data source


executeStoredProcedure

public void executeStoredProcedure(java.lang.String dataSource)
Execute the configure stored procedure with a specific data source

Parameters:
dataSource - String

getStoredProcedureResults

public java.util.HashMap<java.lang.Integer,java.lang.Object> getStoredProcedureResults()
Returns the results of the configure stored procedure with the default data source.

Returns:
HashMap The integer key will the parameter position declared in the stored procedure. The first parameter is 1. In the case of a function, the first parameter is the return value.

getStoredProcedureResults

public java.util.HashMap<java.lang.Integer,java.lang.Object> getStoredProcedureResults(java.lang.String dataSource)
Returns the results of the configure stored procedure with a specific data source.

Parameters:
dataSource - String
Returns:
HashMap The integer key will the parameter position declared in the stored procedure. The first parameter is 1. In the case of a function, the first parameter is the return value.


Copyright © 2010 dotCMS Inc. All Rights Reserved.