com.businessobjects.rebean.wi
Interface DataSourceParameter


public interface DataSourceParameter

The DataSourceParameter interface defines a parameter of a data source.

Example:Getting the DataSourceParameter information from the data source

 //Get the datasource ID
 String universeId =((IUniverse)ceInfoobject).buildUniverseIdString();
 DocumentInstance wiDoc = widocRepEngine.newDocument(universeId);
 ReportContainer report = wiDoc.createReport("Report1");
 DataProviders dps = wiDoc.getDataProviders();
 DataProvider dp = dps.getItem(0);
 DataSource ds = dp.getDataSource();
 DataSourceObject order_amt = ds.getClasses().getChildByName("Order Amount");
 DataSourceObject order_amt_unit = ds.getClasses().getChildByName("Order Amount Unit");
 Query q = dp.getQuery();
 // Add result objects to the query
 q.addResultObject(order_amt);
 q.addResultObject(order_amt_unit);
 // Run the execute the query and fetch the data
 dp.runQuery();
 wiDoc.applyFormat();
 DataSourceParameters DSPs =  ds.getParameters();
 DataSourceParameter DSP = DSPs.getParameter(0);
 // Get the name of the DataSourceParameter
 out.print(DSP.getName());
 

Since:
12.0
See Also:
DataSourceParameters.getParameter(int)

Method Summary
 java.lang.String getClassName()
          Retrieves the parameter class name.
 java.lang.Object getDefaultValue()
          The default value for this parameter.
 java.lang.String getName()
          Retrieves the name of the data source parameter.
 DataSourceParameterType getType()
          Retrieves the type to which the value can be converted.
 boolean isRequired()
          Returns true if a input value is required or false if it can be skipped while processing data source parameter value's setting.
 

Method Detail

getName

java.lang.String getName()
Retrieves the name of the data source parameter.

Returns:
this parameter's display name.

getClassName

java.lang.String getClassName()
Retrieves the parameter class name. A data source parameter class allows to distinguish specific parameters.

Returns:
the parameter class name.

getType

DataSourceParameterType getType()
Retrieves the type to which the value can be converted.

Returns:
parameter value's type.

isRequired

boolean isRequired()
Returns true if a input value is required or false if it can be skipped while processing data source parameter value's setting.

Returns:
true if a value is required for this parameter, false otherwise.

getDefaultValue

java.lang.Object getDefaultValue()
The default value for this parameter.

Returns:
the default value, or null if there isn't one. The value must be cast in DataSourceParameterType.getType().