com.endeca.navigation
Class ERecSortKey

java.lang.Object
  extended by com.endeca.navigation.ERecSortKey

public class ERecSortKey
extends Object

Key with which a record set can or is sorted by.


Field Summary
static int ALPHA_NUM_SORT_KEY
          This is a sort key for a non-Geocode typed property.
static int ASCENDING
          Sort key application in ascending direction.
static int DESCENDING
          Sort key application in descending direction.
static int GEOCODE_SORT_KEY
          This is a sort key for a Geocode typed property.
static int NOT_ACTIVE
          Sort key not applied.
static int RELRANK_SORT_KEY
          This is a sort key for a relevance ranking module
 
Constructor Summary
ERecSortKey(String relRankModule)
          Create a new relevance rank key that specifies a sort using a relevance ranking module.
ERecSortKey(String propertyName, boolean isAscending)
          Create a new alpha-numeric sort key that specifies a sort on a property and the order with which to sort with regard to that property.
ERecSortKey(String propertyName, boolean isAscending, double latitude, double longitude)
          Create a new geocode sort key that specifies a sort on a geocode property, the reference geocode and the order with which to sort with regard to that property.
 
Method Summary
 String getName()
          Get the name of this sort key
 int getOrder()
          Gets the direction the sort key has been applied to record set if the sort key has been applied, is active.
 double getReferenceLatitude()
          Gets the latitude of the point relative to which this sort specifies a distance sort.
 double getReferenceLongitude()
          Gets the longitude of the point relative to which this sort specifies a distance sort.
 int getType()
          Indicates the type of the sort key.
 boolean isActive()
          Deprecated. This method may not be supported in future versions of the MDEX Engine API. The best way to determine whether a sort key is in use is to determine if it is in the sort criteria list returned by Navigation.getActiveSortKeys().
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ALPHA_NUM_SORT_KEY

public static final int ALPHA_NUM_SORT_KEY
This is a sort key for a non-Geocode typed property.

See Also:
Constant Field Values

GEOCODE_SORT_KEY

public static final int GEOCODE_SORT_KEY
This is a sort key for a Geocode typed property.

See Also:
Constant Field Values

RELRANK_SORT_KEY

public static final int RELRANK_SORT_KEY
This is a sort key for a relevance ranking module

See Also:
Constant Field Values

ASCENDING

public static final int ASCENDING
Sort key application in ascending direction.

See Also:
Constant Field Values

DESCENDING

public static final int DESCENDING
Sort key application in descending direction.

See Also:
Constant Field Values

NOT_ACTIVE

public static final int NOT_ACTIVE
Sort key not applied.

See Also:
Constant Field Values
Constructor Detail

ERecSortKey

public ERecSortKey(String propertyName,
                   boolean isAscending)
Create a new alpha-numeric sort key that specifies a sort on a property and the order with which to sort with regard to that property.


ERecSortKey

public ERecSortKey(String propertyName,
                   boolean isAscending,
                   double latitude,
                   double longitude)
Create a new geocode sort key that specifies a sort on a geocode property, the reference geocode and the order with which to sort with regard to that property.


ERecSortKey

public ERecSortKey(String relRankModule)
Create a new relevance rank key that specifies a sort using a relevance ranking module. Only modules that are independent of a text search may be used. Parameters may be given by following the name with '(', then comma separated parameters, then ')'. Relevance rank modules used in sort keys must be prefixed by "Endeca.", so this text will be added by this constructor if it is missing.

Method Detail

getName

public String getName()
Get the name of this sort key

Returns:
name of this sort key or null if it is not specified.

getType

public int getType()
Indicates the type of the sort key.

Returns:
name of the sort key type.

isActive

public boolean isActive()
Deprecated. This method may not be supported in future versions of the MDEX Engine API. The best way to determine whether a sort key is in use is to determine if it is in the sort criteria list returned by Navigation.getActiveSortKeys().

Returns whether the key is active. Returns whether this sort key is being applied.

Returns:
returns true if the key is being applied to records, and false if it is not.

getOrder

public int getOrder()
Gets the direction the sort key has been applied to record set if the sort key has been applied, is active.

Returns:
returns ASCENDING if the sort key hsa been applied in ascending order and DESCENDING if the sort key has been applied in descending order. Returns NOT_ACTIVE if the sort key is not being applied.

getReferenceLatitude

public double getReferenceLatitude()
Gets the latitude of the point relative to which this sort specifies a distance sort.

Returns:
the latitude of the reference point
Throws:
UnsupportedOperationException - If the getType() != GEOCODE_SORT_KEY.

getReferenceLongitude

public double getReferenceLongitude()
Gets the longitude of the point relative to which this sort specifies a distance sort.

Returns:
the longitude of the reference point
Throws:
UnsupportedOperationException - If the getType() != GEOCODE_SORT_KEY.


© 2003, 2012 Oracle and/or its affiliates. All rights reserved.