|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object i3.dragos.gm.core.id.GraphEntityID
public abstract class GraphEntityID
A GraphEntityID
is used to uniquely identify a graph entity.
The following two components are needed to identify a graph entity:
Additionally, the graph entity's type is also stored in this class. It is not
needed or used to identify the graph! It is only stored in this class so it
can be accessed more easily. See equals(Object)
for more discussion
on this.
The meta attributes of a graph entity and its ID are shared between them. See here for a discussion on this.
Constructor Summary | |
---|---|
protected |
GraphEntityID(DataSourceURL dataSourceURL,
java.io.Serializable internalIdentifier,
GraphEntityClassID type)
Constructs a new ID for a graph entity. |
Method Summary | |
---|---|
boolean |
equals(java.lang.Object o)
Checks for equality with another object. |
DataSourceURL |
getDataSourceURL()
Returns the URL to the data source that stores the graph entity represented by this ID. |
GraphEntity |
getGraphEntity()
Returns the graph entity referenced by this ID. |
GraphEntityClassID |
getGraphEntityClassID()
Returns the graph entity's type. |
java.io.Serializable |
getInternalIdentifier()
Returns the internal identifier used to uniquely identify this object in the storage backend. |
int |
hashCode()
|
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
protected GraphEntityID(DataSourceURL dataSourceURL, java.io.Serializable internalIdentifier, GraphEntityClassID type) throws java.lang.IllegalArgumentException
dataSourceURL
- The URL of the data source where this Graph is
stored.internalIdentifier
- Internal graph entity ID (given by the data
source).type
- Type of the graph entity.
java.lang.IllegalArgumentException
- if dataSourceURL, id, or type is
null
.Method Detail |
---|
public GraphEntity getGraphEntity() throws DragosException
DragosException
- in case of internal errors.public final DataSourceURL getDataSourceURL()
null
.
public final java.io.Serializable getInternalIdentifier()
public final GraphEntityClassID getGraphEntityClassID()
null
.
public boolean equals(java.lang.Object o)
This object is considered equal if all of the following conditions are met:
o != null
o instanceof GraphEntityID
getDataSourceURL().equals(((GraphEntityID) o).getDataSourceURL())
getInternalIdentifier().equals(((GraphEntityID) o).getInternalIdentifier())
Subclasses and implementations might want to extend this list by adding
assertions comparing additional or internal data (e.g. the type of the
graph entity). However, equality must only be determined by the above
rules, preferably by using super.equals(o)
, and any
difference in the additional data for two equal IDs is an error.
equals
in class java.lang.Object
o
- The Object to compare to.
true
if o
is equal according to
above rules, false
otherwise.public final int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |