public abstract class QueryDescriptor extends Object
Modifier and Type | Class and Description |
---|---|
static class |
QueryDescriptor.QueryMode
Identifies the search mode for the saved search.
|
Modifier and Type | Field and Description |
---|---|
static String |
UIHINT_AUTO_EXECUTE
Whether the saved search related to this QueryDescriptor should execute the query when it is selected on the search panel.
|
static String |
UIHINT_DEFAULT
Whether the saved search should be loaded by default when the user first visits the search panel during a session.
|
static String |
UIHINT_IMMUTABLE
Whether the QueryDescriptor object can be updated.
|
static String |
UIHINT_MODE
The mode used (QueryMode.BASIC|QueryMode.ADVANCED)
|
static String |
UIHINT_NAME
The display name to use for the saved search.
|
static String |
UIHINT_RESULTS_COMPONENT_ID
The id of the results component whose layout needs to be persisted.
|
static String |
UIHINT_SAVE_RESULTS_LAYOUT
Whether the saved search related to this QueryDescriptor should persist the layout of the results component (to a persistent store).
|
static String |
UIHINT_SHOW_IN_LIST
Whether the saved search related to this QueryDescriptor should appear in the "Saved Searches" choice list in the main search panel.
|
Constructor and Description |
---|
QueryDescriptor() |
Modifier and Type | Method and Description |
---|---|
abstract void |
addCriterion(String name)
Adds a criterion to the current QueryDescriptor.
|
abstract void |
changeMode(QueryDescriptor.QueryMode mode)
Called when the QueryMode changes.
|
org.apache.myfaces.trinidad.change.ComponentChangeFilter |
getComponentChangeFilter(javax.faces.component.UIComponent query)
Returns the ComponentChangeFilter used to filter component changes triggered by Change Manager
|
abstract ConjunctionCriterion |
getConjunctionCriterion()
Returns the ConjunctionCriterion object associated with the QueryDescriptor.
|
abstract AttributeCriterion |
getCurrentCriterion()
Gets the Criterion to use as the default or the current criterion.
|
abstract String |
getName()
Returns the name of the QueryDescriptor.
|
abstract Map<String,Object> |
getUIHints()
Return a Map of UI hints to values, for this QueryDescriptor.
|
void |
removeCriteria(List<Criterion> criteria)
Removes a list of AttributeCriterion objects
|
abstract void |
removeCriterion(Criterion object)
Removes a criterion/item from the QueryDescriptor.
|
abstract void |
setCurrentCriterion(AttributeCriterion attrCriterion)
Sets the AttributeCriterion object as the current one.
|
public static final String UIHINT_AUTO_EXECUTE
public static final String UIHINT_DEFAULT
public static final String UIHINT_IMMUTABLE
public static final String UIHINT_MODE
public static final String UIHINT_NAME
public static final String UIHINT_RESULTS_COMPONENT_ID
public static final String UIHINT_SAVE_RESULTS_LAYOUT
public static final String UIHINT_SHOW_IN_LIST
public abstract void addCriterion(String name)
This method is invoked during the 'Invoke Application' phase. Subclasses can create a new Criterion based on the AttributeDescriptor (retrieved using the name). The query component registers an internal ActionListener to invoke this method when the user chooses to add an attribute (AttributeDescriptor) as a search field (AttributeCriterion).
name
- of the attribute that is to be added as a Criterion to the search criteriaAttributeCriterion
, AttributeDescriptor
public abstract void changeMode(QueryDescriptor.QueryMode mode)
mode
- the new value for QueryMode.public abstract ConjunctionCriterion getConjunctionCriterion()
ConjunctionCriterion
public abstract String getName()
public abstract Map<String,Object> getUIHints()
public abstract void removeCriterion(Criterion object)
This method is invoked during the 'Invoke Application' phase. The query component registers an internal ActionListener to invoke this method when the user chooses to delete a search field.
object
- the criterion instance that is to be removed. Typically an AttributeCriterion.AttributeCriterion
public abstract AttributeCriterion getCurrentCriterion()
ConjunctionCriterion.getCriterionList()
public abstract void setCurrentCriterion(AttributeCriterion attrCriterion)
attrCriterion
- an AttributeCriterion instance to use as the current one. A null value throws an IllegalArgumentExceptionpublic void removeCriteria(List<Criterion> criteria)
criteria
- - List of AttributeCriterion objects to be removedpublic org.apache.myfaces.trinidad.change.ComponentChangeFilter getComponentChangeFilter(javax.faces.component.UIComponent query)
query
- the query component associated with the model