public interface TitanElement extends com.tinkerpop.blueprints.Element, Idfiable, Comparable<TitanElement>, 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:
getId()
(use hasId() to determine if a given entity has a unique ID).TitanVertex,
TitanRelation| Modifier and Type | Method and Description |
|---|---|
Object |
getId()
Returns a unique identifier for this entity.
|
long |
getID()
Unique identifier for this entity.
|
<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(String key)
Retrieves the value associated with the given key on this vertex and casts it to the specified type.
|
boolean |
hasId()
Checks whether this entity has a unique identifier.
|
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.
|
void |
remove()
Deletes this entity and any incident edges or properties from the graph.
|
<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(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.
|
compareToObject getId()
getId in interface com.tinkerpop.blueprints.ElementIllegalStateException - if the entity does not (yet) have a unique identifierhasId()long getID()
getId() for the permanent id.boolean hasId()
getID()void remove()
remove in interface com.tinkerpop.blueprints.Elementremove in interface RemovableIllegalStateException - if the entity cannot be deleted or if the user does not
have permission to remove the entityvoid setProperty(String key, Object value)
Cardinality.SINGLE, otherwise this method throws an exception.setProperty in interface com.tinkerpop.blueprints.Elementkey - the string identifying the keyvalue - the object valuevoid setProperty(PropertyKey key, Object value)
Cardinality.SINGLE, otherwise this method throws an exception.key - the keyvalue - the object value<O> O getProperty(PropertyKey key)
key - key<O> O getProperty(String key)
getProperty in interface com.tinkerpop.blueprints.Elementkey - string identifying a key<O> O removeProperty(String key)
removeProperty in interface com.tinkerpop.blueprints.Elementkey - the string identifying the keyremoveProperty(RelationType)<O> O removeProperty(RelationType type)
type - the keyboolean isNew()
boolean isLoaded()
boolean isRemoved()
Copyright © 2012–2014. All rights reserved.