GlobalGraphOperations (Neo4j Community 2.1.0-M01 API)
Date: 2014-02-20

org.neo4j.tooling

## Class GlobalGraphOperations

- java.lang.Object
- - org.neo4j.tooling.GlobalGraphOperations

-     public class GlobalGraphOperations
      extends Object

  A tool for doing global operations, for example `getAllNodes()`.

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static GlobalGraphOperations` | `at(GraphDatabaseService db)` Get a `GlobalGraphOperations` for the given `db`.
    `ResourceIterable<Label>` | `getAllLabels()` Returns all labels currently in the underlying store.
    `Iterable<Node>` | `getAllNodes()` Returns all nodes in the graph.
    `ResourceIterable<Node>` | `getAllNodesWithLabel(Label label)` Returns all `nodes` with a specific `label`.
    `ResourceIterable<String>` | `getAllPropertyKeys()` Returns all property keys currently in the underlying store.
    `Iterable<Relationship>` | `getAllRelationships()` Returns all relationships in the graph.
    `Iterable<RelationshipType>` | `getAllRelationshipTypes()` Returns all relationship types currently in the underlying store.

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Method Detail

    - #### at

          public static GlobalGraphOperations at(GraphDatabaseService db)

      Get a `GlobalGraphOperations` for the given `db`.
      Parameters:
        `db` - the `GraphDatabaseService` to get global operations for.
      Returns:
        `GlobalGraphOperations` for the given `db`.

    - #### getAllNodes

          public Iterable<Node> getAllNodes()

      Returns all nodes in the graph.
      Returns:
        all nodes in the graph.

    - #### getAllRelationships

          public Iterable<Relationship> getAllRelationships()

      Returns all relationships in the graph.
      Returns:
        all relationships in the graph.

    - #### getAllRelationshipTypes

          public Iterable<RelationshipType> getAllRelationshipTypes()

      Returns all relationship types currently in the underlying store. Relationship types are added to the underlying store the first time they are used in a successfully committed `node.createRelationshipTo(...)`. Note that this method is guaranteed to return all known relationship types, but it does not guarantee that it won't return more than that (e.g. it can return "historic" relationship types that no longer have any relationships in the graph).
      Returns:
        all relationship types in the underlying store

    - #### getAllLabels

          public ResourceIterable<Label> getAllLabels()

      Returns all labels currently in the underlying store. Labels are added to the store the first they are used. This method guarantees that it will return all labels currently in use. However, it may also return more than that (e.g. it can return "historic" labels that are no longer used). Please take care that the returned `ResourceIterable` is closed correctly and as soon as possible inside your transaction to avoid potential blocking of write operations.
      Returns:
        all labels in the underlying store.

    - #### getAllPropertyKeys

          public ResourceIterable<String> getAllPropertyKeys()

      Returns all property keys currently in the underlying store. This method guarantees that it will return all property keys currently in use. However, it may also return more than that (e.g. it can return "historic" labels that are no longer used). Please take care that the returned `ResourceIterable` is closed correctly and as soon as possible inside your transaction to avoid potential blocking of write operations.
      Returns:
        all property keys in the underlying store.

    - #### getAllNodesWithLabel

          public ResourceIterable<Node> getAllNodesWithLabel(Label label)

      Returns all `nodes` with a specific `label`. Please take care that the returned `ResourceIterable` is closed correctly and as soon as possible inside your transaction to avoid potential blocking of write operations.
      Parameters:
        `label` - the `Label` to return nodes for.
      Returns:
        `Iterable` containing nodes with a specific label.

Copyright © 2002–2014 The Neo4j Graph Database Project. All rights reserved.