org.neo4j.server.rest.web
Class DatabaseActions

java.lang.Object
  extended by org.neo4j.server.rest.web.DatabaseActions

public class DatabaseActions
extends Object


Nested Class Summary
static class DatabaseActions.IndexType
           
static class DatabaseActions.RelationshipDirection
           
 
Field Summary
static String INDEX_ORDER
           
static String RELEVANCE_ORDER
           
static String SCORE_ORDER
           
 
Constructor Summary
DatabaseActions(Database database, LeaseManager leaseManager, org.neo4j.kernel.impl.transaction.xaframework.ForceMode defaultForceMode)
           
 
Method Summary
 IndexedEntityRepresentation addToNodeIndex(String indexName, String key, String value, long nodeId)
           
 IndexedEntityRepresentation addToRelationshipIndex(String indexName, String key, String value, long relationshipId)
           
 NodeRepresentation createNode(Map<String,Object> properties)
           
 IndexRepresentation createNodeIndex(Map<String,Object> indexSpecification)
           
 String createPagedTraverser(long nodeId, Map<String,Object> description, int pageSize, int leaseTime)
           
 RelationshipRepresentation createRelationship(long startNodeId, long endNodeId, String type, Map<String,Object> properties)
           
 IndexRepresentation createRelationshipIndex(Map<String,Object> indexSpecification)
           
 void deleteNode(long nodeId)
           
 void deleteRelationship(long relationshipId)
           
 org.neo4j.server.rest.repr.ListRepresentation findPaths(long startId, long endId, Map<String,Object> map)
           
 PathRepresentation findSinglePath(long startId, long endId, Map<String,Object> map)
           
 DatabaseActions forceMode(org.neo4j.kernel.impl.transaction.xaframework.ForceMode forceMode)
           
 PropertiesRepresentation getAllNodeProperties(long nodeId)
           
 PropertiesRepresentation getAllRelationshipProperties(long relationshipId)
           
 org.neo4j.server.rest.repr.Representation getAutoIndexedNodes(String key, String value)
           
 org.neo4j.server.rest.repr.ListRepresentation getAutoIndexedNodesByQuery(String query)
           
 org.neo4j.server.rest.repr.Representation getAutoIndexedProperties(String type)
           
 org.neo4j.server.rest.repr.Representation getAutoIndexedRelationships(String key, String value)
           
 org.neo4j.server.rest.repr.ListRepresentation getAutoIndexedRelationshipsByQuery(String query)
           
 IndexedEntityRepresentation getIndexedNode(String indexName, String key, String value, long id)
           
 org.neo4j.server.rest.repr.ListRepresentation getIndexedNodes(String indexName, String key, String value)
           
 org.neo4j.server.rest.repr.ListRepresentation getIndexedNodesByQuery(String indexName, String query, String sort)
           
 org.neo4j.server.rest.repr.ListRepresentation getIndexedNodesByQuery(String indexName, String key, String query, String sort)
           
 IndexedEntityRepresentation getIndexedRelationship(String indexName, String key, String value, long id)
           
 org.neo4j.server.rest.repr.ListRepresentation getIndexedRelationships(String indexName, String key, String value)
           
 org.neo4j.server.rest.repr.ListRepresentation getIndexedRelationshipsByQuery(String indexName, String query, String sort)
           
 org.neo4j.server.rest.repr.ListRepresentation getIndexedRelationshipsByQuery(String indexName, String key, String query, String sort)
           
 NodeRepresentation getNode(long nodeId)
           
 String[] getNodeIndexNames()
           
 org.neo4j.server.rest.repr.Representation getNodeProperty(long nodeId, String key)
           
 org.neo4j.server.rest.repr.ListRepresentation getNodeRelationships(long nodeId, DatabaseActions.RelationshipDirection direction, Collection<String> types)
           
 org.neo4j.helpers.Pair<IndexedEntityRepresentation,Boolean> getOrCreateIndexedNode(String indexName, String key, String value, Long nodeOrNull, Map<String,Object> properties)
           
 org.neo4j.helpers.Pair<IndexedEntityRepresentation,Boolean> getOrCreateIndexedRelationship(String indexName, String key, String value, Long relationshipOrNull, Long startNode, String type, Long endNode, Map<String,Object> properties)
           
 NodeRepresentation getReferenceNode()
           
 RelationshipRepresentation getRelationship(long relationshipId)
           
 String[] getRelationshipIndexNames()
           
 org.neo4j.server.rest.repr.Representation getRelationshipProperty(long relationshipId, String key)
           
 org.neo4j.server.rest.repr.Representation isAutoIndexerEnabled(String type)
           
 org.neo4j.server.rest.repr.Representation nodeIndexRoot()
           
 boolean nodeIsIndexed(String indexName, String key, Object value, long nodeId)
           
 org.neo4j.server.rest.repr.ListRepresentation pagedTraverse(String traverserId, TraverserReturnType returnType)
           
 org.neo4j.server.rest.repr.Representation relationshipIndexRoot()
           
 boolean relationshipIsIndexed(String indexName, String key, Object value, long relationshipId)
           
 void removeAllNodeProperties(long nodeId)
           
 void removeAllRelationshipProperties(long relationshipId)
           
 void removeFromNodeIndex(String indexName, String key, String value, long id)
           
 void removeFromNodeIndexNoKeyValue(String indexName, long id)
           
 void removeFromNodeIndexNoValue(String indexName, String key, long id)
           
 void removeFromRelationshipIndex(String indexName, String key, String value, long id)
           
 void removeFromRelationshipIndexNoKeyValue(String indexName, long id)
           
 void removeFromRelationshipIndexNoValue(String indexName, String key, long id)
           
 void removeNodeIndex(String indexName)
           
 void removeNodeProperty(long nodeId, String key)
           
 boolean removePagedTraverse(String traverserId)
           
 void removeRelationshipIndex(String indexName)
           
 void removeRelationshipProperty(long relationshipId, String key)
           
 DatabaseRepresentation root()
           
 void setAllNodeProperties(long nodeId, Map<String,Object> properties)
           
 void setAllRelationshipProperties(long relationshipId, Map<String,Object> properties)
           
 void setAutoIndexerEnabled(String type, boolean enable)
           
 void setNodeProperty(long nodeId, String key, Object value)
           
 void setRelationshipProperty(long relationshipId, String key, Object value)
           
 void startAutoIndexingProperty(String type, String property)
           
 void stopAutoIndexingProperty(String type, String property)
           
 org.neo4j.server.rest.repr.ListRepresentation traverse(long startNode, Map<String,Object> description, TraverserReturnType returnType)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SCORE_ORDER

