com.businessobjects.rebean.wi
Interface DataSourceParameterValue


public interface DataSourceParameterValue

The DataSourceParameterValue interface defines the data source parameter's value.

Example:Setting the new date as DataSourceParameterValues

 DataSourceParameters DSPs =  ds.getParameters();
 DataSourceParameterValues DSPVs = dp.getDataSourceParameterValues();
 DataSourceParameterValue DSPV = DSPVs.getValue(0);
 // specify the new keydate based on which the dimensions will be filtered
 Date keydateSpecific = new Date("9/9/07");
 DSPV.setValue(keydateSpecific);
 wiDoc.refresh();
 

Since:
12.0

Method Summary
 DataSourceParameter getParameter()
          Returns the data source parameter.
 java.lang.Object getValue()
          Returns the current parameter value.
 boolean isDefault()
          Checks if the value returned by DataSourceParameterValue.getValue()is a default value.
 void setValue(java.lang.Object value)
          Sets the value for this parameter.
 void useDefault()
          Uses the default value defined at the data source level DataSourceParameter.getDefaultValue().
 

Method Detail

getParameter

DataSourceParameter getParameter()
Returns the data source parameter.

Returns:
DataSourceParameter definition for this value.

getValue

java.lang.Object getValue()
Returns the current parameter value.

Returns:
generic typed Java Object. Object type is defined by DataSourceParameter.getType().

setValue

void setValue(java.lang.Object value)
Sets the value for this parameter.

Note: The new value will be send to server during

  • DataProvider.runQuery()
  • DataProvider.generateQuery()
  • DataProviders.runQueries()
  • DataProviders.generateQueries()
  • DocumentInstance.refresh()
  • DocumentInstance.getLOV(String, LovType, DataSourceParameterValues)
  • DataSourceObject.getLOV(DataSourceParameterValues)
  • Sample code:

              DataProvider dp1 = doc.getDataProviders().getItem(0);
              if (paramValues.getCount() > 0) {
                  DataSourceParameterValue  oneParamValue = paramValues.getValue(0);
                  if (!oneParamValue.isDefault()) {
                      // back to default value
                      oneParamValue.useDefault();
                  }
              }
              //..............
              dp1.runQuery();
              

    Parameters:
    value - any java Object instance which type is defined by DataSourceParameter.getType().

    useDefault

    void useDefault()
    Uses the default value defined at the data source level DataSourceParameter.getDefaultValue().

    See Also:
    DataSourceParameterValue.setValue(Object)

    isDefault

    boolean isDefault()
    Checks if the value returned by DataSourceParameterValue.getValue()is a default value.

    Returns:
    true if this parameter uses the data source defined default value, false otherwise.