|
|||||||||
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 ConditionPrompt
value
- the value
java.lang.UnsupportedOperationException
- when default value is already set.Prompt.getDefaultValues()
void addDefault(ValueFromLov value)
RankConditionPrompt
.
addDefault
in interface ConditionPrompt
value
- the value which is an object of the class ValueFromLov
java.lang.UnsupportedOperationException
void hasLOV(boolean b)
RankConditionPrompt
.
hasLOV
in interface ConditionPrompt
b
- when true
, a list of values will be presented to the
user when prompted to enter a value for prompt.
java.lang.UnsupportedOperationException
void setConstrained(boolean b)
RankConditionPrompt
.
setConstrained
in interface ConditionPrompt
b
- when true
, a user can type a value for this prompt.
java.lang.UnsupportedOperationException
void setMonoValue(boolean b)
RankConditionPrompt
.
setMonoValue
in interface ConditionPrompt
b
- when true
, multiple values are not allowed.
java.lang.UnsupportedOperationException
void setOptional(boolean isOptional)
RankConditionPrompt
.
setOptional
in interface ConditionPrompt
isOptional
- true
or false
java.lang.UnsupportedOperationException
ConditionPrompt.isOptional()
java.lang.String getDefault(int index)
getDefault
in interface ConditionPrompt
index
- the index of the element to return (0 based)
java.lang.IndexOutOfBoundsException
- when index > 0
Prompt.getDefaultValues()
ValueFromLov getDefaultValueFromLov(int index)
RankConditionPrompt
.
getDefaultValueFromLov
in interface ConditionPrompt
index
- the index of the element to return (0 based)
ValueFromLov
java.lang.UnsupportedOperationException
void setDefaultValue(int size)
size
- default prompt
java.lang.IllegalArgumentException
int getDefaultValue()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |