public abstract class AbstractElement extends Object implements InternalElement, Comparable<TitanElement>
Constructor and Description |
---|
AbstractElement(long id) |
Modifier and Type | Method and Description |
---|---|
InternalVertex |
clone() |
static int |
compare(TitanElement e1,
TitanElement e2) |
int |
compareTo(TitanElement other) |
boolean |
equals(Object other) |
protected long |
getCompareId()
Long identifier used to compare elements.
|
int |
hashCode() |
boolean |
hasId()
Checks whether this entity has a unique identifier.
|
boolean |
isInvisible()
Whether this element is invisible and should only be returned to queries that explicitly ask for invisible elements.
|
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.
|
static boolean |
isTemporaryId(long elementId) |
long |
longId()
Unique identifier for this entity.
|
void |
setId(long id) |
finalize, getClass, notify, notifyAll, toString, wait, wait, wait
getLifeCycle, graph, it, tx
id, property, remove, valueOrNull
public static boolean isTemporaryId(long elementId)
public int compareTo(TitanElement other)
compareTo
in interface Comparable<TitanElement>
public static int compare(TitanElement e1, TitanElement e2)
public InternalVertex clone() throws CloneNotSupportedException
clone
in class Object
CloneNotSupportedException
protected long getCompareId()
longId()
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.public long longId()
TitanElement
TitanElement.id()
for the permanent id.longId
in interface Idfiable
longId
in interface TitanElement
public boolean hasId()
TitanElement
hasId
in interface TitanElement
TitanElement.longId()
public void setId(long id)
setId
in interface InternalElement
public boolean isInvisible()
InternalElement
isInvisible
in interface InternalElement
public boolean isNew()
TitanElement
isNew
in interface TitanElement
public boolean isLoaded()
TitanElement
isLoaded
in interface TitanElement
public boolean isRemoved()
TitanElement
isRemoved
in interface TitanElement
Copyright © 2012–2015. All rights reserved.