|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface Prompt
A prompt enables you to request further information from the user. For example, if your query returns data for a particular region, and you want the user to specify the region for which to return data, you can use a prompt.
Example: Creating a filter query condition with a prompt.
Note: This example assumes that you have created a QueryObject array called
boQueryResultObjects that contains query result object keys from the Universe.
QuerySpecification boQuerySpec = QuerySpecification.Factory.newInstance();
Query boQuery1 = Query.Factory.newInstance();
QueryCondition boQueryCondition = QueryCondition.Factory.newInstance();
Filter boCondFilter = Filter.Factory.newInstance();
QueryObject boQueryConditionObject = QueryObject.Factory.newInstance();
boQueryConditionObject.setKey((String)dimensionKeys.get(1));
boCondFilter.setFilteredObject(boQueryConditionObject);
boCondFilter.setFilterOperator(FilterOperator.EQUAL);
Values promptDefaultValues = Values.Factory.newInstance();
promptDefaultValues.setFreeValueArray(new String[] {"France"});
Operand[] boConditionPrompt = new Operand[1];
Prompt boPrompt = Prompt.Factory.newInstance();
boConditionPrompt[0] = boPrompt;
boPrompt.setQuestion("Enter a country: ");
boPrompt.setDefaultValues(promptDefaultValues);
boCondFilter.setOperandArray(boConditionPrompt);
ConditionBase[] boConditionBase = new ConditionBase[1];
boConditionBase[0] = boCondFilter;
boQueryCondition.setItemArray(boConditionBase);
boQuery1.setQueryCondition(boQueryCondition);
boQuery1.setQueryResultArray(boQueryResultObjects);
boQuerySpec.setQueryBase(boQuery1);
Filter,
Operand,
Values| Nested Class Summary | |
|---|---|
static class |
Prompt.Factory
A class with methods for creating instances of the Prompt type. |
| Field Summary | |
|---|---|
static org.apache.xmlbeans.SchemaType |
type
Internal Use Only. |
| Method Summary | |
|---|---|
Values |
addNewDefaultValues()
Appends and returns a new empty "DefaultValues" element |
boolean |
getConstrained()
Returns true if the user must select a value from a list of values, otherwise
false. |
Values |
getDefaultValues()
Gets the values that are used by default for this prompt. |
boolean |
getHasLov()
Returns true if the prompt has a list of values from which the user can select, otherwise
false. |
boolean |
getKeepLastValues()
Returns true if the last values entered for the prompt are kept, otherwise
false. |
boolean |
getOptional()
Returns true if this Prompt is an optional one. |
int |
getOrder()
Gets the order in which this prompt is displayed compared to other prompts in the query. |
java.lang.String |
getQuestion()
Gets the question that is displayed to the user for this prompt. |
boolean |
isSetDefaultValues()
Checks if the DefaultValues element has been set. |
boolean |
isSetOptional()
Checks if the Optional attribute has been set. |
void |
setConstrained(boolean constrained)
Sets whether the user must select a value from a list of values. |
void |
setDefaultValues(Values defaultValues)
Sets the values that are used by default for this prompt. |
void |
setHasLov(boolean hasLov)
Sets whether the prompt has a list of values from which the user can select. |
void |
setKeepLastValues(boolean keepLastValues)
Sets whether the last values entered for the prompt are kept. |
void |
setOptional(boolean optional)
Sets the prompt to be an optional one. |
void |
setOrder(int order)
Sets the order in which this prompt is displayed compared to other prompts in the query. |
void |
setQuestion(java.lang.String question)
Sets the question that is displayed to the user for this prompt. |
void |
unsetDefaultValues()
Deletes or unsets the DefaultValues element. |
void |
unsetOptional()
Deletes or unsets the Optional attribute. |
org.apache.xmlbeans.XmlBoolean |
xgetConstrained()
Internal Use Only. |
org.apache.xmlbeans.XmlBoolean |
xgetHasLov()
Internal Use Only. |
org.apache.xmlbeans.XmlBoolean |
xgetKeepLastValues()
Internal Use Only. |
org.apache.xmlbeans.XmlBoolean |
xgetOptional()
Internal Use Only. |
org.apache.xmlbeans.XmlInt |
xgetOrder()
Internal Use Only. |
org.apache.xmlbeans.XmlString |
xgetQuestion()
Internal Use Only. |
void |
xsetConstrained(org.apache.xmlbeans.XmlBoolean constrained)
Internal Use Only. |
void |
xsetHasLov(org.apache.xmlbeans.XmlBoolean hasLov)
Internal Use Only. |
void |
xsetKeepLastValues(org.apache.xmlbeans.XmlBoolean keepLastValues)
Internal Use Only. |
void |
xsetOptional(org.apache.xmlbeans.XmlBoolean optional)
Internal Use Only. |
void |
xsetOrder(org.apache.xmlbeans.XmlInt order)
Internal Use Only. |
void |
xsetQuestion(org.apache.xmlbeans.XmlString question)
Internal Use Only. |
| Field Detail |
|---|
static final org.apache.xmlbeans.SchemaType type
Internal Use Only.
| Method Detail |
|---|
java.lang.String getQuestion()
Gets the question that is displayed to the user for this prompt.
org.apache.xmlbeans.XmlString xgetQuestion()
Internal Use Only.
void setQuestion(java.lang.String question)
Sets the question that is displayed to the user for this prompt.
question - The question that is displayed to the user for this prompt.void xsetQuestion(org.apache.xmlbeans.XmlString question)
Internal Use Only.
Values getDefaultValues()
Gets the values that are used by default for this prompt.
Values instanceboolean isSetDefaultValues()
true if the default values is set, otherwise falsevoid setDefaultValues(Values defaultValues)
Sets the values that are used by default for this prompt.
defaultValues - the values that are used by default for this prompt as a Values instanceValues addNewDefaultValues()
void unsetDefaultValues()
boolean getKeepLastValues()
Returns true if the last values entered for the prompt are kept, otherwise
false.
true if the last values entered for the prompt are kept, otherwise
falseorg.apache.xmlbeans.XmlBoolean xgetKeepLastValues()
Internal Use Only.
void setKeepLastValues(boolean keepLastValues)
Sets whether the last values entered for the prompt are kept.
keepLastValues - true to keep the last values entered for the prompt, otherwise
falsevoid xsetKeepLastValues(org.apache.xmlbeans.XmlBoolean keepLastValues)
Internal Use Only.
boolean getConstrained()
Returns true if the user must select a value from a list of values, otherwise
false.
true if the user must select a value from a list of values, otherwise
falseorg.apache.xmlbeans.XmlBoolean xgetConstrained()
Internal Use Only.
void setConstrained(boolean constrained)
Sets whether the user must select a value from a list of values.
constrained - Set to true if the user must select a value from a list of values, otherwise
falsevoid xsetConstrained(org.apache.xmlbeans.XmlBoolean constrained)
Internal Use Only.
boolean getHasLov()
Returns true if the prompt has a list of values from which the user can select, otherwise
false.
true if the prompt has a list of values from which the user can select, otherwise
falseorg.apache.xmlbeans.XmlBoolean xgetHasLov()
Internal Use Only.
void setHasLov(boolean hasLov)
Sets whether the prompt has a list of values from which the user can select.
hasLov - Set to true if the prompt has a list of values from which the user can select, otherwise
falsevoid xsetHasLov(org.apache.xmlbeans.XmlBoolean hasLov)
Internal Use Only.
int getOrder()
Gets the order in which this prompt is displayed compared to other prompts in the query.
org.apache.xmlbeans.XmlInt xgetOrder()
Internal Use Only.
void setOrder(int order)
Sets the order in which this prompt is displayed compared to other prompts in the query.
order - An int that represents the order in which this prompt is displayedvoid xsetOrder(org.apache.xmlbeans.XmlInt order)
Internal Use Only.
boolean getOptional()
Returns true if this Prompt is an optional one.
"true", if this Prompt is an optional one, otherwise falseorg.apache.xmlbeans.XmlBoolean xgetOptional()
Internal Use Only.
boolean isSetOptional()
true if the prompt is set as an optional, otherwise falsevoid setOptional(boolean optional)
Sets the prompt to be an optional one.
"true", - if this Prompt to be an optional one, otherwise falsedvoid xsetOptional(org.apache.xmlbeans.XmlBoolean optional)
Internal Use Only.
void unsetOptional()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||