public static final String SCORE_ORDER
See Also:
Constant Field Values

RELEVANCE_ORDER

public static final String RELEVANCE_ORDER
See Also:
Constant Field Values

INDEX_ORDER

public static final String INDEX_ORDER
See Also:
Constant Field Values
Constructor Detail

DatabaseActions

public DatabaseActions(Database database,
                       LeaseManager leaseManager,
                       org.neo4j.kernel.impl.transaction.xaframework.ForceMode defaultForceMode)
Method Detail

forceMode

public DatabaseActions forceMode(org.neo4j.kernel.impl.transaction.xaframework.ForceMode forceMode)

root

public DatabaseRepresentation root()

createNode

public NodeRepresentation createNode(Map<String,Object> properties)
                              throws PropertyValueException
Throws:
PropertyValueException

getNode

public NodeRepresentation getNode(long nodeId)
                           throws org.neo4j.server.rest.web.NodeNotFoundException
Throws:
org.neo4j.server.rest.web.NodeNotFoundException

deleteNode

public void deleteNode(long nodeId)
                throws org.neo4j.server.rest.web.NodeNotFoundException,
                       OperationFailureException
Throws:
org.neo4j.server.rest.web.NodeNotFoundException
OperationFailureException

getReferenceNode

public NodeRepresentation getReferenceNode()

