|
Neo4j Community | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.neo4j.graphdb.index.UniqueFactory<T>
T
- the type of entity created by this UniqueFactory
.public abstract class UniqueFactory<T extends PropertyContainer>
A utility class for creating unique (with regard to a given index) entities.
Uses the putIfAbsent() method
of the referenced index.
Nested Class Summary | |
---|---|
static class |
UniqueFactory.UniqueEntity<T extends PropertyContainer>
|
static class |
UniqueFactory.UniqueNodeFactory
Implementation of UniqueFactory for Node . |
static class |
UniqueFactory.UniqueRelationshipFactory
Implementation of UniqueFactory for Relationship . |
Method Summary | |
---|---|
T |
getOrCreate(String key,
Object value)
Get the indexed entity, creating it (exactly once) if no indexed entity exists. |
UniqueFactory.UniqueEntity<T> |
getOrCreateWithOutcome(String key,
Object value)
Get the indexed entity, creating it (exactly once) if no indexed entity exists. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public final T getOrCreate(String key, Object value)
key
- the key to find the entity under in the index.value
- the value the key is mapped to for the entity in the index.
public final UniqueFactory.UniqueEntity<T> getOrCreateWithOutcome(String key, Object value)
key
- the key to find the entity under in the index.value
- the value the key is mapped to for the entity in the index.
UniqueFactory.UniqueEntity
.
|
Neo4j Community | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |