Skip navigation links

Oracle© Fusion Middleware Java API Reference for Oracle ADF Faces
11g Release 1 (11.1.1.7.0)
E10684-08


oracle.adf.view.rich.event
Class QueryOperationEvent

java.lang.Object
  extended by java.util.EventObject
      extended by javax.faces.event.FacesEvent
          extended by oracle.adf.view.rich.event.QueryOperationEvent

All Implemented Interfaces:
java.io.Serializable

public class QueryOperationEvent
extends javax.faces.event.FacesEvent

QueryOperationEvent class.

A user can perform various operations on saved searches while interacting with a query component. These actions include creating, deleting, selecting, resetting and updating a saved search. Duplicating a saved search is currently not supported but will be supported in future releases.
The above actions result in a QueryDescriptor object to be created, deleted, updated, reset or retrieved. With the exception of retrieving a QueryDescriptor or its associated TreeModel (which can happen at any phase), all operations on a QueryDescriptor are typically done through calls to the QueryModel API, during the Apply Request Values phase of the JSF lifecycle. For more information on each API and when its called, please refer to the JavaDoc for QueryModel.

In addition to the operations on a QueryDescriptor, this event is queued to be broadcast during the Invoke Application phase of the JSF lifecycle. The payload of the QueryOperationEvent always includes the QueryDescriptor on which the specified operation is being performed in a prior phase.

The list of supported operations for this event are.

     CREATE
     UPDATE
     DELETE
     RESET
     SELECT
     MODE_CHANGE
     CRITERION_UPDATE
 

The scenarios under which this event is queued are listed below.

QueryOperationEvent.Operation User Action Comments
CREATE Create a new saved search based on the current saved search Payload is the newly created QueryDescriptor containing the UIHint selections made by the user.
DELETE Delete a saved search Payload is the QueryDescriptor to be deleted.
MODE_CHANGE Toggle QueryDescriptor's mode Payload is the QueryDescriptor whose mode needs to be toggled
RESET Reset a saved search to its original state Payload is the QueryDescriptor that is to be reset.
SELECT select a different saved search Payload is the QueryDescriptor of the selected saved search
UPDATE Update a saved search. Users are prevented from updating a saved search that is marked as immutable. Payload is the updated QueryDescriptor.
CRITERION_UPDATE The value of the AttributeCriterion is updated i.e., pushed to model. This event and type is raised only for criterion with dependents. Payload is the AttributeCriterion instance.
See Also:
Serialized Form

Nested Class Summary
static class QueryOperationEvent.Operation
          Types of operation supported by a QueryOperationEvent.

 

Field Summary

 

Fields inherited from class java.util.EventObject
source

 

Constructor Summary
QueryOperationEvent(javax.faces.component.UIComponent source, QueryOperationEvent.Operation operation, QueryDescriptor descriptor)
          Constuctor of QueryOperationEvent.
QueryOperationEvent(javax.faces.component.UIComponent source, QueryOperationEvent.Operation operation, QueryDescriptor descriptor, AttributeCriterion criterion)
          Constructor of a QueryOperationEvent, queued when the value of a criterion with dependent criterion, changes.
QueryOperationEvent(javax.faces.component.UIComponent source, QueryOperationEvent.Operation operation, QueryDescriptor descriptor, java.util.Map<java.lang.String,java.lang.Object> updatedHints)
          Constuctor of QueryOperationEvent, when the UI hints for a descriptor changes.

 

Method Summary
 boolean equals(java.lang.Object o)
           
 AttributeCriterion getAttributeCriterion()
          Returns the AttributeCriterion instance associated with the event.
 QueryDescriptor getDescriptor()
          Returns the QueryDescriptor on which the user performed the operation.
 QueryOperationEvent.Operation getOperation()
          Returns the operation associated with the event.
 java.util.Map<java.lang.String,java.lang.Object> getUpdatedHints()
          Returns the updated hints that is to be used on the descriptor that is being updated or the new descriptor that is being created.
 int hashCode()
           
 boolean isAppropriateListener(javax.faces.event.FacesListener listener)
           
 void processListener(javax.faces.event.FacesListener listener)
           
 java.lang.String toString()
           

 

Methods inherited from class javax.faces.event.FacesEvent
getComponent, getPhaseId, queue, setPhaseId

 

Methods inherited from class java.util.EventObject
getSource

 

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

 

Constructor Detail

QueryOperationEvent

public QueryOperationEvent(javax.faces.component.UIComponent source,
                           QueryOperationEvent.Operation operation,
                           QueryDescriptor descriptor)
Constuctor of QueryOperationEvent.
Parameters:
source - UIComponent the component instance for the event.
operation - Operation the operation for the event.
descriptor - QueryDescriptor the descriptor for the event.

QueryOperationEvent

public QueryOperationEvent(javax.faces.component.UIComponent source,
                           QueryOperationEvent.Operation operation,
                           QueryDescriptor descriptor,
                           java.util.Map<java.lang.String,java.lang.Object> updatedHints)
Constuctor of QueryOperationEvent, when the UI hints for a descriptor changes. This can happen, when the user creates a new saved search with the updatedHints specifying the new values for the hints. Or can happen when the user updates the descriptor to use the new hints.
Parameters:
source - UIComponent the component instance for the event.
operation - Operation the operation for the event.
descriptor - QueryDescriptor the descriptor for the event.
updatedHints - the updated UIHints to use for the descriptor that is being updated including the new display name to use for the descriptor.

QueryOperationEvent

public QueryOperationEvent(javax.faces.component.UIComponent source,
                           QueryOperationEvent.Operation operation,
                           QueryDescriptor descriptor,
                           AttributeCriterion criterion)
Constructor of a QueryOperationEvent, queued when the value of a criterion with dependent criterion, changes.
Parameters:
source - UIComponent the component instance for the event.
operation - Operation the operation for the event.
descriptor - QueryDescriptor the descriptor for the event.
criterion - AttributeCriterion the criterion for the event

Method Detail

getAttributeCriterion

public AttributeCriterion getAttributeCriterion()
Returns the AttributeCriterion instance associated with the event. The AttributeCriterion instance will be null for all operation types except "CRITERION_UPDATE".
Returns:
AttributeCriterion of the event.

getDescriptor

public QueryDescriptor getDescriptor()
Returns the QueryDescriptor on which the user performed the operation.
Returns:
QueryDescriptor on which the operation occured

getOperation

public QueryOperationEvent.Operation getOperation()
Returns the operation associated with the event. Possible operations are CREATE, DELETE, UPDATE, RESET and SELECT.
Returns:
Operation of the event.

getUpdatedHints

public java.util.Map<java.lang.String,java.lang.Object> getUpdatedHints()
Returns the updated hints that is to be used on the descriptor that is being updated or the new descriptor that is being created.
Returns:
a Map<String, Object>

processListener

public void processListener(javax.faces.event.FacesListener listener)
Specified by:
processListener in class javax.faces.event.FacesEvent

isAppropriateListener

public boolean isAppropriateListener(javax.faces.event.FacesListener listener)
Specified by:
isAppropriateListener in class javax.faces.event.FacesEvent

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object

toString

public java.lang.String toString()
Overrides:
toString in class java.util.EventObject

Skip navigation links

Oracle© Fusion Middleware Java API Reference for Oracle ADF Faces
11g Release 1 (11.1.1.7.0)
E10684-08


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