public abstract class JanusGraphLazyRelation<V> extends Object implements InternalRelation
Constructor and Description |
---|
JanusGraphLazyRelation(Entry dataEntry,
InternalVertex vertex,
StandardJanusGraphTx tx,
InternalRelationType type) |
JanusGraphLazyRelation(InternalRelation janusGraphRelation,
InternalVertex vertex,
StandardJanusGraphTx tx,
InternalRelationType type) |
Modifier and Type | Method and Description |
---|---|
org.apache.tinkerpop.gremlin.structure.Direction |
direction(org.apache.tinkerpop.gremlin.structure.Vertex vertex)
Returns the direction of this relation from the perspective of the specified vertex.
|
boolean |
equals(Object other) |
int |
getArity()
Number of vertices on this relation.
|
Object |
getCompareId() |
int |
getLen()
Number of vertices on this relation that are aware of its existence.
|
byte |
getLifeCycle() |
Iterable<PropertyKey> |
getPropertyKeysDirect() |
RelationType |
getType()
Returns the type of this relation.
|
<O> O |
getValueDirect(PropertyKey key) |
InternalVertex |
getVertex(int pos)
Returns the vertex at the given position (0=OUT, 1=IN) of this relation
|
JanusGraphTransaction |
graph() |
int |
hashCode() |
boolean |
hasId()
Checks whether this entity has a unique identifier.
|
Object |
id()
Returns a unique identifier for this entity.
|
boolean |
isEdge()
Checks whether this relation is an edge.
|
boolean |
isIncidentOn(org.apache.tinkerpop.gremlin.structure.Vertex vertex)
Checks whether this relation is incident on the specified vertex.
|
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 |
isLoop()
Checks whether this relation is a loop.
|
boolean |
isNew()
Checks whether this entity has been newly created in the current transaction.
|
boolean |
isProperty()
Checks whether this relation is a property.
|
boolean |
isRemoved()
Checks whether this entity has been deleted into the current transaction.
|
boolean |
isSingle() |
InternalRelation |
it()
Returns this relation in the current transactional context
|
String |
label() |
InternalRelation |
loadValue() |
long |
longId()
Returns the long-type representation of ID
|
<V> Iterator<? extends org.apache.tinkerpop.gremlin.structure.Property<V>> |
properties(String... propertyKeys) |
<V> org.apache.tinkerpop.gremlin.structure.Property<V> |
property(String s,
V v)
Sets the value for the given key on this element.
|
void |
remove()
Deletes this entity and any incident edges or properties from the graph.
|
<O> O |
removePropertyDirect(PropertyKey key) |
void |
setId(Object id) |
void |
setPropertyDirect(PropertyKey key,
Object value) |
String |
toString() |
StandardJanusGraphTx |
tx()
Returns the transaction to which the element is currently bound or should be refreshed into
|
V |
value() |
V |
value(String s)
Retrieves the value associated with the given key on this vertex and casts it to the specified type.
|
<V> V |
valueOrNull(PropertyKey propertyKey)
Retrieves the value associated with the given key on this element and casts it to the specified type.
|
public JanusGraphLazyRelation(InternalRelation janusGraphRelation, InternalVertex vertex, StandardJanusGraphTx tx, InternalRelationType type)
public JanusGraphLazyRelation(Entry dataEntry, InternalVertex vertex, StandardJanusGraphTx tx, InternalRelationType type)
public InternalRelation loadValue()
public V value()
public V value(String s)
JanusGraphRelation
value
in interface org.apache.tinkerpop.gremlin.structure.Element
value
in interface JanusGraphRelation
s
- string identifying a keypublic boolean isSingle()
public RelationType getType()
JanusGraphRelation
The type is either a label (EdgeLabel
if this relation is an edge or a key (PropertyKey
) if this
relation is a property.
getType
in interface JanusGraphRelation
public org.apache.tinkerpop.gremlin.structure.Direction direction(org.apache.tinkerpop.gremlin.structure.Vertex vertex)
JanusGraphRelation
direction
in interface JanusGraphRelation
vertex
- vertex on which the relation is incidentpublic boolean isIncidentOn(org.apache.tinkerpop.gremlin.structure.Vertex vertex)
JanusGraphRelation
isIncidentOn
in interface JanusGraphRelation
vertex
- vertex to check incidence forpublic boolean isLoop()
JanusGraphRelation
isLoop
in interface JanusGraphRelation
public boolean isProperty()
JanusGraphRelation
isProperty
in interface JanusGraphRelation
JanusGraphVertexProperty
public boolean isEdge()
JanusGraphRelation
isEdge
in interface JanusGraphRelation
JanusGraphEdge
public String label()
label
in interface org.apache.tinkerpop.gremlin.structure.Element
public StandardJanusGraphTx tx()
InternalElement
tx
in interface InternalElement
public JanusGraphTransaction graph()
graph
in interface org.apache.tinkerpop.gremlin.structure.Element
graph
in interface JanusGraphElement
graph
in interface InternalElement
public void setId(Object id)
setId
in interface InternalElement
public Object id()
JanusGraphElement
The 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.Element
id
in interface Idfiable
id
in interface JanusGraphElement
JanusGraphElement.hasId()
public Object getCompareId()
getCompareId
in interface InternalElement
public byte getLifeCycle()
getLifeCycle
in interface InternalElement
ElementLifeCycle
public boolean isInvisible()
InternalElement
isInvisible
in interface InternalElement
public long longId()
JanusGraphRelation
longId
in interface JanusGraphRelation
public boolean hasId()
JanusGraphElement
Note that some entities may never be assigned an identifier and others will only be assigned an identifier at the end of a transaction.
hasId
in interface JanusGraphElement
public void remove()
JanusGraphElement
remove
in interface org.apache.tinkerpop.gremlin.structure.Element
remove
in interface JanusGraphElement
remove
in interface Removable
public <V> Iterator<? extends org.apache.tinkerpop.gremlin.structure.Property<V>> properties(String... propertyKeys)
properties
in interface org.apache.tinkerpop.gremlin.structure.Element
public <V> org.apache.tinkerpop.gremlin.structure.Property<V> property(String s, V v)
JanusGraphElement
Cardinality.SINGLE
, otherwise this method throws an exception.property
in interface org.apache.tinkerpop.gremlin.structure.Element
property
in interface JanusGraphElement
s
- the string identifying the keyv
- the object valuepublic <V> V valueOrNull(PropertyKey propertyKey)
JanusGraphElement
valueOrNull
in interface JanusGraphElement
propertyKey
- keypublic boolean isNew()
JanusGraphElement
isNew
in interface JanusGraphElement
public boolean isLoaded()
JanusGraphElement
isLoaded
in interface JanusGraphElement
public boolean isRemoved()
JanusGraphElement
isRemoved
in interface JanusGraphElement
public InternalRelation it()
InternalRelation
it
in interface InternalElement
it
in interface InternalRelation
public InternalVertex getVertex(int pos)
InternalRelation
getVertex
in interface InternalRelation
public int getArity()
InternalRelation
getArity
in interface InternalRelation
public int getLen()
InternalRelation
InternalRelation.getArity()
getLen
in interface InternalRelation
public <O> O getValueDirect(PropertyKey key)
getValueDirect
in interface InternalRelation
public void setPropertyDirect(PropertyKey key, Object value)
setPropertyDirect
in interface InternalRelation
public Iterable<PropertyKey> getPropertyKeysDirect()
getPropertyKeysDirect
in interface InternalRelation
public <O> O removePropertyDirect(PropertyKey key)
removePropertyDirect
in interface InternalRelation
Copyright © 2012–2024. All rights reserved.