getNodeProperty

public org.neo4j.server.rest.repr.Representation getNodeProperty(long nodeId,
                                                                 String key)
                                                          throws org.neo4j.server.rest.web.NodeNotFoundException,
                                                                 NoSuchPropertyException
Throws:
org.neo4j.server.rest.web.NodeNotFoundException
NoSuchPropertyException

setNodeProperty

public void setNodeProperty(long nodeId,
                            String key,
                            Object value)
                     throws PropertyValueException,
                            org.neo4j.server.rest.web.NodeNotFoundException
Throws:
PropertyValueException
org.neo4j.server.rest.web.NodeNotFoundException

removeNodeProperty

public void removeNodeProperty(long nodeId,
                               String key)
                        throws org.neo4j.server.rest.web.NodeNotFoundException,
                               NoSuchPropertyException
Throws:
org.neo4j.server.rest.web.NodeNotFoundException
NoSuchPropertyException

getAllNodeProperties

public PropertiesRepresentation getAllNodeProperties(long nodeId)
                                              throws org.neo4j.server.rest.web.NodeNotFoundException
Throws:
org.neo4j.server.rest.web.NodeNotFoundException

setAllNodeProperties

public void setAllNodeProperties(long nodeId,
                                 Map<String,Object> properties)
                          throws PropertyValueException,
                                 org.neo4j.server.rest.web.NodeNotFoundException
Throws:
PropertyValueException
org.neo4j.server.rest.web.NodeNotFoundException

removeAllNodeProperties

public void removeAllNodeProperties(long nodeId)
                             throws org.neo4j.server.rest.web.NodeNotFoundException
Throws:
org.neo4j.server.rest.web.NodeNotFoundException

getNodeIndexNames

public String[] getNodeIndexNames()

getRelationshipIndexNames

public String[] getRelationshipIndexNames()

createNodeIndex

public IndexRepresentation createNodeIndex(Map<String,Object> indexSpecification)

createRelationshipIndex

public IndexRepresentation createRelationshipIndex(Map<String,Object> indexSpecification)

removeNodeIndex

public void removeNodeIndex(String indexName)

removeRelationshipIndex

public void removeRelationshipIndex(String indexName)

nodeIsIndexed

public boolean nodeIsIndexed(String indexName,
                             String key,
                             Object value,
                             long nodeId)

relationshipIsIndexed

public boolean relationshipIsIndexed(String indexName,
                                     String key,
                                     Object value,
                                     long relationshipId)

isAutoIndexerEnabled

public org.neo4j.server.rest.repr.Representation isAutoIndexerEnabled(String type)

setAutoIndexerEnabled

public void setAutoIndexerEnabled(String type,
                                  boolean enable)

getAutoIndexedProperties

public org.neo4j.server.rest.repr.Representation getAutoIndexedProperties(String type)

startAutoIndexingProperty

public void startAutoIndexingProperty(String type,
                                      String property)

stopAutoIndexingProperty

public void stopAutoIndexingProperty(String type,
                                     String property)

createRelationship

public RelationshipRepresentation createRelationship(long startNodeId,
                                                     long endNodeId,
                                                     String type,
                                                     Map<String,Object> properties)
                                              throws StartNodeNotFoundException,
                                                     EndNodeNotFoundException,
                                                     PropertyValueException
Throws:
StartNodeNotFoundException
EndNodeNotFoundException
PropertyValueException

getRelationship

public RelationshipRepresentation getRelationship(long relationshipId)
                                           throws org.neo4j.server.rest.web.RelationshipNotFoundException
Throws:
org.neo4j.server.rest.web.RelationshipNotFoundException

deleteRelationship

public void deleteRelationship(long relationshipId)
                        throws org.neo4j.server.rest.web.RelationshipNotFoundException
Throws:
org.neo4j.server.rest.web.RelationshipNotFoundException

getNodeRelationships

