public abstract class AbstractTypedRelation extends AbstractElement implements InternalRelation
| Modifier and Type | Field and Description |
|---|---|
protected InternalRelationType |
type |
| Constructor and Description |
|---|
AbstractTypedRelation(long id,
RelationType 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.
|
protected Object |
getCompareId()
Long identifier used to compare elements.
|
RelationType |
getType()
Returns the type of this relation.
|
RelationIdentifier |
id()
Returns a unique identifier for this entity.
|
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 |
isLoop()
Checks whether this relation is a loop.
|
InternalRelation |
it()
Returns this relation in the current transactional context
|
long |
longId()
Returns the long-type representation of ID
|
<V> Iterator<org.apache.tinkerpop.gremlin.structure.Property<V>> |
properties(String... keyNames) |
<V> org.apache.tinkerpop.gremlin.structure.Property<V> |
property(String key,
V value)
Sets the value for the given key on this element.
|
StandardJanusGraphTx |
tx()
Returns the transaction to which the element is currently bound or should be refreshed into
|
<O> O |
value(String key)
Retrieves the value associated with the given key on this vertex and casts it to the specified type.
|
<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()
Cannot currently throw exception when removed since internal logic relies on access to the edge
beyond its removal.
|
clone, compare, compareTo, equals, hashCode, hasId, isLoaded, isNew, isRemoved, isTemporaryId, setIdfinalize, getClass, notify, notifyAll, toString, wait, wait, waitgetArity, getLen, getPropertyKeysDirect, getValueDirect, getVertex, removePropertyDirect, setPropertyDirectisEdge, isPropertygetLifeCycle, graph, setIdprotected final InternalRelationType type
public AbstractTypedRelation(long id,
RelationType type)
public InternalRelation it()
InternalRelationit in interface InternalElementit in interface InternalRelationpublic final StandardJanusGraphTx tx()
InternalElementtx in interface InternalElementprotected final void verifyAccess()
public org.apache.tinkerpop.gremlin.structure.Direction direction(org.apache.tinkerpop.gremlin.structure.Vertex vertex)
JanusGraphRelationdirection in interface JanusGraphRelationvertex - vertex on which the relation is incidentpublic boolean isIncidentOn(org.apache.tinkerpop.gremlin.structure.Vertex vertex)
JanusGraphRelationisIncidentOn in interface JanusGraphRelationvertex - vertex to check incidence forpublic boolean isInvisible()
InternalElementisInvisible in interface InternalElementisInvisible in class AbstractElementpublic boolean isLoop()
JanusGraphRelationisLoop in interface JanusGraphRelationpublic 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 JanusGraphRelationpublic long longId()
JanusGraphRelationlongId in interface JanusGraphRelationpublic RelationIdentifier 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 Idfiableid in interface JanusGraphElementid in class AbstractElementJanusGraphElement.hasId()public <V> org.apache.tinkerpop.gremlin.structure.Property<V> property(String key, V value)
JanusGraphElementCardinality.SINGLE, otherwise this method throws an exception.property in interface org.apache.tinkerpop.gremlin.structure.Elementproperty in interface JanusGraphElementkey - the string identifying the keyvalue - the object valuepublic <O> O valueOrNull(PropertyKey key)
JanusGraphElementvalueOrNull in interface JanusGraphElementkey - keyprotected Object getCompareId()
AbstractElementAbstractElement.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 AbstractElementpublic <O> O value(String key)
JanusGraphRelationvalue in interface org.apache.tinkerpop.gremlin.structure.Elementvalue in interface JanusGraphRelationkey - string identifying a keyCopyright © 2012–2024. All rights reserved.