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 |
|---|---|
com.tinkerpop.blueprints.Direction |
getDirection(TitanVertex vertex)
Returns the direction of this relation from the perspective of the specified vertex.
|
RelationIdentifier |
getId()
Returns a unique identifier for this entity.
|
TitanVertex |
getProperty(EdgeLabel label)
Returns the vertex associated to this relation by a unidirected edge of the given label or NULL if such does not exist.
|
<O> O |
getProperty(PropertyKey key)
Retrieves the value associated with the given key on this vertex and casts it to the specified type.
|
<O> O |
getProperty(RelationType type) |
<O> O |
getProperty(String key)
Retrieves the value associated with the given key on this vertex and casts it to the specified type.
|
Set<String> |
getPropertyKeys() |
RelationType |
getType()
Returns the type of this relation.
|
boolean |
isHidden()
Whether this element is hidden and should only be returned to queries that explicitly ask for hidden elements.
|
boolean |
isIncidentOn(TitanVertex vertex)
Checks whether this relation is incident on the specified vertex.
|
boolean |
isLoop()
Checks whether this relation is a loop.
|
InternalRelation |
it()
Returns this element in the context of the current transaction.
|
<O> O |
removeProperty(RelationType type)
Removes the value associated with the given key for this vertex (if exists).
|
<O> O |
removeProperty(String key)
Removes the value associated with the given key for this vertex (if exists).
|
void |
setProperty(EdgeLabel label,
TitanVertex vertex)
Establishes a unidirectional edge between this relation and the given vertex for the specified label.
|
void |
setProperty(PropertyKey key,
Object value)
Sets the value for the given key on this element.
|
void |
setProperty(String key,
Object 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
|
clone, compareTo, equals, getCompareId, getID, hashCode, hasId, isImplicitId, isLoaded, isNew, isRemoved, isTemporaryId, setIDfinalize, getClass, notify, notifyAll, toString, wait, wait, waitgetArity, getLen, getPropertyDirect, getPropertyKeysDirect, getVertex, removePropertyDirect, setPropertyDirectisEdge, isPropertygetLifeCycle, setIDgetID, hasId, isLoaded, isNew, isRemoved, removecompareToprotected final InternalRelationType type
public AbstractTypedRelation(long id,
RelationType type)
public InternalRelation it()
InternalElementit in interface InternalElementit in interface InternalRelationpublic final StandardTitanTx tx()
InternalElementtx in interface InternalElementpublic com.tinkerpop.blueprints.Direction getDirection(TitanVertex vertex)
TitanRelationgetDirection in interface TitanRelationvertex - vertex on which the relation is incidentpublic boolean isIncidentOn(TitanVertex vertex)
TitanRelationisIncidentOn in interface TitanRelationvertex - vertex to check incidence forpublic boolean isHidden()
InternalElementisHidden in interface InternalElementisHidden in class AbstractElementpublic boolean isLoop()
TitanRelationisLoop in interface TitanRelationpublic RelationType getType()
TitanRelationEdgeLabel if this relation is an edge or a key (PropertyKey) if this
relation is a property.getType in interface TitanRelationpublic RelationIdentifier getId()
TitanElementgetId in interface TitanElementgetId in interface com.tinkerpop.blueprints.ElementTitanElement.hasId()public <O> O removeProperty(String key)
TitanElementremoveProperty in interface TitanElementremoveProperty in interface com.tinkerpop.blueprints.Elementkey - the string identifying the keyTitanElement.removeProperty(RelationType)public <O> O removeProperty(RelationType type)
TitanElementremoveProperty in interface TitanElementtype - the keypublic void setProperty(EdgeLabel label, TitanVertex vertex)
TitanRelationEdgeLabel.isUnidirected().setProperty in interface TitanRelationpublic void setProperty(PropertyKey key, Object value)
TitanElementCardinality.SINGLE, otherwise this method throws an exception.setProperty in interface TitanElementkey - the keyvalue - the object valuepublic void setProperty(String key, Object value)
TitanElementCardinality.SINGLE, otherwise this method throws an exception.setProperty in interface TitanElementsetProperty in interface com.tinkerpop.blueprints.Elementkey - the string identifying the keyvalue - the object valuepublic <O> O getProperty(PropertyKey key)
TitanElementgetProperty in interface TitanElementkey - keypublic <O> O getProperty(String key)
TitanElementgetProperty in interface TitanElementgetProperty in interface com.tinkerpop.blueprints.Elementkey - string identifying a keypublic TitanVertex getProperty(EdgeLabel label)
TitanRelationgetProperty in interface TitanRelationpublic <O> O getProperty(RelationType type)
getProperty in interface InternalRelationCopyright © 2012–2014. All rights reserved.