net.sourceforge.sqlunit.beans
Class OutParam

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

public class OutParam
extends java.lang.Object

The OutParam models a SQLUnit outparam element.

Version:
$Revision: 1.9 $
Author:
Sujit Pal (spal@users.sourceforge.net)

Constructor Summary
OutParam()
          Default constructor.
 
Method Summary
 boolean equals(java.lang.Object obj)
          Returns true if the outparams are equal.
 java.lang.String getId()
          Returns the outparam id.
 java.lang.String getName()
          Returns the outparam name.
 int getSQLType()
          Convenience method to return the SQL (numeric) type from the supplied (String XML) type.
 java.lang.String getType()
          Returns the outparam type.
 java.lang.String getValue()
          Returns the outparam value as a String.
 int hashCode()
          Returns a hashcode for the OutParam object.
 void setId(java.lang.String id)
          Sets the outparam id.
 void setName(java.lang.String name)
          Sets the outparam name.
 void setType(java.lang.String type)
          Sets the outparam type.
 void setValue(ResultSetBean value)
          Sets the outparam value from a ResultSetBean.
 void setValue(java.lang.String value)
          Sets the param value from a String.
 void setValue(StructBean value)
          Sets the outparam value from a StructBean.
 org.jdom.Element toElement()
          Returns a JDOM Element representing this bean.
 java.lang.String toString()
          Returns the string representation of this object.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

OutParam

public OutParam()
Default constructor.

Method Detail

getId

public final java.lang.String getId()
Returns the outparam id.

Returns:
the param id.

setId

public final void setId(java.lang.String id)
Sets the outparam id.

Parameters:
id - the param id.

getName

public final java.lang.String getName()
Returns the outparam name.

Returns:
the outparam name.

setName

public final void setName(java.lang.String name)
Sets the outparam name.

Parameters:
name - the outparam name.

getType

public final java.lang.String getType()
Returns the outparam type.

Returns:
the outparam type.

getSQLType

public final int getSQLType()
                     throws SQLUnitException
Convenience method to return the SQL (numeric) type from the supplied (String XML) type.

Returns:
the SQL Type for this parameter.
Throws:
SQLUnitException - if one is thrown.

setType

public final void setType(java.lang.String type)
Sets the outparam type.

Parameters:
type - the outparam type.

getValue

public final java.lang.String getValue()
Returns the outparam value as a String.

Returns:
the outparam value.

setValue

public final void setValue(java.lang.String value)
Sets the param value from a String.

Parameters:
value - the param value.

setValue

public final void setValue(ResultSetBean value)
Sets the outparam value from a ResultSetBean.

Parameters:
value - a ResultSetBean object.

setValue

public final void setValue(StructBean value)
Sets the outparam value from a StructBean.

Parameters:
value - a ResultSetBean object.

equals

public final boolean equals(java.lang.Object obj)
Returns true if the outparams are equal.

Overrides:
equals in class java.lang.Object
Parameters:
obj - the Object to compare against.
Returns:
true if the two Objects are equal, false otherwise.

hashCode

public final int hashCode()
Returns a hashcode for the OutParam object. This is the sum of the hashcode for the type and the hashcode for the value.

Overrides:
hashCode in class java.lang.Object
Returns:
the hash code for the OutParam object.

toString

public final java.lang.String toString()
Returns the string representation of this object.

Overrides:
toString in class java.lang.Object
Returns:
the String representation of this object.

toElement

public final org.jdom.Element toElement()
Returns a JDOM Element representing this bean.

Returns:
a JDOM Element representing this bean.