GemFire 5.7.1

com.gemstone.gemfire.cache.query
Class IndexType

java.lang.Object
  extended by com.gemstone.gemfire.cache.query.IndexType

public class IndexType
extends Object

Enumerated type for types of indexes

Since:
4.0

Field Summary
static IndexType FUNCTIONAL
          The index type of a functional index.
static IndexType PRIMARY_KEY
          The index type of a primary key index.
 
Method Summary
 String toString()
          Return the index type as a String
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

FUNCTIONAL

public static final IndexType FUNCTIONAL
The index type of a functional index. A functional index is used for the comparison of some function of a region value with a constant, using a relational operator. The indexedExpression yields a value that is a Comparable. The "constant" that it is to be compared to is any expression that is not dependent on a value in the region. A simple example is an index on the indexedExpression "age". This would be used for a query that has the where clause "age < 55".

The indexedExpression for a functional index can be any Comparable or any of the following primitive types:
long int short byte char float double

See Also:
QueryService.createIndex(String, IndexType, String, String)

PRIMARY_KEY

public static final IndexType PRIMARY_KEY
The index type of a primary key index. A primary key index uses the keys in the region itself. By creating a primary key index, you make the query service aware of the relationship between the values in the region and the keys in the region and enable the relationship to be used to optimize the execution of queries. For example, if the values in a region are employee objects and the keys in the region is the attribute empId on those employees, then you can create a primary key index on that region with the indexedExpression "empId".

The type of the indexedExpression for a primary key index can be any object type. Just as in a Region, the lookup is based on the implementation of the equals and hashCode methods in the object.

See Also:
QueryService.createIndex(String, IndexType, String, String)
Method Detail

toString

public String toString()
Return the index type as a String

Overrides:
toString in class Object
Returns:
the String representation of this IndexType

GemFire 5.7.1

Copyright © 2002-2008 GemStone Systems, Inc. All Rights Reserved.