org.neo4j.graphdb.index
Class UniqueFactory.UniqueRelationshipFactory

java.lang.Object
  extended by org.neo4j.graphdb.index.UniqueFactory<Relationship>
      extended by org.neo4j.graphdb.index.UniqueFactory.UniqueRelationshipFactory
Enclosing class:
UniqueFactory<T extends PropertyContainer>

public abstract static class UniqueFactory.UniqueRelationshipFactory
extends UniqueFactory<Relationship>

Implementation of UniqueFactory for Relationship.

Author:
Tobias Lindaaker

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

Constructor Detail

UniqueFactory.UniqueRelationshipFactory

public UniqueFactory.UniqueRelationshipFactory(Index<Relationship> index)
Create a new UniqueFactory for relationships.

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

UniqueFactory.UniqueRelationshipFactory

public UniqueFactory.UniqueRelationshipFactory(GraphDatabaseService graphdb,
                                               String index)
Create a new UniqueFactory for relationships.

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

initialize

protected void initialize(Relationship relationship,
                          Map<String,Object> properties)
Default implementation of UniqueFactory.initialize(PropertyContainer, Map), does nothing for Relationships. Override to perform some action with the guarantee that this method is only invoked for the transaction that succeeded in creating the Relationship.

Specified by:
initialize in class UniqueFactory<Relationship>
Parameters:
relationship - the created entity to initialize.
properties - the properties that this entity was indexed uniquely with.
See Also:
UniqueFactory.initialize(PropertyContainer, Map), UniqueFactory.create(Map)

delete

protected void delete(Relationship relationship)
Default implementation of UniqueFactory.delete(PropertyContainer). Invokes Relationship.delete().

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


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