|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface RankConditionPrompt
Warning: This interface is no longer functional from the SAP BusinessObjects 4.0 release onwards.
TheRankConditionPrompt interface defines a prompt for a rank condition.
Example:Define a prompt for a rank condition
String sQuery = "SELECT SI_CUID, SI_NAME FROM"
+ " CI_APPOBJECTS WHERE SI_KIND ='"+ CeKind.UNIVERSE +"'";
IInfoObjects universes = (IInfoObjects) iStore.query(sQuery);
IInfoObject ceInfoobject = (IInfoObject)universes.get(31);
String universeId =((IUniverse)ceInfoobject).buildUniverseIdString();
DocumentInstance doc = repEng.newDocument(universeId);
ReportContainer report = doc.createReport("Report1");
DataProviders dps = doc.getDataProviders();
// Retrieve the 1st data provider
DataProvider dp = dps.getItem(0);
// Retrieve the universe objects
DataSource ds = dp.getDataSource();
DataSourceObject country = ds.getClasses().getChildByName("Country");
DataSourceObject revenue = ds.getClasses().getChildByName ("Revenue");
Query q = dp.getQuery();
// Add result objects to the query
q.addResultObject(country);
q.addResultObject(revenue);
ConditionContainer cond = q.createCondition(LogicalOperator.AND);
RankCondition rank = cond.createRankCondition(Podium.TOP,2,country,revenue);
String question = "How many rows you want to retrieve ?";
RankConditionPrompt rankPrompt = rank.getRankConditionPrompt();
rank.setPromptForSize(question);
// Run the query and fetch the data
dp.runQuery();
//The RankConditionPrompt can be verified by calling DocumentInstance.getMustFillPrompts().
//If the query contains prompt that has to be filled,then this method returns true.
boolean bool = doc.getMustFillPrompts();
out.print(bool);
| Method Summary | |
|---|---|
void |
addDefault(java.lang.String value)
Adds a default prompt size value. |
void |
addDefault(ValueFromLov value)
Illegal call on a RankConditionPrompt. |
java.lang.String |
getDefault(int index)
Gets default prompt size value. |
int |
getDefaultValue()
Returns the default value of prompt |
ValueFromLov |
getDefaultValueFromLov(int index)
Illegal call on a RankConditionPrompt. |
void |
hasLOV(boolean b)
Illegal call on a RankConditionPrompt. |
void |
setConstrained(boolean b)
Illegal call on a RankConditionPrompt. |
void |
setDefaultValue(int size)
Set the default value. |
void |
setMonoValue(boolean b)
Illegal call on a RankConditionPrompt. |
void |
setOptional(boolean isOptional)
Illegal call on a RankConditionPrompt. |
| Methods inherited from interface com.businessobjects.rebean.wi.ConditionPrompt |
|---|
clearDefaultValues, getDefaultCount, getInputFormat, getKeepValues, getQuestion, getType, hasLOV, isConstrained, isMonoValue, isOptional, setKeepValues, setQuestion |
| Method Detail |
|---|
void addDefault(java.lang.String value)
addDefault in interface ConditionPromptvalue - the value
java.lang.UnsupportedOperationException - when default value is already set.Prompt.getDefaultValues()void addDefault(ValueFromLov value)
RankConditionPrompt.
addDefault in interface ConditionPromptvalue - the value which is an object of the class ValueFromLov
java.lang.UnsupportedOperationExceptionvoid hasLOV(boolean b)
RankConditionPrompt.
hasLOV in interface ConditionPromptb - when true, a list of values will be presented to the
user when prompted to enter a value for prompt.
java.lang.UnsupportedOperationExceptionvoid setConstrained(boolean b)
RankConditionPrompt.
setConstrained in interface ConditionPromptb - when true, a user can type a value for this prompt.
java.lang.UnsupportedOperationExceptionvoid setMonoValue(boolean b)
RankConditionPrompt.
setMonoValue in interface ConditionPromptb - when true, multiple values are not allowed.
java.lang.UnsupportedOperationExceptionvoid setOptional(boolean isOptional)
RankConditionPrompt.
setOptional in interface ConditionPromptisOptional - true or false
java.lang.UnsupportedOperationExceptionConditionPrompt.isOptional()java.lang.String getDefault(int index)
getDefault in interface ConditionPromptindex - the index of the element to return (0 based)
java.lang.IndexOutOfBoundsException - when index > 0Prompt.getDefaultValues()ValueFromLov getDefaultValueFromLov(int index)
RankConditionPrompt.
getDefaultValueFromLov in interface ConditionPromptindex - the index of the element to return (0 based)
ValueFromLov
java.lang.UnsupportedOperationExceptionvoid setDefaultValue(int size)
size - default prompt
java.lang.IllegalArgumentExceptionint getDefaultValue()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||