public abstract class AbstractVertex extends AbstractElement implements InternalVertex, org.apache.tinkerpop.gremlin.structure.Vertex
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractVertex(StandardJanusGraphTx tx,
long id) |
| Modifier and Type | Method and Description |
|---|---|
JanusGraphEdge |
addEdge(String label,
org.apache.tinkerpop.gremlin.structure.Vertex vertex,
Object... keyValues)
Creates a new edge incident on this vertex.
|
Iterator<org.apache.tinkerpop.gremlin.structure.Edge> |
edges(org.apache.tinkerpop.gremlin.structure.Direction direction,
String... labels) |
long |
getCompareId()
Long identifier used to compare elements.
|
protected org.apache.tinkerpop.gremlin.structure.Vertex |
getVertexLabelInternal() |
Object |
id()
Returns a unique identifier for this entity.
|
boolean |
isModified()
Checks whether this entity has been loaded into the current transaction and modified.
|
boolean |
isTxOpen() |
InternalVertex |
it()
Returns this element in the context of the current transaction.
|
String |
label()
Returns the name of the vertex label for this vertex.
|
<V> Iterator<org.apache.tinkerpop.gremlin.structure.VertexProperty<V>> |
properties(String... keys) |
<V> JanusGraphVertexProperty<V> |
property(String key,
V value,
Object... keyValues) |
<V> JanusGraphVertexProperty<V> |
property(org.apache.tinkerpop.gremlin.structure.VertexProperty.Cardinality cardinality,
String key,
V value,
Object... keyValues) |
VertexCentricQueryBuilder |
query()
Starts a new
JanusGraphVertexQuery for this vertex. |
void |
remove()
Deletes this entity and any incident edges or properties from the graph.
|
String |
toString() |
StandardJanusGraphTx |
tx()
Returns the transaction to which the element is currently bound or should be refreshed into
|
<O> O |
valueOrNull(PropertyKey key)
Retrieves the value associated with the given key on this element and casts it to the specified type.
|
protected void |
verifyAccess() |
VertexLabel |
vertexLabel()
Returns the vertex label of this vertex.
|
Iterator<org.apache.tinkerpop.gremlin.structure.Vertex> |
vertices(org.apache.tinkerpop.gremlin.structure.Direction direction,
String... edgeLabels) |
clone, compare, compareTo, equals, hashCode, hasId, isInvisible, isLoaded, isNew, isRemoved, isTemporaryId, longId, setIdfinalize, getClass, notify, notifyAll, wait, wait, waitaddRelation, getAddedRelations, hasAddedRelations, hasLoadedRelations, hasRemovedRelations, loadRelations, removeRelationpropertygetLifeCycle, graph, isInvisible, setIdprotected AbstractVertex(StandardJanusGraphTx tx, long id)
public final InternalVertex it()
InternalElementit in interface InternalElementit in interface InternalVertexpublic final StandardJanusGraphTx tx()
InternalElementtx in interface InternalElementpublic final boolean isTxOpen()
public long getCompareId()
AbstractElementAbstractElement.longId()
but some instances of elements may be considered the same even if their ids differ. In that case,
this method should be overwritten to return an id that can be used for comparison.getCompareId in class AbstractElementpublic Object id()
JanusGraphElementThe unique identifier may only be set when the transaction in which entity is created commits. Some entities are never assigned a unique identifier if they depend on a parent entity.
JanusGraph allocates blocks of identifiers and automatically assigns identifiers to elements
automatically be default. This behavior can be partially overridden by setting
GraphDatabaseConfiguration.ALLOW_SETTING_VERTEX_ID
id in interface org.apache.tinkerpop.gremlin.structure.Elementid in interface JanusGraphElementJanusGraphElement.hasId()public boolean isModified()
JanusGraphVertexisModified in interface JanusGraphVertexprotected final void verifyAccess()
public void remove()
JanusGraphElementremove in interface org.apache.tinkerpop.gremlin.structure.Elementremove in interface JanusGraphElementremove in interface Removablepublic String label()
JanusGraphVertexlabel in interface org.apache.tinkerpop.gremlin.structure.Elementlabel in interface JanusGraphVertexprotected org.apache.tinkerpop.gremlin.structure.Vertex getVertexLabelInternal()
public VertexLabel vertexLabel()
JanusGraphVertexvertexLabel in interface JanusGraphVertexpublic VertexCentricQueryBuilder query()
JanusGraphVertexJanusGraphVertexQuery for this vertex.
Initializes and returns a new JanusGraphVertexQuery based on this vertex.
query in interface JanusGraphVertexquery in interface InternalVertexJanusGraphVertexQuerypublic <O> O valueOrNull(PropertyKey key)
JanusGraphElementvalueOrNull in interface JanusGraphElementkey - keypublic <V> JanusGraphVertexProperty<V> property(String key, V value, Object... keyValues)
property in interface org.apache.tinkerpop.gremlin.structure.Vertexproperty in interface JanusGraphVertexpublic <V> JanusGraphVertexProperty<V> property(@Nullable org.apache.tinkerpop.gremlin.structure.VertexProperty.Cardinality cardinality, String key, V value, Object... keyValues)
property in interface org.apache.tinkerpop.gremlin.structure.Vertexproperty in interface JanusGraphVertexpublic JanusGraphEdge addEdge(String label, org.apache.tinkerpop.gremlin.structure.Vertex vertex, Object... keyValues)
JanusGraphVertex
Creates and returns a new JanusGraphEdge of the specified label with this vertex being the outgoing vertex
and the given vertex being the incoming vertex.
Automatically creates the edge label if it does not exist and automatic creation of types is enabled. Otherwise,
this method with throw an IllegalArgumentException.
addEdge in interface org.apache.tinkerpop.gremlin.structure.VertexaddEdge in interface JanusGraphVertexlabel - label of the edge to be createdvertex - incoming vertex of the edge to be createdpublic Iterator<org.apache.tinkerpop.gremlin.structure.Edge> edges(org.apache.tinkerpop.gremlin.structure.Direction direction, String... labels)
edges in interface org.apache.tinkerpop.gremlin.structure.Vertexpublic <V> Iterator<org.apache.tinkerpop.gremlin.structure.VertexProperty<V>> properties(String... keys)
properties in interface org.apache.tinkerpop.gremlin.structure.Elementproperties in interface org.apache.tinkerpop.gremlin.structure.VertexCopyright © 2012–2023. All rights reserved.