org.neo4j.server.rest.web
Class DatabaseActions
java.lang.Object
org.neo4j.server.rest.web.DatabaseActions
public class DatabaseActions
- extends Object
|
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)
|
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)
|
Representation |
getAutoIndexedNodes(String key,
String value)
|
ListRepresentation |
getAutoIndexedNodesByQuery(String query)
|
Representation |
getAutoIndexedProperties(String type)
|
Representation |
getAutoIndexedRelationships(String key,
String value)
|
ListRepresentation |
getAutoIndexedRelationshipsByQuery(String query)
|
IndexedEntityRepresentation |
getIndexedNode(String indexName,
String key,
String value,
long id)
|
ListRepresentation |
getIndexedNodes(String indexName,
String key,
String value)
|
ListRepresentation |
getIndexedNodesByQuery(String indexName,
String query,
String sort)
|
ListRepresentation |
getIndexedNodesByQuery(String indexName,
String key,
String query,
String sort)
|
IndexedEntityRepresentation |
getIndexedRelationship(String indexName,
String key,
String value,
long id)
|
ListRepresentation |
getIndexedRelationships(String indexName,
String key,
String value)
|
ListRepresentation |
getIndexedRelationshipsByQuery(String indexName,
String query,
String sort)
|
ListRepresentation |
getIndexedRelationshipsByQuery(String indexName,
String key,
String query,
String sort)
|
NodeRepresentation |
getNode(long nodeId)
|
String[] |
getNodeIndexNames()
|
Representation |
getNodeProperty(long nodeId,
String key)
|
ListRepresentation |
getNodeRelationships(long nodeId,
DatabaseActions.RelationshipDirection direction,
Collection<String> types)
|
Pair<IndexedEntityRepresentation,Boolean> |
getOrCreateIndexedNode(String indexName,
String key,
String value,
Long nodeOrNull,
Map<String,Object> properties)
|
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()
|
Representation |
getRelationshipProperty(long relationshipId,
String key)
|
Representation |
isAutoIndexerEnabled(String type)
|
Representation |
nodeIndexRoot()
|
boolean |
nodeIsIndexed(String indexName,
String key,
Object value,
long nodeId)
|
ListRepresentation |
pagedTraverse(String traverserId,
TraverserReturnType returnType)
|
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)
|
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 |
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
DatabaseActions
public DatabaseActions(Database database,
LeaseManager leaseManager,
org.neo4j.kernel.impl.transaction.xaframework.ForceMode defaultForceMode)
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 NodeNotFoundException
- Throws:
NodeNotFoundException
deleteNode
public void deleteNode(long nodeId)
throws NodeNotFoundException,
OperationFailureException
- Throws:
NodeNotFoundException
OperationFailureException
getReferenceNode
public NodeRepresentation getReferenceNode()
getNodeProperty
public Representation getNodeProperty(long nodeId,
String key)
throws NodeNotFoundException,
NoSuchPropertyException
- Throws:
NodeNotFoundException
NoSuchPropertyException
setNodeProperty
public void setNodeProperty(long nodeId,
String key,
Object value)
throws PropertyValueException,
NodeNotFoundException
- Throws:
PropertyValueException
NodeNotFoundException
removeNodeProperty
public void removeNodeProperty(long nodeId,
String key)
throws NodeNotFoundException,
NoSuchPropertyException
- Throws:
NodeNotFoundException
NoSuchPropertyException
getAllNodeProperties
public PropertiesRepresentation getAllNodeProperties(long nodeId)
throws NodeNotFoundException
- Throws:
NodeNotFoundException
setAllNodeProperties
public void setAllNodeProperties(long nodeId,
Map<String,Object> properties)
throws PropertyValueException,
NodeNotFoundException
- Throws:
PropertyValueException
NodeNotFoundException
removeAllNodeProperties
public void removeAllNodeProperties(long nodeId)
throws NodeNotFoundException
- Throws:
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)
throws DatabaseBlockedException
- Throws:
DatabaseBlockedException
relationshipIsIndexed
public boolean relationshipIsIndexed(String indexName,
String key,
Object value,
long relationshipId)
throws DatabaseBlockedException
- Throws:
DatabaseBlockedException
isAutoIndexerEnabled
public Representation isAutoIndexerEnabled(String type)
setAutoIndexerEnabled
public void setAutoIndexerEnabled(String type,
boolean enable)
getAutoIndexedProperties
public 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 RelationshipNotFoundException
- Throws:
RelationshipNotFoundException
deleteRelationship
public void deleteRelationship(long relationshipId)
throws RelationshipNotFoundException
- Throws:
RelationshipNotFoundException
getNodeRelationships
public ListRepresentation getNodeRelationships(long nodeId,
DatabaseActions.RelationshipDirection direction,
Collection<String> types)
throws NodeNotFoundException
- Throws:
NodeNotFoundException
getAllRelationshipProperties
public PropertiesRepresentation getAllRelationshipProperties(long relationshipId)
throws RelationshipNotFoundException
- Throws:
RelationshipNotFoundException
getRelationshipProperty
public Representation getRelationshipProperty(long relationshipId,
String key)
throws NoSuchPropertyException,
RelationshipNotFoundException
- Throws:
NoSuchPropertyException
RelationshipNotFoundException
setAllRelationshipProperties
public void setAllRelationshipProperties(long relationshipId,
Map<String,Object> properties)
throws PropertyValueException,
RelationshipNotFoundException
- Throws:
PropertyValueException
RelationshipNotFoundException
setRelationshipProperty
public void setRelationshipProperty(long relationshipId,
String key,
Object value)
throws PropertyValueException,
RelationshipNotFoundException
- Throws:
PropertyValueException
RelationshipNotFoundException
removeAllRelationshipProperties
public void removeAllRelationshipProperties(long relationshipId)
throws RelationshipNotFoundException
- Throws:
RelationshipNotFoundException
removeRelationshipProperty
public void removeRelationshipProperty(long relationshipId,
String key)
throws RelationshipNotFoundException,
NoSuchPropertyException
- Throws:
RelationshipNotFoundException
NoSuchPropertyException
nodeIndexRoot
public Representation nodeIndexRoot()
relationshipIndexRoot
public 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 ListRepresentation getIndexedNodes(String indexName,
String key,
String value)
getIndexedNodesByQuery
public ListRepresentation getIndexedNodesByQuery(String indexName,
String query,
String sort)
getIndexedNodesByQuery
public ListRepresentation getIndexedNodesByQuery(String indexName,
String key,
String query,
String sort)
getOrCreateIndexedNode
public Pair<IndexedEntityRepresentation,Boolean> getOrCreateIndexedNode(String indexName,
String key,
String value,
Long nodeOrNull,
Map<String,Object> properties)
throws BadInputException,
NodeNotFoundException
- Throws:
BadInputException
NodeNotFoundException
getOrCreateIndexedRelationship
public Pair<IndexedEntityRepresentation,Boolean> getOrCreateIndexedRelationship(String indexName,
String key,
String value,
Long relationshipOrNull,
Long startNode,
String type,
Long endNode,
Map<String,Object> properties)
throws BadInputException,
RelationshipNotFoundException,
NodeNotFoundException
- Throws:
BadInputException
RelationshipNotFoundException
NodeNotFoundException
getAutoIndexedNodes
public Representation getAutoIndexedNodes(String key,
String value)
getAutoIndexedNodesByQuery
public ListRepresentation getAutoIndexedNodesByQuery(String query)
getIndexedRelationships
public ListRepresentation getIndexedRelationships(String indexName,
String key,
String value)
getIndexedRelationshipsByQuery
public ListRepresentation getIndexedRelationshipsByQuery(String indexName,
String query,
String sort)
getIndexedRelationshipsByQuery
public ListRepresentation getIndexedRelationshipsByQuery(String indexName,
String key,
String query,
String sort)
getAutoIndexedRelationships
public Representation getAutoIndexedRelationships(String key,
String value)
getAutoIndexedRelationshipsByQuery
public ListRepresentation getAutoIndexedRelationshipsByQuery(String query)
traverse
public ListRepresentation traverse(long startNode,
Map<String,Object> description,
TraverserReturnType returnType)
pagedTraverse
public 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 ListRepresentation findPaths(long startId,
long endId,
Map<String,Object> map)
Copyright © 2002-2012 The Neo4j Graph Database Project. All Rights Reserved.