public abstract class AbstractUniqueIndex<KEY> extends Index<KEY>
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractUniqueIndex(java.lang.String key,
boolean ascending) |
| Modifier and Type | Method and Description |
|---|---|
void |
add(org.bson.BSONObject document,
KEY key) |
boolean |
canHandle(org.bson.BSONObject query) |
void |
checkAdd(org.bson.BSONObject document) |
void |
checkUpdate(org.bson.BSONObject oldDocument,
org.bson.BSONObject newDocument) |
protected abstract boolean |
containsKeyValue(java.lang.Object keyValue) |
protected abstract java.lang.Iterable<java.util.Map.Entry<java.lang.Object,KEY>> |
getIterable() |
protected abstract KEY |
getKey(java.lang.Object keyValue) |
java.lang.Iterable<KEY> |
getKeys(org.bson.BSONObject query) |
protected abstract void |
putKeyValue(java.lang.Object keyValue,
KEY key) |
KEY |
remove(org.bson.BSONObject document) |
protected abstract KEY |
removeDocument(java.lang.Object keyValue) |
void |
updateInPlace(org.bson.BSONObject oldDocument,
org.bson.BSONObject newDocument) |
getCount, getDataSize, getKeyValue, getNameprotected AbstractUniqueIndex(java.lang.String key,
boolean ascending)
protected abstract KEY removeDocument(java.lang.Object keyValue)
protected abstract boolean containsKeyValue(java.lang.Object keyValue)
protected abstract void putKeyValue(java.lang.Object keyValue,
KEY key)
protected abstract java.lang.Iterable<java.util.Map.Entry<java.lang.Object,KEY>> getIterable()
protected abstract KEY getKey(java.lang.Object keyValue)
public void checkAdd(org.bson.BSONObject document)
throws MongoServerError
checkAdd in class Index<KEY>MongoServerErrorpublic void add(org.bson.BSONObject document,
KEY key)
throws MongoServerError
add in class Index<KEY>MongoServerErrorpublic void checkUpdate(org.bson.BSONObject oldDocument,
org.bson.BSONObject newDocument)
throws MongoServerError
checkUpdate in class Index<KEY>MongoServerErrorpublic void updateInPlace(org.bson.BSONObject oldDocument,
org.bson.BSONObject newDocument)
throws KeyConstraintError
updateInPlace in class Index<KEY>KeyConstraintErrorpublic boolean canHandle(org.bson.BSONObject query)