jasp.adodb
Class Parameter

java.lang.Object
  |
  +--jasp.adodb.Parameter

public class Parameter
extends java.lang.Object

A Parameter object represents a parameter or argument associated with a Command object based on a parameterized query or stored procedure.


Constructor Summary
Parameter()
           
 
Method Summary
 void AppendChunk(java.lang.Object obj)
          Appends data to a large text or binary data.
 void AssignProps()
          Sets all properties for the currect object.
 int getAttributes()
          Returns the attributes of the Parameter.
 int getDirection()
          Indicates whether the Parameter represents an input parameter, an output parameter, or both, or if the parameter is the return value from a stored procedure.
 java.lang.String getName()
          Returns the name of the Parameter.
 byte getNumericScale()
          Returns the numeric scale of the Parameter.
 int getObjectState()
          Returns the state of the Parameter.
 byte getPrecision()
          Returns the precision of the Parameter.
 Properties getProperties()
          Returns the properties collection
 int getType()
          Returns the type of the Parameter.
 variant getValue()
          Returns the value of the Parameter.
 Property Properties(int index)
          Gets a Property from the Properties collection.
 Property Properties(java.lang.String name)
          Gets a Property from the Properties collection.
 Property Properties(variant var)
          Gets a Property from the Properties collection.
 void setAttributes(int attrib)
          Sets the attributes of the Parameter.
 void setDirection(int dir)
          Sets the direction of the Parameter.
 void setName(java.lang.String name)
          Sets the name of the Parameter.
 void setNumericScale(byte scale)
          Sets the numeric scale of the Parameter.
 void setPrecision(byte precision)
          Sets the precision of the Parameter.
 void setSize(int size)
          Sets the size of the Parameter.
 void setType(int type)
          Sets the type of the Parameter.
 void setValue(boolean val)
          Set the value of the Parameter.
 void setValue(double val)
          Set the value of the Parameter.
 void setValue(float val)
          Set the value of the Parameter.
 void setValue(int val)
          Set the value of the Parameter.
 void setValue(long val)
          Set the value of the Parameter.
 void setValue(java.lang.Object val)
          Set the value of the Parameter.
 void setValue(short value)
          Set the value of the Parameter.
 void setValue(java.lang.String val)
          Set the value of the Parameter.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Parameter

public Parameter()
Method Detail

getName

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

setName

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

getAttributes

public int getAttributes()
Returns the attributes of the Parameter.

setAttributes

public void setAttributes(int attrib)
Sets the attributes of the Parameter.

getDirection

public int getDirection()
Indicates whether the Parameter represents an input parameter, an output parameter, or both, or if the parameter is the return value from a stored procedure.
Returns:
the directoin of the Parameter.

setDirection

public void setDirection(int dir)
Sets the direction of the Parameter.
Parameters:
dir - the direction of the Parameter. can be one of the following constants.
  1. adParamUnknown Indicates parameter direction is unknown
  2. adParamInput Default. Indicates an input parameter
  3. adParamOutput Indicates an output parameter.
  4. adParamInputOutput Indicates both an input and output parameter
  5. adParamReturnValue Indicates a return value.

setPrecision

public void setPrecision(byte precision)
Sets the precision of the Parameter.

getPrecision

public byte getPrecision()
Returns the precision of the Parameter.

getType

public int getType()
Returns the type of the Parameter.

setType

public void setType(int type)
             throws java.lang.Exception
Sets the type of the Parameter.
Parameters:
type - the new type of the parameter.

setNumericScale

public void setNumericScale(byte scale)
Sets the numeric scale of the Parameter.

getNumericScale

public byte getNumericScale()
Returns the numeric scale of the Parameter.

getValue

public variant getValue()
                 throws java.lang.Exception
Returns the value of the Parameter.

setValue

public void setValue(int val)
              throws java.lang.Exception
Set the value of the Parameter.

setValue

public void setValue(long val)
              throws java.lang.Exception
Set the value of the Parameter.

setValue

public void setValue(short value)
              throws java.lang.Exception
Set the value of the Parameter.

setValue

public void setValue(boolean val)
              throws java.lang.Exception
Set the value of the Parameter.

setValue

public void setValue(float val)
              throws java.lang.Exception
Set the value of the Parameter.

setValue

public void setValue(double val)
              throws java.lang.Exception
Set the value of the Parameter.

setValue

public void setValue(java.lang.String val)
              throws java.lang.Exception
Set the value of the Parameter.

setValue

public void setValue(java.lang.Object val)
              throws java.lang.Exception
Set the value of the Parameter.

setSize

public void setSize(int size)
             throws java.lang.Exception
Sets the size of the Parameter.

AppendChunk

public void AppendChunk(java.lang.Object obj)
                 throws java.lang.Exception
Appends data to a large text or binary data.

getProperties

public Properties getProperties()
                         throws java.lang.Exception
Returns the properties collection

getObjectState

public int getObjectState()
Returns the state of the Parameter.

AssignProps

public void AssignProps()
Sets all properties for the currect object.

Properties

public Property Properties(variant var)
                    throws java.lang.Exception
Gets a Property from the Properties collection.
Parameters:
var - the name or index of the property.
Returns:
a Property.

Properties

public Property Properties(int index)
                    throws java.lang.Exception
Gets a Property from the Properties collection.
Parameters:
index - the index of the property.
Returns:
a Property.

Properties

public Property Properties(java.lang.String name)
                    throws java.lang.Exception
Gets a Property from the Properties collection.
Parameters:
name - the name of the property.
Returns:
a Property.

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object