public class DelegatingGraphDatabase extends Object implements GraphDatabase
Modifier and Type | Field and Description |
---|---|
protected org.neo4j.graphdb.GraphDatabaseService |
delegate |
Constructor and Description |
---|
DelegatingGraphDatabase(org.neo4j.graphdb.GraphDatabaseService delegate) |
DelegatingGraphDatabase(org.neo4j.graphdb.GraphDatabaseService delegate,
ResultConverter resultConverter) |
Modifier and Type | Method and Description |
---|---|
org.neo4j.graphdb.Transaction |
beginTx() |
<T extends org.neo4j.graphdb.PropertyContainer> |
createIndex(Class<T> type,
String indexName,
IndexType indexType)
creates a index
|
org.neo4j.graphdb.Node |
createNode(Map<String,Object> props,
Collection<String> labels)
creates the node and initializes its properties
|
org.neo4j.graphdb.Relationship |
createRelationship(org.neo4j.graphdb.Node startNode,
org.neo4j.graphdb.Node endNode,
org.neo4j.graphdb.RelationshipType type,
Map<String,Object> properties)
creates the relationship between the startNode, endNode with the given type which will be populated with the provided properties
|
Collection<String> |
getAllLabelNames() |
org.neo4j.graphdb.GraphDatabaseService |
getGraphDatabaseService() |
<T extends org.neo4j.graphdb.PropertyContainer> |
getIndex(String indexName) |
org.neo4j.graphdb.Node |
getNodeById(long id) |
org.neo4j.graphdb.Node |
getOrCreateNode(String indexName,
String key,
Object value,
Map<String,Object> nodeProperties,
Collection<String> labels)
creates the node uniquely or returns an existing node with the same index-key-value combination.
|
org.neo4j.graphdb.Relationship |
getOrCreateRelationship(String indexName,
String key,
Object value,
org.neo4j.graphdb.Node startNode,
org.neo4j.graphdb.Node endNode,
String type,
Map<String,Object> properties)
Creates the relationship uniquely, uses the given index,key,value to achieve that.
|
org.neo4j.graphdb.Relationship |
getRelationshipById(long id) |
TransactionManager |
getTransactionManager() |
boolean |
isNode(Class<? extends org.neo4j.graphdb.PropertyContainer> type) |
org.neo4j.graphdb.Node |
merge(String labelName,
String key,
Object value,
Map<String,Object> nodeProperties,
Collection<String> labels)
creates the node uniquely or returns an existing node with the same label-key-value combination.
|
CypherQueryEngine |
queryEngine()
returns a query engine for the provided type (Cypher) which is initialized with the default result converter
|
CypherQueryEngineImpl |
queryEngine(ResultConverter resultConverter)
returns a query engine for the provided type (Cypher) which is initialized with the provided result converter
|
void |
remove(org.neo4j.graphdb.Node node)
deletes the Node and its index entries
|
void |
remove(org.neo4j.graphdb.Relationship relationship)
deletes the relationship and its index entries
|
void |
setConversionService(ConversionService conversionService) |
void |
setResultConverter(ResultConverter resultConverter) |
void |
shutdown() |
boolean |
transactionIsRunning() |
org.neo4j.graphdb.traversal.TraversalDescription |
traversalDescription() |
public DelegatingGraphDatabase(org.neo4j.graphdb.GraphDatabaseService delegate)
public DelegatingGraphDatabase(org.neo4j.graphdb.GraphDatabaseService delegate, ResultConverter resultConverter)
public void setConversionService(ConversionService conversionService)
setConversionService
in interface GraphDatabase
conversionService
- the conversion service to be used for the default result converter of this databasepublic void setResultConverter(ResultConverter resultConverter)
setResultConverter
in interface GraphDatabase
resultConverter
- the default result converter to be used with this databasepublic org.neo4j.graphdb.Node getNodeById(long id)
getNodeById
in interface GraphDatabase
id
- node idpublic org.neo4j.graphdb.Node createNode(Map<String,Object> props, Collection<String> labels)
GraphDatabase
createNode
in interface GraphDatabase
public org.neo4j.graphdb.Relationship getRelationshipById(long id)
getRelationshipById
in interface GraphDatabase
id
- relationship idpublic org.neo4j.graphdb.Relationship createRelationship(org.neo4j.graphdb.Node startNode, org.neo4j.graphdb.Node endNode, org.neo4j.graphdb.RelationshipType type, Map<String,Object> properties)
GraphDatabase
createRelationship
in interface GraphDatabase
public <T extends org.neo4j.graphdb.PropertyContainer> org.neo4j.graphdb.index.Index<T> getIndex(String indexName)
getIndex
in interface GraphDatabase
indexName
- existing index name, not nullIndex
public <T extends org.neo4j.graphdb.PropertyContainer> org.neo4j.graphdb.index.Index<T> createIndex(Class<T> type, String indexName, IndexType indexType)
GraphDatabase
createIndex
in interface GraphDatabase
type
- type of index requested - either Node.class or Relationship.classindexType
- SIMPLE, FULLTEXT or POINT declaring the requested index-typeIndex
public boolean isNode(Class<? extends org.neo4j.graphdb.PropertyContainer> type)
public org.neo4j.graphdb.traversal.TraversalDescription traversalDescription()
traversalDescription
in interface GraphDatabase
public CypherQueryEngine queryEngine()
GraphDatabase
queryEngine
in interface GraphDatabase
public CypherQueryEngineImpl queryEngine(ResultConverter resultConverter)
GraphDatabase
queryEngine
in interface GraphDatabase
public boolean transactionIsRunning()
transactionIsRunning
in interface GraphDatabase
public TransactionManager getTransactionManager()
getTransactionManager
in interface GraphDatabase
public org.neo4j.graphdb.Transaction beginTx()
beginTx
in interface GraphDatabase
public void remove(org.neo4j.graphdb.Node node)
GraphDatabase
remove
in interface GraphDatabase
public void remove(org.neo4j.graphdb.Relationship relationship)
GraphDatabase
remove
in interface GraphDatabase
public void shutdown()
shutdown
in interface GraphDatabase
public Collection<String> getAllLabelNames()
getAllLabelNames
in interface GraphDatabase
public org.neo4j.graphdb.GraphDatabaseService getGraphDatabaseService()
public org.neo4j.graphdb.Node merge(String labelName, String key, Object value, Map<String,Object> nodeProperties, Collection<String> labels)
GraphDatabase
merge
in interface GraphDatabase
public org.neo4j.graphdb.Node getOrCreateNode(String indexName, String key, Object value, Map<String,Object> nodeProperties, Collection<String> labels)
GraphDatabase
getOrCreateNode
in interface GraphDatabase
public org.neo4j.graphdb.Relationship getOrCreateRelationship(String indexName, String key, Object value, org.neo4j.graphdb.Node startNode, org.neo4j.graphdb.Node endNode, String type, Map<String,Object> properties)
GraphDatabase
getOrCreateRelationship
in interface GraphDatabase
Copyright © 2011-2014–2015 Pivotal Software, Inc.. All rights reserved.