org.springframework.data.mongodb.core.index
Class Index
java.lang.Object
org.springframework.data.mongodb.core.index.Index
- All Implemented Interfaces:
- IndexDefinition
public class Index
- extends Object
- implements IndexDefinition
Index
public Index()
Index
public Index(String key,
Sort.Direction direction)
Index
@Deprecated
public Index(String key,
Order order)
- Deprecated. use
#Index(String, Direction) instead.
- Creates a new
Indexed on the given key and Order.
- Parameters:
key - must not be null or empty.order - must not be null.
on
@Deprecated
public Index on(String key,
Order order)
- Deprecated. use
#on(String, Direction) instead.
- Adds the given field to the index.
- Parameters:
key - must not be null or empty.order - must not be null.
- Returns:
on
public Index on(String key,
Sort.Direction direction)
named
public Index named(String name)
unique
public Index unique()
sparse
public Index sparse()
unique
public Index unique(Index.Duplicates duplicates)
getIndexKeys
public com.mongodb.DBObject getIndexKeys()
- Specified by:
getIndexKeys in interface IndexDefinition
getIndexOptions
public com.mongodb.DBObject getIndexOptions()
- Specified by:
getIndexOptions in interface IndexDefinition
toString
public String toString()
- Overrides:
toString in class Object
Copyright © 2011-2013-2014 Pivotal. All Rights Reserved.