T
- The type of entities this index manages. It may be either
Node
s or Relationship
s.@Deprecated public interface Index<T extends PropertyContainer> extends ReadableIndex<T>
Node
s or
Relationship
s) for fast lookup and querying. Any number of key/value
pairs can be associated with any number of entities using
add(PropertyContainer, String, Object)
and dissociated with
remove(PropertyContainer, String, Object)
. Querying is done using
ReadableIndex.get(String, Object)
for exact lookups and ReadableIndex.query(Object)
or
ReadableIndex.query(String, Object)
for more advanced querying, exposing querying
capabilities from the backend which is backing this particular index.
Write operations participates in transactions so committing and rolling back
works the same way as usual in Neo4j.Modifier and Type | Method and Description |
---|---|
void |
add(T entity,
String key,
Object value)
Deprecated.
|
void |
delete()
Deprecated.
|
T |
putIfAbsent(T entity,
String key,
Object value)
Deprecated.
|
void |
remove(T entity)
Deprecated.
|
void |
remove(T entity,
String key)
Deprecated.
|
void |
remove(T entity,
String key,
Object value)
Deprecated.
|
get, getEntityType, getGraphDatabase, getName, isWriteable, query, query
@Deprecated void add(T entity, String key, Object value)
entity
to the index. If that key/value
pair for the entity is already in the index it's up to the
implementation to make it so that such an operation is idempotent.entity
- the entity (i.e Node
or Relationship
)
to associate the key/value pair with.key
- the key in the key/value pair to associate with the entity.value
- the value in the key/value pair to associate with the
entity.@Deprecated void remove(T entity, String key, Object value)
entity
from the index. If that
key/value pair isn't associated with entity
in this index this
operation doesn't do anything.entity
- the entity (i.e Node
or Relationship
)
to dissociate the key/value pair from.key
- the key in the key/value pair to dissociate from the entity.value
- the value in the key/value pair to dissociate from the
entity.@Deprecated void remove(T entity, String key)
entity
where key is key
from the index.
Implementations can choose to not implement this method and should
in that case throw UnsupportedOperationException
.entity
- the entity (Node
or Relationship
) to
remove the this index.key
- the key associated with the index entry@Deprecated void remove(T entity)
add(PropertyContainer, String, Object)
.
Implementations can choose to not implement this method and should
in that case throw UnsupportedOperationException
.entity
- the entity (Node
or Relationship
) to
remove the this index.@Deprecated void delete()
@Deprecated T putIfAbsent(T entity, String key, Object value)
entity
- the entity (i.e Node
or Relationship
)
to associate the key/value pair with.key
- the key in the key/value pair to associate with the entity.value
- the value in the key/value pair to associate with the
entity.null
if no entity was
indexed before (and the specified entity was added to the index).Copyright © 2002–2018 The Neo4j Graph Database Project. All rights reserved.