com.businessobjects.query
Interface Prompt

All Superinterfaces:
Operand

public interface Prompt
extends Operand

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);
 

See Also:
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

type

static final org.apache.xmlbeans.SchemaType type

Internal Use Only.

Method Detail

getQuestion

java.lang.String getQuestion()

Gets the question that is displayed to the user for this prompt.

Returns:
The question that is displayed to the user for this prompt.

xgetQuestion

org.apache.xmlbeans.XmlString xgetQuestion()

Internal Use Only.


setQuestion

void setQuestion(java.lang.String question)

Sets the question that is displayed to the user for this prompt.

Parameters:
question - The question that is displayed to the user for this prompt.

xsetQuestion

void xsetQuestion(org.apache.xmlbeans.XmlString question)

Internal Use Only.


getDefaultValues

Values getDefaultValues()

Gets the values that are used by default for this prompt.

Returns:
The values that are used by default for this prompt as a Values instance

isSetDefaultValues

boolean isSetDefaultValues()
Checks if the DefaultValues element has been set.

Returns:
true if the default values is set, otherwise false

setDefaultValues

void setDefaultValues(Values defaultValues)

Sets the values that are used by default for this prompt.

Parameters:
defaultValues - the values that are used by default for this prompt as a Values instance

addNewDefaultValues

Values addNewDefaultValues()
Appends and returns a new empty "DefaultValues" element

Returns:
a new empty "DefaultValues" element

unsetDefaultValues

void unsetDefaultValues()
Deletes or unsets the DefaultValues element.


getKeepLastValues

boolean getKeepLastValues()

Returns true if the last values entered for the prompt are kept, otherwise false.

Returns:
true if the last values entered for the prompt are kept, otherwise false

xgetKeepLastValues

org.apache.xmlbeans.XmlBoolean xgetKeepLastValues()

Internal Use Only.


setKeepLastValues

void setKeepLastValues(boolean keepLastValues)

Sets whether the last values entered for the prompt are kept.

Parameters:
keepLastValues - true to keep the last values entered for the prompt, otherwise false

xsetKeepLastValues

void xsetKeepLastValues(org.apache.xmlbeans.XmlBoolean keepLastValues)

Internal Use Only.


getConstrained

boolean getConstrained()

Returns true if the user must select a value from a list of values, otherwise false.

Returns:
true if the user must select a value from a list of values, otherwise false

xgetConstrained

org.apache.xmlbeans.XmlBoolean xgetConstrained()

Internal Use Only.


setConstrained

void setConstrained(boolean constrained)

Sets whether the user must select a value from a list of values.

Parameters:
constrained - Set to true if the user must select a value from a list of values, otherwise false

xsetConstrained

void xsetConstrained(org.apache.xmlbeans.XmlBoolean constrained)

Internal Use Only.


getHasLov

boolean getHasLov()

Returns true if the prompt has a list of values from which the user can select, otherwise false.

Returns:
true if the prompt has a list of values from which the user can select, otherwise false

xgetHasLov

org.apache.xmlbeans.XmlBoolean xgetHasLov()

Internal Use Only.


setHasLov

void setHasLov(boolean hasLov)

Sets whether the prompt has a list of values from which the user can select.

Parameters:
hasLov - Set to true if the prompt has a list of values from which the user can select, otherwise false

xsetHasLov

void xsetHasLov(org.apache.xmlbeans.XmlBoolean hasLov)

Internal Use Only.


getOrder

int getOrder()

Gets the order in which this prompt is displayed compared to other prompts in the query.

Returns:
the order in which this prompt is displayed compared to other prompts in the query

xgetOrder

org.apache.xmlbeans.XmlInt xgetOrder()

Internal Use Only.


setOrder

void setOrder(int order)

Sets the order in which this prompt is displayed compared to other prompts in the query.

Parameters:
order - An int that represents the order in which this prompt is displayed

xsetOrder

void xsetOrder(org.apache.xmlbeans.XmlInt order)

Internal Use Only.


getOptional

boolean getOptional()

Returns true if this Prompt is an optional one.

Returns:
"true", if this Prompt is an optional one, otherwise false

xgetOptional

org.apache.xmlbeans.XmlBoolean xgetOptional()

Internal Use Only.


isSetOptional

boolean isSetOptional()
Checks if the Optional attribute has been set.

Returns:
true if the prompt is set as an optional, otherwise false

setOptional

void setOptional(boolean optional)

Sets the prompt to be an optional one.

Parameters:
"true", - if this Prompt to be an optional one, otherwise falsed

xsetOptional

void xsetOptional(org.apache.xmlbeans.XmlBoolean optional)

Internal Use Only.


unsetOptional

void unsetOptional()
Deletes or unsets the Optional attribute.