Oracle™ Business Intelligence Beans Java API Reference
Release 10
g (9.0.4)
Part number B12159_01


oracle.dss.bicontext
Class BISearchResultsComparator

java.lang.Object
  |
  +--oracle.dss.bicontext.BISearchResultsComparator
All Implemented Interfaces:
BIComparator, java.util.Comparator, java.io.Serializable

public class BISearchResultsComparator
extends java.lang.Object
implements BIComparator

Implementation of BIComparator interface. This class is used when comparting (sorting) BISearchResult objects.

See Also:
Serialized Form

Constructor Summary
BISearchResultsComparator(java.lang.String[] keys, boolean sepFolders)
          Constructor
BISearchResultsComparator(java.lang.String[] keys, boolean[] keyOrderings, boolean sepFolders)
          Constructor
BISearchResultsComparator(java.lang.String[] keys, boolean keyOrderings, boolean sepFolders)
          Constructor

 

Method Summary
 int compare(java.lang.Object o1, java.lang.Object o2)
          Compares two instances of BISearchResult based on their attributes and sorting order.
 ErrorHandler getErrorHandler()
          Returns ErrorHandler.
 java.util.Locale getLocale()
          Returns Locale
 void setErrorHandler(ErrorHandler eh)
          Sets ErrorHandler.
 void setKeysAscendingOrdering(boolean ordering)
          Sets ordering on sorting keys.
 void setKeysAscendingOrdering(boolean[] ordering)
          Sets ordering on sorting keys.
 void setLocale(java.util.Locale l)
          Sets Locale
 void setSeparatedFoldersOnSort(boolean sepFolders)
          Indicates whether folders should be clustered during sorting.
 void setSortingOptions(java.lang.String[] keys)
          Sets keys (attributes) on which to base object comparisons.
 void setSortingOptions(java.lang.String[] keys, boolean ascendingOrder)
          Sets keys (attributes) on which to base object comparisons.
 void setSortingOptions(java.lang.String[] keys, boolean[] orderKeys)
          Sets keys (attributes) on which to base object comparisons.
 void setSortKeys(java.lang.String[] keys)
          Sets sorting keys to be used for comparison of objects.

 

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

 

Methods inherited from interface java.util.Comparator
equals

 

Constructor Detail

BISearchResultsComparator

public BISearchResultsComparator(java.lang.String[] keys,
                                 boolean sepFolders)
Constructor
Parameters:
keys - an array of String objects that represent sorting keys. Comparison of two object will be performed based on these keys.
sepFolders - true if folders should be separated (clustered) in the returned results false if not. see setSortingOptions methods

BISearchResultsComparator

public BISearchResultsComparator(java.lang.String[] keys,
                                 boolean keyOrderings,
                                 boolean sepFolders)
Constructor
Parameters:
keys - an array of String objects that represent sorting keys. Comparison of two object will be performed based on these keys.
keyOrderings - true if desired comparison order is ascending fasle if descending.
sepFolders - true if folders should be separated (clustered) in the returned results false if not. see setSortingOptions methods

BISearchResultsComparator

public BISearchResultsComparator(java.lang.String[] keys,
                                 boolean[] keyOrderings,
                                 boolean sepFolders)
Constructor
Parameters:
keys - an array of String objects that represent sorting keys. Comparison of two object will be performed based on these keys.
keyOrderings - an array of orderings (true if ascending and fasle if descending) for each key in keyOrderings. The number of elements in this array should match the number of elements in keyOrderings array.
sepFolders - true if folders should be separated (clustered) in the returned results false if not. see setSortingOptions methods
Method Detail

setSortingOptions

public void setSortingOptions(java.lang.String[] keys)
Sets keys (attributes) on which to base object comparisons.
Parameters:
keys - an array of String objects that represent sorting keys. Comparison of two object will be performed based on these keys.

setSortingOptions

public void setSortingOptions(java.lang.String[] keys,
                              boolean ascendingOrder)
Sets keys (attributes) on which to base object comparisons.
Parameters:
keys - an array of String objects that represent sorting keys. Comparison of two object will be performed based on these keys.
keyOrderings - true if desired comparison order is ascending fasle if descending.

setSortingOptions

public void setSortingOptions(java.lang.String[] keys,
                              boolean[] orderKeys)
Sets keys (attributes) on which to base object comparisons.
Parameters:
keys - an array of String objects that represent sorting keys. Comparison of two object will be performed based on these keys.
orderKeys - an array of orderings (true if ascending and fasle if descending) for each key in keyOrderings. The number of elements in this array should match the number of elements in keyOrderings array.

compare

public int compare(java.lang.Object o1,
                   java.lang.Object o2)
Compares two instances of BISearchResult based on their attributes and sorting order.
Specified by:
compare in interface java.util.Comparator
Parameters:
o1 - the first object to compare
o2 - the second object to compare
Returns:
-1 if o1 precedes o2 0 if the order doesn't change 1 if o1 follows o2 This implementation of comparison has the following rules: If the folderOn option is turned on, folders are grouped together separately from the rest of the objects. They come first if the first sorting order key is true (ascending) or last if false (descending). Null attribute values come after non-null values in ascending order. Ascending order is assumed for all missing sorting order keys.

setSortKeys

public void setSortKeys(java.lang.String[] keys)
Sets sorting keys to be used for comparison of objects.
Parameters:
keys - an array of String objects that represent sorting keys. Comparison of two object will be performed based on these keys (attributes).

setKeysAscendingOrdering

public void setKeysAscendingOrdering(boolean ordering)
Sets ordering on sorting keys.
Parameters:
ordering - true if desired comparison order is ascending fasle if descending.

setKeysAscendingOrdering

public void setKeysAscendingOrdering(boolean[] ordering)
Sets ordering on sorting keys.
Parameters:
ordering - an array of orderings (true if ascending and fasle if descending) for each key in keyOrderings. The number of elements in this array should match the number of elements in keyOrderings array.

setSeparatedFoldersOnSort

public void setSeparatedFoldersOnSort(boolean sepFolders)
Indicates whether folders should be clustered during sorting.
Parameters:
sepFolders - true if folders should be separated, false otherwise.

setLocale

public void setLocale(java.util.Locale l)
Sets Locale
Specified by:
setLocale in interface BIComparator
Parameters:
l - Locale object according to which comparisons will be performed

getLocale

public java.util.Locale getLocale()
Returns Locale
Specified by:
getLocale in interface BIComparator
Returns:
Locale object according to which comparisons are performed

setErrorHandler

public void setErrorHandler(ErrorHandler eh)
Sets ErrorHandler.
Specified by:
setErrorHandler in interface BIComparator
Parameters:
eh - ErrorHandler object

getErrorHandler

public ErrorHandler getErrorHandler()
Returns ErrorHandler.
Specified by:
getErrorHandler in interface BIComparator
Returns:
ErrorHandler object

Oracle™ Business Intelligence Beans Java API Reference
Release 10
g (9.0.4)
Part number B12159_01


Copyright © 2003, Oracle. All Rights Reserved.