OVertex - getVertices()

This method retrieves all vertices connected by edges to this vertex.

Retrieving Vertices

In a Graph database, a vertex connects to other vertices through edges. Using this method you can follow the given edges to retrieve the connected OVertex instances.


Edges in OrientDB have direction and all records are defined by a database class. In the case of direction, the edge is created pointing from one vertex to another. This direction is implemented as the ODirection class. Records have classes internal to the database, which are implemented as the OClass class. Vertices on the database belong either to the V class or as a class that extends the V class.

The first method uses the default V class. The other methods allow you to define what database class of vertices you want to retrieve.

Iterable<OVertex> OVertex().getVertices(ODirection dir)

Iterable<OVertex> OVertex().getVertices(ODirection dir, OClass... type)

Iterable<OVertex> OVertex().getVertices(ODirection dir, String... name)
Argument Type Description
dir ODirection Defines the direction to search
type OClass Defines the database class
name String Defines the name of the database class

Return Value

This method returns an Iterable instance that contains a series of OVertex instances representing the connected vertices.

results matching ""

    No results matching ""