com.businessobjects.datasource
Interface Sampling


public interface Sampling

The Sampling interface provides Information about the suppported Sampling Modes of a datasource. This type is used as a property in DataSourceSpecification instance.

Example: Setting the sampling mode and sampling size

 QuerySpecification boQuerySpec = QuerySpecification.Factory.newInstance();
 boQuerySpec.setSamplingMode(SamplingMode.FREE_RANDOM);
 boQuerySpec.setSamplingSize(2);
 // Create a Query array. We are only using a single query in this example, so the array is of size 1.
 Query boQuery = Query.Factory.newInstance();
 // The query will contain three result objects (these objects represent the fields
 // that are contained in the query result). Create an array of QueryObject objects to
 // store the result objects. You can use Detail, Dimension, or Measure objects as result objects.
 QueryObject[] boQueryResultObjects = new QueryObject[3];
 boQueryResultObjects[0] = QueryObject.Factory.newInstance();
 boQueryResultObjects[1] = QueryObject.Factory.newInstance();
 boQueryResultObjects[2] = QueryObject.Factory.newInstance();
 boQueryResultObjects[0].setKey((String)detailKeys.get(1));
 boQueryResultObjects[1].setKey((String)dimensionKeys.get(0));
 boQueryResultObjects[2].setKey((String)measureKeys.get(0));
 boQuery.setQueryResultArray(boQueryResultObjects);
 // Add the query to the QuerySpecification
 boQuerySpec.setQueryBase(boQuery);
 

Since:
12.0
See Also:
SamplingMode, QuerySpecification

Nested Class Summary
static class Sampling.Factory
          A class with methods for creating instances of the Sampling type.
 
Field Summary
static org.apache.xmlbeans.SchemaType type
          Internal Use Only.
 
Method Summary
 boolean getFreeRandomSupported()
           Returns true, if the DataSource object supports sampling of type Free Random.
 boolean getRepeatableRandomSupported()
           Returns true, if the DataSource object supports sampling of type Repeatable Random.
 void setFreeRandomSupported(boolean freeRandomSupported)
          Internal Use Only.
 void setRepeatableRandomSupported(boolean repeatableRandomSupported)
          Internal Use Only.
 org.apache.xmlbeans.XmlBoolean xgetFreeRandomSupported()
          Internal Use Only.
 org.apache.xmlbeans.XmlBoolean xgetRepeatableRandomSupported()
          Internal Use Only.
 void xsetFreeRandomSupported(org.apache.xmlbeans.XmlBoolean freeRandomSupported)
          Internal Use Only.
 void xsetRepeatableRandomSupported(org.apache.xmlbeans.XmlBoolean repeatableRandomSupported)
          Internal Use Only.
 

Field Detail

type

static final org.apache.xmlbeans.SchemaType type

Internal Use Only.

Method Detail

getFreeRandomSupported

boolean getFreeRandomSupported()

Returns true, if the DataSource object supports sampling of type Free Random.

Returns:
true, if the DataSource object supports sampling of type Free Random, otherwise false

xgetFreeRandomSupported

org.apache.xmlbeans.XmlBoolean xgetFreeRandomSupported()

Internal Use Only.


setFreeRandomSupported

void setFreeRandomSupported(boolean freeRandomSupported)

Internal Use Only.


xsetFreeRandomSupported

void xsetFreeRandomSupported(org.apache.xmlbeans.XmlBoolean freeRandomSupported)

Internal Use Only.


getRepeatableRandomSupported

boolean getRepeatableRandomSupported()

Returns true, if the DataSource object supports sampling of type Repeatable Random.

Returns:
true, if the DataSource object supports sampling of type Repeatable Random, otherwise false

xgetRepeatableRandomSupported

org.apache.xmlbeans.XmlBoolean xgetRepeatableRandomSupported()

Internal Use Only.


setRepeatableRandomSupported

void setRepeatableRandomSupported(boolean repeatableRandomSupported)

Internal Use Only.


xsetRepeatableRandomSupported

void xsetRepeatableRandomSupported(org.apache.xmlbeans.XmlBoolean repeatableRandomSupported)

Internal Use Only.