public abstract class Index<KEY>
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
ascending |
protected java.lang.String |
key |
| Modifier | Constructor and Description |
|---|---|
protected |
Index(java.lang.String key,
boolean ascending) |
| Modifier and Type | Method and Description |
|---|---|
abstract void |
add(org.bson.BSONObject document,
KEY key) |
abstract boolean |
canHandle(org.bson.BSONObject query) |
abstract void |
checkAdd(org.bson.BSONObject document) |
abstract void |
checkUpdate(org.bson.BSONObject oldDocument,
org.bson.BSONObject newDocument) |
abstract long |
getCount() |
abstract long |
getDataSize() |
abstract java.lang.Iterable<KEY> |
getKeys(org.bson.BSONObject query) |
protected java.lang.Object |
getKeyValue(org.bson.BSONObject document) |
java.lang.String |
getName() |
abstract KEY |
remove(org.bson.BSONObject document) |
abstract void |
updateInPlace(org.bson.BSONObject oldDocument,
org.bson.BSONObject newDocument) |
public java.lang.String getName()
protected java.lang.Object getKeyValue(org.bson.BSONObject document)
public abstract void checkAdd(org.bson.BSONObject document)
throws MongoServerException
MongoServerExceptionpublic abstract void add(org.bson.BSONObject document,
KEY key)
throws MongoServerException
MongoServerExceptionpublic abstract KEY remove(org.bson.BSONObject document)
public abstract boolean canHandle(org.bson.BSONObject query)
public abstract java.lang.Iterable<KEY> getKeys(org.bson.BSONObject query)
public abstract long getCount()
public abstract long getDataSize()
public abstract void checkUpdate(org.bson.BSONObject oldDocument,
org.bson.BSONObject newDocument)
throws MongoServerException
MongoServerExceptionpublic abstract void updateInPlace(org.bson.BSONObject oldDocument,
org.bson.BSONObject newDocument)
throws KeyConstraintError
KeyConstraintError