Neo4j Community

Class UniqueFactory.UniqueNodeFactory

  extended by org.neo4j.graphdb.index.UniqueFactory<Node>
      extended by org.neo4j.graphdb.index.UniqueFactory.UniqueNodeFactory
Enclosing class:
UniqueFactory<T extends PropertyContainer>

public abstract static class UniqueFactory.UniqueNodeFactory
extends UniqueFactory<Node>

Implementation of UniqueFactory for Node.

Tobias Lindaaker

Nested Class Summary
Nested classes/interfaces inherited from class org.neo4j.graphdb.index.UniqueFactory
UniqueFactory.UniqueNodeFactory, UniqueFactory.UniqueRelationshipFactory
Constructor Summary
UniqueFactory.UniqueNodeFactory(GraphDatabaseService graphdb, String index)
          Create a new UniqueFactory for nodes.
UniqueFactory.UniqueNodeFactory(Index<Node> index)
          Create a new UniqueFactory for nodes.
Method Summary
protected  Node create(Map<String,Object> properties)
          Default implementation of UniqueFactory.create(Map), creates a plain node.
protected  void delete(Node node)
          Default implementation of UniqueFactory.delete(PropertyContainer).
Methods inherited from class org.neo4j.graphdb.index.UniqueFactory
getOrCreate, graphDatabase, index, initialize
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail


public UniqueFactory.UniqueNodeFactory(Index<Node> index)
Create a new UniqueFactory for nodes.

index - the index to store entities uniquely in.


public UniqueFactory.UniqueNodeFactory(GraphDatabaseService graphdb,
                                       String index)
Create a new UniqueFactory for nodes.

graphdb - the graph database to get the index from.
index - the name of the index to store entities uniquely in.
Method Detail


protected Node create(Map<String,Object> properties)
Default implementation of UniqueFactory.create(Map), creates a plain node. Override to retrieve the node to add to the index by some other means than by creating it. For initialization of the Node, use the UniqueFactory.initialize(PropertyContainer, Map) method.

Specified by:
create in class UniqueFactory<Node>
properties - the properties that this entity will is to be indexed uniquely with.
the entity to add to the index.
See Also:
UniqueFactory.create(Map), UniqueFactory.initialize(PropertyContainer, Map)


protected void delete(Node node)
Default implementation of UniqueFactory.delete(PropertyContainer). Invokes Node.delete().

Specified by:
delete in class UniqueFactory<Node>
node - the entity that was created but was not added to the index.
See Also:

Neo4j Community

Copyright © 2002-2012 The Neo4j Graph Database Project. All Rights Reserved.