public abstract class AbstractVertex extends AbstractElement implements InternalVertex, org.apache.tinkerpop.gremlin.structure.Vertex
Modifier | Constructor and Description |
---|---|
protected |
AbstractVertex(StandardJanusGraphTx tx,
Object 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) |
Object |
getCompareId()
Long identifier used to compare elements.
|
protected org.apache.tinkerpop.gremlin.structure.Vertex |
getVertexLabelInternal() |
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, id, isInvisible, isLoaded, isNew, isRemoved, isTemporaryId, setId
finalize, getClass, notify, notifyAll, wait, wait, wait
addRelation, getAddedRelations, hasAddedRelations, hasLoadedRelations, hasRemovedRelations, loadRelations, removeRelation
property
getLifeCycle, graph, isInvisible, setId
protected AbstractVertex(StandardJanusGraphTx tx, Object id)
public final InternalVertex it()
InternalElement
it
in interface InternalElement
it
in interface InternalVertex
public final StandardJanusGraphTx tx()
InternalElement
tx
in interface InternalElement
public final boolean isTxOpen()
public Object getCompareId()
AbstractElement
AbstractElement.id()
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 AbstractElement
public boolean isModified()
JanusGraphVertex
isModified
in interface JanusGraphVertex
protected final void verifyAccess()
public void remove()
JanusGraphElement
remove
in interface org.apache.tinkerpop.gremlin.structure.Element
remove
in interface JanusGraphElement
remove
in interface Removable
public String label()
JanusGraphVertex
label
in interface org.apache.tinkerpop.gremlin.structure.Element
label
in interface JanusGraphVertex
protected org.apache.tinkerpop.gremlin.structure.Vertex getVertexLabelInternal()
public VertexLabel vertexLabel()
JanusGraphVertex
vertexLabel
in interface JanusGraphVertex
public VertexCentricQueryBuilder query()
JanusGraphVertex
JanusGraphVertexQuery
for this vertex.
Initializes and returns a new JanusGraphVertexQuery
based on this vertex.
query
in interface JanusGraphVertex
query
in interface InternalVertex
JanusGraphVertexQuery
public <O> O valueOrNull(PropertyKey key)
JanusGraphElement
valueOrNull
in interface JanusGraphElement
key
- keypublic <V> JanusGraphVertexProperty<V> property(String key, V value, Object... keyValues)
property
in interface org.apache.tinkerpop.gremlin.structure.Vertex
property
in interface JanusGraphVertex
public <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.Vertex
property
in interface JanusGraphVertex
public 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.Vertex
addEdge
in interface JanusGraphVertex
label
- 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.Vertex
public <V> Iterator<org.apache.tinkerpop.gremlin.structure.VertexProperty<V>> properties(String... keys)
properties
in interface org.apache.tinkerpop.gremlin.structure.Element
properties
in interface org.apache.tinkerpop.gremlin.structure.Vertex
Copyright © 2012–2023. All rights reserved.