Oracle Fusion Middleware extensions for Applications Core API Reference
11g Release 1 (11.1.1.6)

E22562-03

oracle.apps.fnd.applcore.globalSearch.ui
Class PersistentSearchFilter

java.lang.Object
  extended by oracle.apps.fnd.applcore.globalSearch.ui.PersistentSearchFilter
All Implemented Interfaces:
java.io.Serializable

public final class PersistentSearchFilter
extends java.lang.Object
implements java.io.Serializable

An immutable simple bean class that encapsulates a search filter consisting of a type, label, value and displayValue. This is very similar to a FilterItem but is designed to be less UI specific (SearchFilterItems are bound to search tiles UI in the results header), and light weight enough to be persisted to the database for saved and recent searches in the form of an XML snippet.

PersistentSearchFilters are created from the search result SearchFilterItems (the search tiles, which are in effect the PK of the search). PersistentSearchFilters are Global Search's addition to ecsf QueryMetaData, and act as a simple, ordered, fast way of showing search filters to the user. They also add metadata that is difficult to derive from ecsf qmd, specifically

  1. last update date filters - These are added to the ecsf qmd as advanced filters of the form: ("LastModifiedDate" "gretaerthanequals" "mm/dd/yy"). This looses the intent of the user, whe specified a filter for "Today's" records, "Last Weeks's" records etc. As the query may be run in the future, the filter date needs to slide forward so this intent needs to be externally stored.
  2. translated facet paths - It is impossible to re-create the translated (user-name aka display Name) facet path of a saved query without running the query (it may require multiple queries to be run along the query path); this is very inefficient and will not work when showing queries in a list.

The PersistentSearchFilter is stored as a compressed xml format (internal and private to Global Search) that is stored in the saved search description (1000 chars).

See Also:
Serialized Form

Constructor Summary
PersistentSearchFilter(SearchFilterItem.FilterType filterType, java.lang.String label, java.lang.String value, java.lang.String displayValue)
          Construct this class.
 
Method Summary
 boolean equals(java.lang.Object object)
           
static PersistentSearchFilter fromXML(org.w3c.dom.Element e)
          Factory method to turn this element into a filter.
static void fromXML(java.lang.String xml, java.util.List<PersistentSearchFilter> searchFilters)
          Factory method to turn a xml snippet into a List of PersistentSearchFilter.
 java.lang.String getDisplayValue()
          Get the display value.
 SearchFilterItem.FilterType getFilterType()
          Get the filter type.
 java.lang.String getLabel()
          Get the Label.
 java.lang.String getValue()
          Get the value.
 int hashCode()
           
 java.lang.String toXML()
          Turn this class into an xml element String.
static java.lang.String toXML(java.util.List<PersistentSearchFilter> searchFilters)
          Factory method to turn a list of filters into an xml snippet String.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PersistentSearchFilter

public PersistentSearchFilter(SearchFilterItem.FilterType filterType,
                              java.lang.String label,
                              java.lang.String value,
                              java.lang.String displayValue)
Construct this class.

Parameters:
filterType - type of filter.
label - label.
value - value.
displayValue - user shown value;
Method Detail

getLabel

public java.lang.String getLabel()
Get the Label.

Returns:
label.

getValue

public java.lang.String getValue()
Get the value.

Returns:
value.

getFilterType

public SearchFilterItem.FilterType getFilterType()
Get the filter type.

Returns:
filter type.

getDisplayValue

public java.lang.String getDisplayValue()
Get the display value.

Returns:
display value.

toXML

public java.lang.String toXML()
Turn this class into an xml element String.

Returns:
xml element String.

fromXML

public static PersistentSearchFilter fromXML(org.w3c.dom.Element e)
Factory method to turn this element into a filter.

Parameters:
e - expected to be a filter element.
Returns:
filter with attributes set.

equals

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

hashCode

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

toXML

public static java.lang.String toXML(java.util.List<PersistentSearchFilter> searchFilters)
Factory method to turn a list of filters into an xml snippet String.

Parameters:
searchFilters - filters to xmlise.
Returns:
xml representation in a String.

fromXML

public static void fromXML(java.lang.String xml,
                           java.util.List<PersistentSearchFilter> searchFilters)
Factory method to turn a xml snippet into a List of PersistentSearchFilter.

Parameters:
xml - non-null xml snippet.
searchFilters - filter list to fill.

Oracle Fusion Middleware extensions for Applications Core API Reference
11g Release 1 (11.1.1.6)

E22562-03

Copyright © 2012 Oracle. All Rights Reserved.