Spring Data Document

org.springframework.data.mongodb.core.index
Class GeospatialIndex

java.lang.Object
  extended by org.springframework.data.mongodb.core.index.GeospatialIndex
All Implemented Interfaces:
IndexDefinition

public class GeospatialIndex
extends Object
implements IndexDefinition

Value object to capture data to create a geo index.

Author:
Jon Brisbin, Oliver Gierke

Constructor Summary
GeospatialIndex(String field)
          Creates a new GeospatialIndex for the given field.
 
Method Summary
 DBObject getIndexKeys()
           
 DBObject getIndexOptions()
           
 GeospatialIndex named(String name)
           
 String toString()
           
 GeospatialIndex withBits(int bits)
           
 GeospatialIndex withMax(int max)
           
 GeospatialIndex withMin(int min)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

GeospatialIndex

public GeospatialIndex(String field)
Creates a new GeospatialIndex for the given field.

Parameters:
field - must not be empty or null.
Method Detail

named

public GeospatialIndex named(String name)

withMin

public GeospatialIndex withMin(int min)

withMax

public GeospatialIndex withMax(int max)

withBits

public GeospatialIndex withBits(int bits)

getIndexKeys

public DBObject getIndexKeys()
Specified by:
getIndexKeys in interface IndexDefinition

getIndexOptions

public DBObject getIndexOptions()
Specified by:
getIndexOptions in interface IndexDefinition

toString

public String toString()
Overrides:
toString in class Object

Spring Data Document

Copyright © 2011. All Rights Reserved.