Package de.bwaldvogel.mongo.backend
Class Index<P>
java.lang.Object
de.bwaldvogel.mongo.backend.Index<P>
- Direct Known Subclasses:
AbstractUniqueIndex,EmptyIndex
public abstract class Index<P>
extends java.lang.Object
-
Constructor Summary
-
Method Summary
Modifier and Type Method Description abstract voidadd(Document document, P position, MongoCollection<P> collection)abstract booleancanHandle(Document query)abstract voidcheckAdd(Document document, MongoCollection<P> collection)abstract voidcheckUpdate(Document oldDocument, Document newDocument, MongoCollection<P> collection)abstract voiddrop()abstract longgetCount()abstract longgetDataSize()java.util.List<IndexKey>getKeys()java.util.Set<KeyValue>getKeyValues(Document document)java.lang.StringgetName()abstract PgetPosition(Document document)abstract java.lang.Iterable<P>getPositions(Document query)booleanhasSameOptions(Index<?> other)protected booleanisCompoundIndex()booleanisEmpty()protected booleanisSparse()protected java.util.List<java.lang.String>keys()protected java.util.Set<java.lang.String>keySet()protected booleannullAwareEqualsKeys(Document oldDocument, Document newDocument)abstract Premove(Document document)java.lang.StringtoString()abstract voidupdateInPlace(Document oldDocument, Document newDocument, P position, MongoCollection<P> collection)
-
Constructor Details
-
Method Details
-
isSparse
protected boolean isSparse() -
getKeys
-
hasSameOptions
-
getName
public java.lang.String getName() -
keys
protected java.util.List<java.lang.String> keys() -
keySet
protected java.util.Set<java.lang.String> keySet() -
getKeyValues
-
getPosition
-
checkAdd
-
add
-
remove
-
canHandle
-
getPositions
-
getCount
public abstract long getCount() -
isEmpty
public boolean isEmpty() -
getDataSize
public abstract long getDataSize() -
checkUpdate
public abstract void checkUpdate(Document oldDocument, Document newDocument, MongoCollection<P> collection) -
updateInPlace
public abstract void updateInPlace(Document oldDocument, Document newDocument, P position, MongoCollection<P> collection) throws KeyConstraintError- Throws:
KeyConstraintError
-
isCompoundIndex
protected boolean isCompoundIndex() -
nullAwareEqualsKeys
-
drop
public abstract void drop() -
toString
public java.lang.String toString()- Overrides:
toStringin classjava.lang.Object
-