public abstract static class UniqueFactory.UniqueNodeFactory extends UniqueFactory<Node>
UniqueFactory
for Node
.UniqueFactory.UniqueNodeFactory, UniqueFactory.UniqueRelationshipFactory
Constructor and Description |
---|
UniqueFactory.UniqueNodeFactory(GraphDatabaseService graphdb,
String index)
Create a new
UniqueFactory for nodes. |
UniqueFactory.UniqueNodeFactory(Index<Node> index)
Create a new
UniqueFactory for nodes. |
Modifier and Type | Method and Description |
---|---|
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) . |
getOrCreate, graphDatabase, index, initialize
public UniqueFactory.UniqueNodeFactory(Index<Node> index)
UniqueFactory
for nodes.index
- the index to store entities uniquely in.public UniqueFactory.UniqueNodeFactory(GraphDatabaseService graphdb, String index)
UniqueFactory
for nodes.graphdb
- the graph database to get the index from.index
- the name of the index to store entities uniquely in.protected Node create(Map<String,Object> properties)
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.create
in class UniqueFactory<Node>
properties
- the properties that this entity will is to be indexed uniquely with.UniqueFactory.create(Map)
,
UniqueFactory.initialize(PropertyContainer, Map)
protected void delete(Node node)
UniqueFactory.delete(PropertyContainer)
. Invokes
Node.delete()
.delete
in class UniqueFactory<Node>
node
- the entity that was created but was not added to the index.UniqueFactory.delete(PropertyContainer)
Copyright © 2002-2013 The Neo4j Graph Database Project. All Rights Reserved.