public class UniqueIndex extends Index
| Constructor and Description |
|---|
UniqueIndex(String key,
boolean ascending) |
| Modifier and Type | Method and Description |
|---|---|
void |
add(org.bson.BSONObject document,
Integer position) |
boolean |
canHandle(org.bson.BSONObject query) |
void |
checkAdd(org.bson.BSONObject document) |
void |
checkUpdate(org.bson.BSONObject oldDocument,
org.bson.BSONObject newDocument) |
long |
getCount() |
long |
getDataSize() |
protected Object |
getKeyValue(org.bson.BSONObject document) |
String |
getName() |
Iterable<Integer> |
getPositions(org.bson.BSONObject query) |
Integer |
remove(org.bson.BSONObject document) |
void |
updateInPlace(org.bson.BSONObject oldDocument,
org.bson.BSONObject newDocument) |
public UniqueIndex(String key, boolean ascending)
protected Object getKeyValue(org.bson.BSONObject document)
getKeyValue in class Indexpublic void checkAdd(org.bson.BSONObject document)
throws KeyConstraintError
checkAdd in class IndexKeyConstraintErrorpublic void add(org.bson.BSONObject document,
Integer position)
throws KeyConstraintError
add in class IndexKeyConstraintErrorpublic void checkUpdate(org.bson.BSONObject oldDocument,
org.bson.BSONObject newDocument)
throws MongoServerError
checkUpdate in class IndexMongoServerErrorpublic void updateInPlace(org.bson.BSONObject oldDocument,
org.bson.BSONObject newDocument)
throws KeyConstraintError
updateInPlace in class IndexKeyConstraintErrorpublic boolean canHandle(org.bson.BSONObject query)
public Iterable<Integer> getPositions(org.bson.BSONObject query)
getPositions in class Indexpublic long getDataSize()
getDataSize in class IndexCopyright © 2013. All Rights Reserved.