public abstract class AbstractTypedRelation extends AbstractElement implements InternalRelation
isProperty
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.
|
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
|
<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.
|
StandardTitanTx |
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, getCompareId, hashCode, hasId, isLoaded, isNew, isRemoved, isTemporaryId, longId, setId
finalize, getClass, notify, notifyAll, toString, wait, wait, wait
getArity, getLen, getPropertyKeysDirect, getValueDirect, getVertex, removePropertyDirect, setPropertyDirect
isEdge, isProperty
getLifeCycle, graph, setId
protected final InternalRelationType type
public AbstractTypedRelation(long id, RelationType type)
public InternalRelation it()
InternalRelation
it
in interface InternalElement
it
in interface InternalRelation
public final StandardTitanTx tx()
InternalElement
tx
in interface InternalElement
protected final void verifyAccess()
public org.apache.tinkerpop.gremlin.structure.Direction direction(org.apache.tinkerpop.gremlin.structure.Vertex vertex)
TitanRelation
direction
in interface TitanRelation
vertex
- vertex on which the relation is incidentpublic boolean isIncidentOn(org.apache.tinkerpop.gremlin.structure.Vertex vertex)
TitanRelation
isIncidentOn
in interface TitanRelation
vertex
- vertex to check incidence forpublic boolean isInvisible()
InternalElement
isInvisible
in interface InternalElement
isInvisible
in class AbstractElement
public boolean isLoop()
TitanRelation
isLoop
in interface TitanRelation
public RelationType getType()
TitanRelation
EdgeLabel
if this relation is an edge or a key (PropertyKey
) if this
relation is a property.getType
in interface TitanRelation
public RelationIdentifier id()
TitanElement
GraphDatabaseConfiguration.ALLOW_SETTING_VERTEX_ID
id
in interface TitanElement
id
in interface org.apache.tinkerpop.gremlin.structure.Element
TitanElement.hasId()
public <V> org.apache.tinkerpop.gremlin.structure.Property<V> property(String key, V value)
TitanElement
Cardinality.SINGLE
, otherwise this method throws an exception.property
in interface TitanElement
property
in interface org.apache.tinkerpop.gremlin.structure.Element
key
- the string identifying the keyvalue
- the object valuepublic <O> O valueOrNull(PropertyKey key)
TitanElement
valueOrNull
in interface TitanElement
key
- keypublic <O> O value(String key)
TitanRelation
value
in interface TitanRelation
value
in interface org.apache.tinkerpop.gremlin.structure.Element
key
- string identifying a keyCopyright © 2012–2015. All rights reserved.