public interface TitanElement extends org.apache.tinkerpop.gremlin.structure.Element, Idfiable, Removable
TitanRelation and TitanVertex.
Entities have a life cycle state which reflects the current state of the entity with respect
to the TitanTransaction in which it occurs. An entity may be in any one of these states
and any given time:
id()
(use hasId() to determine if a given entity has a unique ID).TitanVertex,
TitanRelation| Modifier and Type | Method and Description |
|---|---|
TitanTransaction |
graph() |
boolean |
hasId()
Checks whether this entity has a unique identifier.
|
default Object |
id()
Returns a unique identifier for this entity.
|
boolean |
isLoaded()
Checks whether this entity has been loaded into the current transaction and not yet 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.
|
long |
longId()
Unique identifier for this entity.
|
<V> org.apache.tinkerpop.gremlin.structure.Property<V> |
property(String key,
V value)
Sets the value for the given key on this element.
|
void |
remove()
Deletes this entity and any incident edges or properties from the graph.
|
<V> V |
valueOrNull(PropertyKey key)
Retrieves the value associated with the given key on this element and casts it to the specified type.
|
TitanTransaction graph()
graph in interface org.apache.tinkerpop.gremlin.structure.Elementdefault Object id()
GraphDatabaseConfiguration.ALLOW_SETTING_VERTEX_IDid in interface org.apache.tinkerpop.gremlin.structure.ElementIllegalStateException - if the entity does not (yet) have a unique identifierhasId()long longId()
id() for the permanent id.boolean hasId()
longId()void remove()
remove in interface org.apache.tinkerpop.gremlin.structure.Elementremove in interface RemovableIllegalStateException - if the entity cannot be deleted or if the user does not
have permission to remove the entity<V> org.apache.tinkerpop.gremlin.structure.Property<V> property(String key, V value)
Cardinality.SINGLE, otherwise this method throws an exception.property in interface org.apache.tinkerpop.gremlin.structure.Elementkey - the string identifying the keyvalue - the object value<V> V valueOrNull(PropertyKey key)
key - keyboolean isNew()
boolean isLoaded()
boolean isRemoved()
Copyright © 2012–2015. All rights reserved.