public org.neo4j.server.rest.repr.ListRepresentation getNodeRelationships(long nodeId,
                                                                          DatabaseActions.RelationshipDirection direction,
                                                                          Collection<String> types)
                                                                   throws org.neo4j.server.rest.web.NodeNotFoundException
Throws:
org.neo4j.server.rest.web.NodeNotFoundException

getAllRelationshipProperties

public PropertiesRepresentation getAllRelationshipProperties(long relationshipId)
                                                      throws org.neo4j.server.rest.web.RelationshipNotFoundException
Throws:
org.neo4j.server.rest.web.RelationshipNotFoundException

getRelationshipProperty

public org.neo4j.server.rest.repr.Representation getRelationshipProperty(long relationshipId,
                                                                         String key)
                                                                  throws NoSuchPropertyException,
                                                                         org.neo4j.server.rest.web.RelationshipNotFoundException
Throws:
NoSuchPropertyException
org.neo4j.server.rest.web.RelationshipNotFoundException

setAllRelationshipProperties

public void setAllRelationshipProperties(long relationshipId,
                                         Map<String,Object> properties)
                                  throws PropertyValueException,
                                         org.neo4j.server.rest.web.RelationshipNotFoundException
Throws:
PropertyValueException
org.neo4j.server.rest.web.RelationshipNotFoundException

setRelationshipProperty

public void setRelationshipProperty(long relationshipId,
                                    String key,
                                    Object value)
                             throws PropertyValueException,
                                    org.neo4j.server.rest.web.RelationshipNotFoundException
Throws:
PropertyValueException
org.neo4j.server.rest.web.RelationshipNotFoundException

removeAllRelationshipProperties

public void removeAllRelationshipProperties(long relationshipId)
                                     throws org.neo4j.server.rest.web.RelationshipNotFoundException
Throws:
org.neo4j.server.rest.web.RelationshipNotFoundException

removeRelationshipProperty

public void removeRelationshipProperty(long relationshipId,
                                       String key)
                                throws org.neo4j.server.rest.web.RelationshipNotFoundException,
                                       NoSuchPropertyException
Throws:
org.neo4j.server.rest.web.RelationshipNotFoundException
NoSuchPropertyException

nodeIndexRoot

public org.neo4j.server.rest.repr.Representation nodeIndexRoot()

relationshipIndexRoot

public org.neo4j.server.rest.repr.Representation relationshipIndexRoot()

addToRelationshipIndex

public IndexedEntityRepresentation addToRelationshipIndex(String indexName,
                                                          String key,
                                                          String value,
                                                          long relationshipId)

addToNodeIndex

public IndexedEntityRepresentation addToNodeIndex(String indexName,
                                                  String key,
                                                  String value,
                                                  long nodeId)

removeFromNodeIndex

public void removeFromNodeIndex(String indexName,
                                String key,
                                String value,
                                long id)

removeFromNodeIndexNoValue

public void removeFromNodeIndexNoValue(String indexName,
                                       String key,
                                       long id)

removeFromNodeIndexNoKeyValue

public void removeFromNodeIndexNoKeyValue(String indexName,
                                          long id)

removeFromRelationshipIndex

public void removeFromRelationshipIndex(String indexName,
                                        String key,
                                        String value,
                                        long id)

removeFromRelationshipIndexNoValue

public void removeFromRelationshipIndexNoValue(String indexName,
                                               String key,
                                               long id)

removeFromRelationshipIndexNoKeyValue

public void removeFromRelationshipIndexNoKeyValue(String indexName,
                                                  long id)

getIndexedNode

public IndexedEntityRepresentation getIndexedNode(String indexName,
                                                  String key,
                                                  String value,
                                                  long id)

getIndexedRelationship

public IndexedEntityRepresentation getIndexedRelationship(String indexName,
                                                          String key,
                                                          String value,
                                                          long id)

getIndexedNodes

public org.neo4j.server.rest.repr.ListRepresentation getIndexedNodes(String indexName,
                                                                     String key,
                                                                     String value)

