|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.businessobjects.rebean.wi.SamplingMode
public final class SamplingMode
Warning: This class is no longer functional from the SAP BusinessObjects 4.0 release onwards.
TheSamplingMode
class defines all the methods used by data base sampling
Example:Applying database sampling to a query.
String universeId =((IUniverse)ceInfoobject).buildUniverseIdString();
DocumentInstance doc = repEng.newDocument(universeId);
ReportContainer report = doc.createReport("Report1");
DataProviders dps = doc.getDataProviders();
// Retrieve the 1st data provider
SQLDataProvider dp = (SQLDataProvider)dps.getItem(0);
dp.setSamplingMode(SamplingMode.REPEATABLE_RANDOM);
dp.setSamplingSize(10);
// Retrieve the universe objects
DataSource ds = dp.getDataSource();
DataSourceObject country = ds.getClasses().getChildByName("Country");
DataSourceObject service = ds.getClasses().getChildByName("Service");
Query q = dp.getQuery();
// Add result objects to the query
q.addResultObject(country);
q.addResultObject(service);
// Run the query and fetch the data
dp.runQuery();
SQLDataProvider.setSamplingMode(SamplingMode)
.
Field Summary | |
---|---|
static int |
_FREE_RANDOM
int value of FREE_RANDOM . |
static int |
_NONE
int value of NONE . |
static int |
_REPEATABLE_RANDOM
int value of REPEATABLE_RANDOM . |
static SamplingMode |
FREE_RANDOM
Free random mode managed by DataBase. |
static SamplingMode |
NONE
No database sampling. |
static SamplingMode |
REPEATABLE_RANDOM
Repeatable random mode managed by DataBase. |
Method Summary | |
---|---|
static SamplingMode |
fromInt(int value)
Returns a SamplingMode instance corresponding to
value , or null when value
does not correspond to any SamplingMode |
java.lang.String |
toString()
Return a String representation of this max rows fetch
mode (for debug purposes). |
int |
value()
Returns the int value of this fetch mode. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int _NONE
int
value of NONE
.
public static final int _FREE_RANDOM
int
value of FREE_RANDOM
.
public static final int _REPEATABLE_RANDOM
int
value of REPEATABLE_RANDOM
.
public static final SamplingMode NONE
public static final SamplingMode FREE_RANDOM
public static final SamplingMode REPEATABLE_RANDOM
Method Detail |
---|
public static SamplingMode fromInt(int value)
SamplingMode
instance corresponding to
value
, or null
when value
does not correspond to any SamplingMode
value
-
SamplingMode
instancepublic int value()
int
value of this fetch mode.
int
value of this fetch mode.public java.lang.String toString()
String
representation of this max rows fetch
mode (for debug purposes).
toString
in class java.lang.Object
String
representation of this max rows fetch
mode (for debug purposes).
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |