net.sourceforge.sqlunit.beans
Class SubRoutine

java.lang.Object
  extended by net.sourceforge.sqlunit.beans.SubRoutine

public class SubRoutine
extends java.lang.Object

The SubRoutine bean represents a partially defined stored procedure or SQL call which can be called later by specifying missing parameters or overriding them with new values.

Version:
$Revision: 1.1 $
Author:
Victor Alekseev (krocodl@users.sourceforge.net)

Constructor Summary
SubRoutine()
          Constructs an empty Subroutine bean.
 
Method Summary
 void addParam(Param param)
          Convenience method to add a single param to the subroutine.
 java.lang.String getDescription()
          Returns the description for the subroutine.
 java.lang.String getName()
          Returns the name of the subroutine.
 java.util.Map getParamMap()
          Returns the parameter map for the subroutine.
 java.lang.String getQuery()
          Returns the query for the subroutine.
 java.lang.String getType()
          Returns the type of the subroutine.
 void setDescription(java.lang.String description)
          Sets the description for the subroutine.
 void setName(java.lang.String name)
          Sets the name of the subroutine.
 void setQuery(java.lang.String query)
          Sets the query for the subroutine.
 void setType(java.lang.String type)
          Sets the type of the subroutine.
 void updateParam(java.lang.String paramName, java.lang.String paramValue)
          Convenience method to update the value of a param object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SubRoutine

public SubRoutine()
Constructs an empty Subroutine bean.

Method Detail

getName

public java.lang.String getName()
Returns the name of the subroutine.

Returns:
the name.

setName

public void setName(java.lang.String name)
Sets the name of the subroutine.

Parameters:
name - the name.

getQuery

public java.lang.String getQuery()
Returns the query for the subroutine.

Returns:
the query.

setQuery

public void setQuery(java.lang.String query)
Sets the query for the subroutine.

Parameters:
query - the query.

getDescription

public java.lang.String getDescription()
Returns the description for the subroutine.

Returns:
the description.

setDescription

public void setDescription(java.lang.String description)
Sets the description for the subroutine.

Parameters:
description - the description.

getType

public java.lang.String getType()
Returns the type of the subroutine.

Returns:
the type.

setType

public void setType(java.lang.String type)
Sets the type of the subroutine. Valid values are "sql" and "call". If not specified, the default value is "sql".

Parameters:
type - the type.

getParamMap

public java.util.Map getParamMap()
Returns the parameter map for the subroutine. The map is keyed by the param.id value.

Returns:
the Parameter map.

addParam

public void addParam(Param param)
Convenience method to add a single param to the subroutine.

Parameters:
param - the Param object to add to the SubRoutine's map.

updateParam

public void updateParam(java.lang.String paramName,
                        java.lang.String paramValue)
Convenience method to update the value of a param object. If the param name does not exist, then no update takes place.

Parameters:
paramName - the name of the param to update.
paramValue - the value of the param to update.