Package de.bwaldvogel.mongo.backend
Class AbstractUniqueIndex<P>
java.lang.Object
de.bwaldvogel.mongo.backend.Index<P>
de.bwaldvogel.mongo.backend.AbstractUniqueIndex<P>
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractUniqueIndex(String name, List<IndexKey> keys, boolean sparse) -
Method Summary
Modifier and TypeMethodDescriptionvoidadd(Document document, P position, MongoCollection<P> collection) booleanvoidcheckAdd(Document document, MongoCollection<P> collection) voidcheckUpdate(Document oldDocument, Document newDocument, MongoCollection<P> collection) protected booleancontainsKey(KeyValue keyValue) voiddrop()protected abstract PgetPosition(KeyValue keyValue) getPosition(Document document) getPositions(Document query) protected abstract booleanputKeyPosition(KeyValue keyValue, P position) protected abstract PremoveDocument(KeyValue keyValue) voidupdateInPlace(Document oldDocument, Document newDocument, P position, MongoCollection<P> collection) Methods inherited from class de.bwaldvogel.mongo.backend.Index
getCount, getDataSize, getKeys, getKeyValues, getName, hasSameOptions, isCompoundIndex, isEmpty, isSparse, keys, keySet, nullAwareEqualsKeys, toString
-
Constructor Details
-
AbstractUniqueIndex
-
-
Method Details
-
removeDocument
-
containsKey
-
putKeyPosition
-
getIterable
-
getPosition
-
remove
-
getPosition
- Specified by:
getPositionin classIndex<P>
-
checkAdd
-
add
-
checkUpdate
- Specified by:
checkUpdatein classIndex<P>
-
updateInPlace
public void updateInPlace(Document oldDocument, Document newDocument, P position, MongoCollection<P> collection) throws KeyConstraintError - Specified by:
updateInPlacein classIndex<P>- Throws:
KeyConstraintError
-
canHandle
-
getPositions
- Specified by:
getPositionsin classIndex<P>
-
drop
public void drop()
-