getIndexedNodesByQuery

public org.neo4j.server.rest.repr.ListRepresentation getIndexedNodesByQuery(String indexName,
                                                                            String query,
                                                                            String sort)

getIndexedNodesByQuery

public org.neo4j.server.rest.repr.ListRepresentation getIndexedNodesByQuery(String indexName,
                                                                            String key,
                                                                            String query,
                                                                            String sort)

getOrCreateIndexedNode

public org.neo4j.helpers.Pair<IndexedEntityRepresentation,Boolean> getOrCreateIndexedNode(String indexName,
                                                                                          String key,
                                                                                          String value,
                                                                                          Long nodeOrNull,
                                                                                          Map<String,Object> properties)
                                                                                   throws org.neo4j.server.rest.repr.BadInputException,
                                                                                          org.neo4j.server.rest.web.NodeNotFoundException
Throws:
org.neo4j.server.rest.repr.BadInputException
org.neo4j.server.rest.web.NodeNotFoundException

getOrCreateIndexedRelationship

public org.neo4j.helpers.Pair<IndexedEntityRepresentation,Boolean> getOrCreateIndexedRelationship(String indexName,
                                                                                                  String key,
                                                                                                  String value,
                                                                                                  Long relationshipOrNull,
                                                                                                  Long startNode,
                                                                                                  String type,
                                                                                                  Long endNode,
                                                                                                  Map<String,Object> properties)
                                                                                           throws org.neo4j.server.rest.repr.BadInputException,
                                                                                                  org.neo4j.server.rest.web.RelationshipNotFoundException,
                                                                                                  org.neo4j.server.rest.web.NodeNotFoundException
Throws:
org.neo4j.server.rest.repr.BadInputException
org.neo4j.server.rest.web.RelationshipNotFoundException
org.neo4j.server.rest.web.NodeNotFoundException

getAutoIndexedNodes

public org.neo4j.server.rest.repr.Representation getAutoIndexedNodes(String key,
                                                                     String value)

getAutoIndexedNodesByQuery

public org.neo4j.server.rest.repr.ListRepresentation getAutoIndexedNodesByQuery(String query)

getIndexedRelationships

public org.neo4j.server.rest.repr.ListRepresentation getIndexedRelationships(String indexName,
                                                                             String key,
                                                                             String value)

getIndexedRelationshipsByQuery

public org.neo4j.server.rest.repr.ListRepresentation getIndexedRelationshipsByQuery(String indexName,
                                                                                    String query,
                                                                                    String sort)

getIndexedRelationshipsByQuery

public org.neo4j.server.rest.repr.ListRepresentation getIndexedRelationshipsByQuery(String indexName,
                                                                                    String key,
                                                                                    String query,
                                                                                    String sort)

getAutoIndexedRelationships

public org.neo4j.server.rest.repr.Representation getAutoIndexedRelationships(String key,
                                                                             String value)

getAutoIndexedRelationshipsByQuery

public org.neo4j.server.rest.repr.ListRepresentation getAutoIndexedRelationshipsByQuery(String query)

traverse

public org.neo4j.server.rest.repr.ListRepresentation traverse(long startNode,
                                                              Map<String,Object> description,
                                                              TraverserReturnType returnType)

pagedTraverse

public org.neo4j.server.rest.repr.ListRepresentation pagedTraverse(String traverserId,
                                                                   TraverserReturnType returnType)

createPagedTraverser

public String createPagedTraverser(long nodeId,
                                   Map<String,Object> description,
                                   int pageSize,
                                   int leaseTime)

removePagedTraverse

public boolean removePagedTraverse(String traverserId)

findSinglePath

public PathRepresentation findSinglePath(long startId,
                                         long endId,
                                         Map<String,Object> map)

findPaths

public org.neo4j.server.rest.repr.ListRepresentation findPaths(long startId,
                                                               long endId,
                                                               Map<String,Object> map)


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