Package io.permazen.core
Class SimpleIndex<T>
java.lang.Object
io.permazen.core.SchemaItem
io.permazen.core.Index
io.permazen.core.SimpleIndex<T>
- Type Parameters:
T
- field's value type
- Direct Known Subclasses:
ComplexSubFieldIndex
,SimpleFieldIndex
An index on a simple field, either a regular simple field or a sub-field of a complex field.
-
Method Summary
Modifier and TypeMethodDescriptionGet the indexed field's encoding.getField()
Get the indexed field.abstract CoreIndex1<T,
ObjId> getIndex
(Transaction tx) Get this index's view of the given transaction.byte[]
Get thebyte[]
key in the underlying key/value store corresponding to the given value and target object in this index.byte[]
Get thebyte[]
key in the underlying key/value store corresponding to the given value in this index.Methods inherited from class io.permazen.core.Index
genericize, getEncodings, getFields, getKey, getKey, getObjType, isComposite, toString, visit
Methods inherited from class io.permazen.core.SchemaItem
getName, getSchema, getSchemaId, getStorageId
-
Method Details
-
getField
Get the indexed field.- Returns:
- the indexed field
-
getEncoding
Get the indexed field's encoding.- Returns:
- the indexed field's encoding
-
getIndex
Description copied from class:Index
Get this index's view of the given transaction. -
getKey
Get thebyte[]
key in the underlying key/value store corresponding to the given value in this index.The returned key will be the prefix of all index entries with the given value over all objects.
- Parameters:
value
- indexed value- Returns:
- the corresponding
KVDatabase
key - See Also:
-
getKey
Get thebyte[]
key in the underlying key/value store corresponding to the given value and target object in this index.- Parameters:
id
- target object IDvalue
- indexed value- Returns:
- the corresponding
KVDatabase
key - See Also:
-