Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle ADF Faces
11g Release 1 (11.1.1)
E10684-05


oracle.adf.view.rich.model
Class QueryDescriptor

java.lang.Object
  extended by oracle.adf.view.rich.model.QueryDescriptor

Direct Known Subclasses:
FilterableQueryDescriptor

public abstract class QueryDescriptor
extends java.lang.Object

A QueryDescriptor describes a saved search by providing Criterion objects (used to render search fields; by providing an ability to add remove Criterion objects. In addition, it also provides methods to change the definition of a QueryDescriptor, such as its name, UI hints and mode.


Nested Class Summary
static class QueryDescriptor.QueryMode
          Identifies the search mode for the saved search.

 

Field Summary
static java.lang.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 java.lang.String UIHINT_DEFAULT
          Whether the saved search should be loaded by default when the user first visits the search panel during a session.
static java.lang.String UIHINT_IMMUTABLE
          Whether the QueryDescriptor object can be updated.
static java.lang.String UIHINT_MODE
          The mode used (QueryMode.BASIC|QueryMode.ADVANCED)
static java.lang.String UIHINT_NAME
          The display name to use for the saved search.
static java.lang.String UIHINT_RESULTS_COMPONENT_ID
          The id of the results component whose layout needs to be persisted.
static java.lang.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 java.lang.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 Summary
QueryDescriptor()
           

 

Method Summary
abstract  void addCriterion(java.lang.String name)
          Adds a criterion to the current QueryDescriptor.
abstract  void changeMode(QueryDescriptor.QueryMode mode)
          Called when the QueryMode changes.
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  java.lang.String getName()
          Returns the name of the QueryDescriptor.
abstract  java.util.Map<java.lang.String,java.lang.Object> getUIHints()
          Return a Map of UI hints to values, for this QueryDescriptor.
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.

 

Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

 

Field Detail

UIHINT_AUTO_EXECUTE

public static final java.lang.String UIHINT_AUTO_EXECUTE
Whether the saved search related to this QueryDescriptor should execute the query when it is selected on the search panel.
See Also:
Constant Field Values

UIHINT_DEFAULT

public static final java.lang.String UIHINT_DEFAULT
Whether the saved search should be loaded by default when the user first visits the search panel during a session. Setting this automatically unsets any other user-defined default saved search.
See Also:
Constant Field Values

UIHINT_IMMUTABLE

public static final java.lang.String UIHINT_IMMUTABLE
Whether the QueryDescriptor object can be updated. For instance, model defined saved searches (system searches) are immutable, where as user defined searches can be changed.
See Also:
Constant Field Values

UIHINT_MODE

public static final java.lang.String UIHINT_MODE
The mode used (QueryMode.BASIC|QueryMode.ADVANCED)
See Also:
Constant Field Values

UIHINT_NAME

public static final java.lang.String UIHINT_NAME
The display name to use for the saved search.
See Also:
Constant Field Values

UIHINT_RESULTS_COMPONENT_ID

public static final java.lang.String UIHINT_RESULTS_COMPONENT_ID
The id of the results component whose layout needs to be persisted.
See Also:
Constant Field Values

UIHINT_SAVE_RESULTS_LAYOUT

public static final java.lang.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).
See Also:
Constant Field Values

UIHINT_SHOW_IN_LIST

public static final java.lang.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.
See Also:
Constant Field Values

Constructor Detail

QueryDescriptor

public QueryDescriptor()

Method Detail

addCriterion

public abstract void addCriterion(java.lang.String name)
Adds a criterion to the current QueryDescriptor.

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

Parameters:
name - of the attribute that is to be added as a Criterion to the search criteria
See Also:
AttributeCriterion, AttributeDescriptor

changeMode

public abstract void changeMode(QueryDescriptor.QueryMode mode)
Called when the QueryMode changes. This method is invoked during the 'Invoke Application' phase of the JSF lifecyle.
Parameters:
mode - the new value for QueryMode.

getConjunctionCriterion

public abstract ConjunctionCriterion getConjunctionCriterion()
Returns the ConjunctionCriterion object associated with the QueryDescriptor. A ConjunctionCriterion contains one or more Criterion objects (and possibly other ConjunctionCriterion objects) combined using a conjunction operator.
Returns:
the ConjunctionCriterion object
See Also:
ConjunctionCriterion

getName

public abstract java.lang.String getName()
Returns the name of the QueryDescriptor. Each QueryDescriptor has a unique name associated with it. This also is the name of the saved search.
Returns:
the name of QueryDescriptor

getUIHints

public abstract java.util.Map<java.lang.String,java.lang.Object> getUIHints()
Return a Map of UI hints to values, for this QueryDescriptor. Currently, the following hints are supported. UIHINT_AUTO_EXECUTE UIHINT_DEFAULT UIHINT_IMMUTABLE UIHINT_MODE UIHINT_NAME UIHINT_RESULTS_COMPONENT_ID UIHINT_SAVE_RESULTS_LAYOUT UIHINT_SHOW_IN_LIST
Returns:
a Map<String, Object> pairs

removeCriterion

public abstract void removeCriterion(Criterion object)
Removes a criterion/item from the QueryDescriptor.

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.

Parameters:
object - the criterion instance that is to be removed. Typically an AttributeCriterion.
See Also:
AttributeCriterion

getCurrentCriterion

public abstract AttributeCriterion getCurrentCriterion()
Gets the Criterion to use as the default or the current criterion. This is used when performing searches on a single Criterion object rather than a collection as is the case with ConjunctionCriterion.
It is an implementation detail whether a separate instance of Criterion is returned or the one belonging to the List<Criterion> returned by ConjunctionCriterion.getCriterionList(). A separate instance may be desired if the values returned for this AttributeCriterion are meant to be different from when the AttributeCriterion is used as part of a collection (in a ConjunctionCriterion)
Returns:
a valid AttributeCriterion or null.
See Also:
ConjunctionCriterion.getCriterionList()

setCurrentCriterion

public abstract void setCurrentCriterion(AttributeCriterion attrCriterion)
Sets the AttributeCriterion object as the current one. This is used when performing queries against a single Criterion object (as is the case in the quickQuery mode). Values entered (or defaults set) in other Criterion objects may be ignored.
Additionally its an implementation detail whether the argument passed in is used as the current or its copied into a separate instance. A separate instance may be desirable if the values entered by the user for this Criterion alone, should not in any way change the values entered for this Criterion object when used with a ConjunctionCriterion.
Parameters:
attrCriterion - an AttributeCriterion instance to use as the current one. A null value throws an IllegalArgumentException

Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle ADF Faces
11g Release 1 (11.1.1)
E10684-05


Copyright (c) 1998, 2011, Oracle and/or its affiliates. All rights reserved.