public abstract class AbstractUniqueIndex<P> extends Index<P>
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractUniqueIndex(java.util.List<IndexKey> keys) |
| Modifier and Type | Method and Description |
|---|---|
void |
add(Document document,
P position,
MongoCollection<P> collection) |
boolean |
canHandle(Document query) |
void |
checkAdd(Document document,
MongoCollection<P> collection) |
void |
checkUpdate(Document oldDocument,
Document newDocument,
MongoCollection<P> collection) |
protected abstract boolean |
containsKey(java.util.List<java.lang.Object> key) |
protected abstract java.lang.Iterable<java.util.Map.Entry<java.util.List<java.lang.Object>,P>> |
getIterable() |
protected abstract P |
getPosition(java.util.List<java.lang.Object> key) |
java.lang.Iterable<P> |
getPositions(Document query) |
protected abstract boolean |
putKeyPosition(java.util.List<java.lang.Object> key,
P position) |
P |
remove(Document document) |
protected abstract P |
removeDocument(java.util.List<java.lang.Object> key) |
void |
updateInPlace(Document oldDocument,
Document newDocument) |
getCount, getDataSize, getName, isCompoundIndex, keys, keySetprotected AbstractUniqueIndex(java.util.List<IndexKey> keys)
protected abstract P removeDocument(java.util.List<java.lang.Object> key)
protected abstract boolean containsKey(java.util.List<java.lang.Object> key)
protected abstract boolean putKeyPosition(java.util.List<java.lang.Object> key,
P position)
protected abstract java.lang.Iterable<java.util.Map.Entry<java.util.List<java.lang.Object>,P>> getIterable()
protected abstract P getPosition(java.util.List<java.lang.Object> key)
public void checkAdd(Document document, MongoCollection<P> collection)
public void add(Document document, P position, MongoCollection<P> collection)
public void checkUpdate(Document oldDocument, Document newDocument, MongoCollection<P> collection)
checkUpdate in class Index<P>public void updateInPlace(Document oldDocument, Document newDocument) throws KeyConstraintError
updateInPlace in class Index<P>KeyConstraintErrorpublic java.lang.Iterable<P> getPositions(Document query)
getPositions in class Index<P>