com.ibm.openpages.api.query

## Class ParameterValue

- java.lang.Object
- - com.ibm.openpages.api.query.ParameterValue

-     public class ParameterValue
      extends java.lang.Object

  An object that represents an input binding parameter for a parameterized SQL statement.

  The constructors and setter methods set the input binding parameter to the specified value type.

  The following example demonstrates the usage of this object.

       IQueryService queryService = ...
       String query = "SELECT [Resource ID], [Name] FROM [SOXIssue] WHERE [Status] = ?";
       IQuery query = queryService.buildQuery(query);

       ParameterValue param1 = new ParameterValue("Open");
       query.bindParameter(1, param1);

       ITabularResultSet resultset = query.fetchRows(0);

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `ParameterValue(java.lang.Boolean value)` Constructor for a `Boolean` input parameter
    `ParameterValue(java.util.Date value)` Constructor for a `Date` input parameter
    `ParameterValue(java.lang.Double value)` Constructor for an `Double` input parameter
    `ParameterValue(java.lang.Double value, boolean isCurrency)` Constructor for an currency input parameter
    `ParameterValue(java.lang.Integer value)` Constructor for an `Integer` input parameter
    `ParameterValue(java.lang.String value)` Constructor for an `String` input parameter

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.lang.Boolean` | `getBooleanValue()` Returns the value of this input parameter as a `Boolean`
    `java.lang.Double` | `getCurrencyValue()` Returns the value of this input parameter as a `Double`
    `DataType` | `getDataType()` Returns the `DataType` for this input parameter
    `java.util.Date` | `getDateValue()` Returns the value of this input parameter as a `Date`
    `java.lang.Double` | `getFloatValue()` Returns the value of this input parameter as a `Double`
    `java.lang.Integer` | `getIntegerValue()` Returns the value of this input parameter as an `Integer`
    `java.lang.String` | `getStringValue()` Returns the value of this input parameter as a `String`
    `void` | `setBooleanValue(java.lang.Boolean value)` Sets the value of this input parameter as a `Boolean`
    `void` | `setCurrencyValue(java.lang.Double value)` Sets the value of this input parameter as a `Double`
    `void` | `setDateValue(java.util.Date value)` Sets the value of this input parameter as a `Date`
    `void` | `setFloatValue(java.lang.Double value)` Sets the value of this input parameter as a `Double`
    `void` | `setIntegerValue(java.lang.Integer value)` Sets the value of this input parameter as a `Integer`
    `void` | `setStringValue(java.lang.String value)` Sets the value of this input parameter as a `String`
    `java.lang.String` | `toString()`

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### ParameterValue

          public ParameterValue(java.lang.Boolean value)

      Constructor for a `Boolean` input parameter
      Parameters:
        `value` - specified value of this input parameter as a `Boolean`

    - #### ParameterValue

          public ParameterValue(java.util.Date value)

      Constructor for a `Date` input parameter
      Parameters:
        `value` - specified value of this input parameter as a `Date`

    - #### ParameterValue

          public ParameterValue(java.lang.Integer value)

      Constructor for an `Integer` input parameter
      Parameters:
        `value` - specified value of this input parameter as an `Integer`

    - #### ParameterValue

          public ParameterValue(java.lang.String value)

      Constructor for an `String` input parameter
      Parameters:
        `value` - specified value of this input parameter as a `String`

    - #### ParameterValue

          public ParameterValue(java.lang.Double value)

      Constructor for an `Double` input parameter
      Parameters:
        `value` - specified value of this input parameter as a `Double`

    - #### ParameterValue

          public ParameterValue(java.lang.Double value,
                                boolean isCurrency)

      Constructor for an currency input parameter
      Parameters:
        `value` - specified value of this input parameter as a `Double`
        `isCurrency` - if currency parameter, set to true; otherwise set to false

  - ### Method Detail

    - #### getDataType

          public DataType getDataType()

      Returns the `DataType` for this input parameter
      Returns:
        the `DataType` for this input parameter

    - #### getBooleanValue

          public java.lang.Boolean getBooleanValue()

      Returns the value of this input parameter as a `Boolean`
      Returns:
        the value of this input parameter as a `Boolean`

    - #### setBooleanValue

          public void setBooleanValue(java.lang.Boolean value)

      Sets the value of this input parameter as a `Boolean`

    - #### getDateValue

          public java.util.Date getDateValue()

      Returns the value of this input parameter as a `Date`
      Returns:
        the value of this input parameter as a `Date`

    - #### setDateValue

          public void setDateValue(java.util.Date value)

      Sets the value of this input parameter as a `Date`

    - #### getFloatValue

          public java.lang.Double getFloatValue()

      Returns the value of this input parameter as a `Double`
      Returns:
        the value of this input parameter as a `Double`

    - #### setFloatValue

          public void setFloatValue(java.lang.Double value)

      Sets the value of this input parameter as a `Double`

    - #### getIntegerValue

          public java.lang.Integer getIntegerValue()

      Returns the value of this input parameter as an `Integer`
      Returns:
        the value of this input parameter as an `Integer`

    - #### setIntegerValue

          public void setIntegerValue(java.lang.Integer value)

      Sets the value of this input parameter as a `Integer`

    - #### getStringValue

          public java.lang.String getStringValue()

      Returns the value of this input parameter as a `String`
      Returns:
        the value of this input parameter as a `String`

    - #### setStringValue

          public void setStringValue(java.lang.String value)

      Sets the value of this input parameter as a `String`

    - #### getCurrencyValue

          public java.lang.Double getCurrencyValue()

      Returns the value of this input parameter as a `Double`
      Returns:
        the value of this input parameter as a `Double`

    - #### setCurrencyValue

          public void setCurrencyValue(java.lang.Double value)

      Sets the value of this input parameter as a `Double`

    - #### toString

          public java.lang.String toString()

      Overrides:
        `toString` in class `java.lang.Object`

Licensed Materials - Property of IBM
OpenPages with Watson (PID: 5725-D51)
© Copyright IBM Corporation 2013, 2021. All Rights Reserved.
US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.