Oracle Fusion Middleware extensions for Applications Core API Reference
11g Release 7 (11.1.7)

E22562-07

oracle.apps.fnd.applcore.globalSearch.ui.commonTree
Class DateRangeTreeItem

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

public class DateRangeTreeItem
extends BaseTreeItem
implements java.io.Serializable

A node in a JSF tree, used in the common filters tree as a date range.

See Also:
Serialized Form

Nested Class Summary
static class DateRangeTreeItem.RangeType
          Type of Date to use in a date range.
 
Constructor Summary
DateRangeTreeItem(java.lang.String displayValue, DateRangeTreeItem.RangeType type)
          Construct this Date Range Tree Item.
 
Method Summary
 boolean equals(java.lang.Object obj)
          
 java.util.Date getDateFrom()
          Get the date from for this custom range.
 java.util.Date getDateTo()
          Get the date to for this custom range.
 SearchFilterItem.FilterType getFilterType()
          What type of Filter type this Tree Item represents.
 java.lang.String getFromValueAsString()
          Get the From value as a String in the format that SES likes - MM/dd/yyyy.
 java.lang.String getToValueAsString()
          Get the To value as a String in the format that SES likes - MM/dd/yyyy.
 DateRangeTreeItem.RangeType getType()
          Get the type of this Range.
 int hashCode()
          
 boolean isCustomRange()
          Does this TreeItem represent a custom range, if so more ui will be needed to render from/to values in the ui, instead of a single selectable string.
 boolean isSelectable()
          Is this node selectedable.
 boolean isSelected()
          Is this node selected.
 boolean isSomeUserData()
          Does this node have some user-data? This hint allows the tree to auto-disclose some nodes with user-modified data.
 void setDateFrom(java.util.Date dateFrom)
          Set the date from for this custom range.
 void setDateTo(java.util.Date dateTo)
          Set the date to for this custom range.
static DateRangeTreeItem toDateRangeTreeItem(java.util.List<BaseTreeItem> commonTreeItems, java.lang.String dateFrom, java.lang.String dateTo, java.util.List<PersistentSearchFilter> psf)
          A factory method to turn a date range (possibly open ended) into one of our Range Types.
 SearchFilterItem toSearchFilterItem()
          Create an appropriate SearchFilterItem for this tree item..
 
Methods inherited from class oracle.apps.fnd.applcore.globalSearch.ui.commonTree.BaseTreeItem
getChildren, getDefaultCommonTreeItems, getDisplayValue, getToolTip, getValue, isBranch
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DateRangeTreeItem

public DateRangeTreeItem(java.lang.String displayValue,
                         DateRangeTreeItem.RangeType type)
Construct this Date Range Tree Item.

Parameters:
displayValue - value to be shown to the user.
type - enumerated type.
Method Detail

getType

public DateRangeTreeItem.RangeType getType()
Get the type of this Range.

Returns:
type.

isCustomRange

public boolean isCustomRange()
Does this TreeItem represent a custom range, if so more ui will be needed to render from/to values in the ui, instead of a single selectable string.

Overrides:
isCustomRange in class BaseTreeItem
Returns:
true if a custom range, false if just a selectable value.

toDateRangeTreeItem

public static DateRangeTreeItem toDateRangeTreeItem(java.util.List<BaseTreeItem> commonTreeItems,
                                                    java.lang.String dateFrom,
                                                    java.lang.String dateTo,
                                                    java.util.List<PersistentSearchFilter> psf)
A factory method to turn a date range (possibly open ended) into one of our Range Types.

Parameters:
commonTreeItems - The Date Range tree items in the tree. One of these will be returned indicating the appropriate selection.
dateFrom - custom date from, possibly null.
dateTo - custom date to, possibly null.
psf - persistent search filters containing storage of which filter was selected by the user.
Returns:
selected DateRangeTreeItem, one of the values from commonTreeItems.

toSearchFilterItem

public SearchFilterItem toSearchFilterItem()
Create an appropriate SearchFilterItem for this tree item..

Overrides:
toSearchFilterItem in class BaseTreeItem
Returns:
appropriate SearchFilterItem.

getFilterType

public SearchFilterItem.FilterType getFilterType()
What type of Filter type this Tree Item represents.

Specified by:
getFilterType in class BaseTreeItem
Returns:
FilterType

getFromValueAsString

public java.lang.String getFromValueAsString()
Get the From value as a String in the format that SES likes - MM/dd/yyyy.

Returns:
from value String, null if an open ended range with no from value.

getToValueAsString

public java.lang.String getToValueAsString()
Get the To value as a String in the format that SES likes - MM/dd/yyyy.

Returns:
to value String.

isSelected

public boolean isSelected()
Is this node selected.

Overrides:
isSelected in class BaseTreeItem
Returns:
true if we are to show selection icon.

isSelectable

public boolean isSelectable()
Is this node selectedable.

Overrides:
isSelectable in class BaseTreeItem
Returns:
true if we are to sselect this node and have something happen.

setDateFrom

public void setDateFrom(java.util.Date dateFrom)
Set the date from for this custom range.

Parameters:
dateFrom - date from.

getDateFrom

public java.util.Date getDateFrom()
Get the date from for this custom range.

Returns:
date from.

setDateTo

public void setDateTo(java.util.Date dateTo)
Set the date to for this custom range.

Parameters:
dateTo - date to.

getDateTo

public java.util.Date getDateTo()
Get the date to for this custom range.

Returns:
date to.

isSomeUserData

public boolean isSomeUserData()
Does this node have some user-data? This hint allows the tree to auto-disclose some nodes with user-modified data.

Overrides:
isSomeUserData in class BaseTreeItem
Returns:
true if there is some user-entered (and hence to-be displayed) data.

hashCode

public int hashCode()

Overrides:
hashCode in class BaseTreeItem

equals

public boolean equals(java.lang.Object obj)

Overrides:
equals in class BaseTreeItem

Oracle Fusion Middleware extensions for Applications Core API Reference
11g Release 7 (11.1.7)

E22562-07

Copyright © 2013 Oracle. All Rights Reserved.