Neo4j Community

org.neo4j.graphdb.index
Class UniqueFactory.UniqueNodeFactory

java.lang.Object
  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.

Author:
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

UniqueFactory.UniqueNodeFactory

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

Parameters:
index - the index to store entities uniquely in.

UniqueFactory.UniqueNodeFactory

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

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

create

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>
Parameters:
properties - the properties that this entity will is to be indexed uniquely with.
Returns:
the entity to add to the index.
See Also:
UniqueFactory.create(Map), UniqueFactory.initialize(PropertyContainer, Map)

delete

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

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

Neo4j Community

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