public class EmptyVertex extends Object implements InternalVertex
Constructor and Description |
---|
EmptyVertex() |
Modifier and Type | Method and Description |
---|---|
TitanEdge |
addEdge(String s,
org.apache.tinkerpop.gremlin.structure.Vertex vertex,
Object... keyValues)
Creates a new edge incident on this vertex.
|
boolean |
addRelation(InternalRelation e)
Add a new relation to the vertex
|
Iterator<org.apache.tinkerpop.gremlin.structure.Edge> |
edges(org.apache.tinkerpop.gremlin.structure.Direction direction,
String... edgeLabels) |
List<InternalRelation> |
getAddedRelations(com.google.common.base.Predicate<InternalRelation> query)
Returns an iterable over all newly added relations incident on this vertex that match the given predicate
|
byte |
getLifeCycle() |
boolean |
hasAddedRelations()
Whether this vertex has added relations
|
boolean |
hasId()
Checks whether this entity has a unique identifier.
|
boolean |
hasLoadedRelations(SliceQuery query)
Returns true if the results for the given query have already been loaded for this vertex and are locally cached.
|
boolean |
hasRemovedRelations()
Whether this vertex has removed relations
|
Object |
id()
Returns a unique identifier for this entity.
|
boolean |
isInvisible()
Whether this element is invisible and should only be returned to queries that explicitly ask for invisible elements.
|
boolean |
isLoaded()
Checks whether this entity has been loaded into the current transaction and not yet modified.
|
boolean |
isModified()
Checks whether this entity has been loaded into the current transaction and modified.
|
boolean |
isNew()
Checks whether this entity has been newly created in the current transaction.
|
boolean |
isRemoved()
Checks whether this entity has been deleted into the current transaction.
|
InternalVertex |
it()
Returns this element in the context of the current transaction.
|
String |
label()
Returns the name of the vertex label for this vertex.
|
EntryList |
loadRelations(SliceQuery query,
Retriever<SliceQuery,EntryList> lookup)
Returns all relations that match the given query.
|
long |
longId()
Unique identifier for this entity.
|
<V> Iterator<org.apache.tinkerpop.gremlin.structure.VertexProperty<V>> |
properties(String... propertyKeys) |
<V> TitanVertexProperty<V> |
property(String key,
V value,
Object... keyValues) |
<V> TitanVertexProperty<V> |
property(org.apache.tinkerpop.gremlin.structure.VertexProperty.Cardinality cardinality,
String key,
V value,
Object... keyValues) |
VertexCentricQueryBuilder |
query()
Starts a new
TitanVertexQuery for this vertex. |
void |
remove()
Deletes this entity and any incident edges or properties from the graph.
|
void |
removeRelation(InternalRelation e)
Deleted relation e from the adjacency list of this vertex and updates the state of the vertex to reflect
the modification.
|
void |
setId(long id) |
StandardTitanTx |
tx()
Returns the transaction to which the element is currently bound or should be refreshed into
|
<O> O |
value(String key) |
<O> O |
valueOrNull(PropertyKey key)
Retrieves the value associated with the given key on this element and casts it to the specified type.
|
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, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
property
graph
public VertexCentricQueryBuilder query()
TitanVertex
TitanVertexQuery
for this vertex.
Initializes and returns a new TitanVertexQuery
based on this vertex.query
in interface TitanVertex
query
in interface InternalVertex
TitanVertexQuery
public List<InternalRelation> getAddedRelations(com.google.common.base.Predicate<InternalRelation> query)
InternalVertex
getAddedRelations
in interface InternalVertex
public EntryList loadRelations(SliceQuery query, Retriever<SliceQuery,EntryList> lookup)
InternalVertex
Retriever
to retrieve the edges from backend storage.loadRelations
in interface InternalVertex
public boolean hasLoadedRelations(SliceQuery query)
InternalVertex
hasLoadedRelations
in interface InternalVertex
public boolean hasRemovedRelations()
InternalVertex
hasRemovedRelations
in interface InternalVertex
public boolean hasAddedRelations()
InternalVertex
hasAddedRelations
in interface InternalVertex
public String label()
TitanVertex
label
in interface TitanVertex
label
in interface org.apache.tinkerpop.gremlin.structure.Element
public VertexLabel vertexLabel()
TitanVertex
vertexLabel
in interface TitanVertex
public <O> O valueOrNull(PropertyKey key)
TitanElement
valueOrNull
in interface TitanElement
key
- keypublic <O> O value(String key)
value
in interface org.apache.tinkerpop.gremlin.structure.Element
public <V> TitanVertexProperty<V> property(String key, V value, Object... keyValues)
property
in interface TitanVertex
property
in interface org.apache.tinkerpop.gremlin.structure.Vertex
public <V> TitanVertexProperty<V> property(org.apache.tinkerpop.gremlin.structure.VertexProperty.Cardinality cardinality, String key, V value, Object... keyValues)
property
in interface TitanVertex
property
in interface org.apache.tinkerpop.gremlin.structure.Vertex
public Iterator<org.apache.tinkerpop.gremlin.structure.Edge> edges(org.apache.tinkerpop.gremlin.structure.Direction direction, String... edgeLabels)
edges
in interface org.apache.tinkerpop.gremlin.structure.Vertex
public Iterator<org.apache.tinkerpop.gremlin.structure.Vertex> vertices(org.apache.tinkerpop.gremlin.structure.Direction direction, String... edgeLabels)
vertices
in interface org.apache.tinkerpop.gremlin.structure.Vertex
public boolean addRelation(InternalRelation e)
InternalVertex
addRelation
in interface InternalVertex
public void removeRelation(InternalRelation e)
InternalVertex
removeRelation
in interface InternalVertex
e
- TitanRelation to be removedpublic TitanEdge addEdge(String s, org.apache.tinkerpop.gremlin.structure.Vertex vertex, Object... keyValues)
TitanVertex
TitanEdge
of the specified label with this vertex being the outgoing vertex
and the given vertex being the incoming vertex.
IllegalArgumentException
.addEdge
in interface TitanVertex
addEdge
in interface org.apache.tinkerpop.gremlin.structure.Vertex
s
- label of the edge to be createdvertex
- incoming vertex of the edge to be createdpublic long longId()
TitanElement
TitanElement.id()
for the permanent id.longId
in interface Idfiable
longId
in interface TitanElement
public Object id()
TitanElement
GraphDatabaseConfiguration.ALLOW_SETTING_VERTEX_ID
id
in interface TitanElement
id
in interface org.apache.tinkerpop.gremlin.structure.Element
TitanElement.hasId()
public boolean hasId()
TitanElement
hasId
in interface TitanElement
TitanElement.longId()
public void remove()
TitanElement
remove
in interface TitanElement
remove
in interface Removable
remove
in interface org.apache.tinkerpop.gremlin.structure.Element
public <V> Iterator<org.apache.tinkerpop.gremlin.structure.VertexProperty<V>> properties(String... propertyKeys)
properties
in interface org.apache.tinkerpop.gremlin.structure.Element
properties
in interface org.apache.tinkerpop.gremlin.structure.Vertex
public void setId(long id)
setId
in interface InternalElement
public byte getLifeCycle()
getLifeCycle
in interface InternalElement
ElementLifeCycle
public boolean isInvisible()
InternalElement
isInvisible
in interface InternalElement
public boolean isRemoved()
TitanElement
isRemoved
in interface TitanElement
public boolean isLoaded()
TitanElement
isLoaded
in interface TitanElement
public boolean isModified()
TitanVertex
isModified
in interface TitanVertex
public boolean isNew()
TitanElement
isNew
in interface TitanElement
public InternalVertex it()
InternalElement
it
in interface InternalElement
it
in interface InternalVertex
public StandardTitanTx tx()
InternalElement
tx
in interface InternalElement
Copyright © 2012–2015. All rights reserved.