diff --git a/community/graphdb-api/src/main/java/org/neo4j/graphdb/IdentifiablePropertyContainer.java b/community/graphdb-api/src/main/java/org/neo4j/graphdb/Entity.java similarity index 62% rename from community/graphdb-api/src/main/java/org/neo4j/graphdb/IdentifiablePropertyContainer.java rename to community/graphdb-api/src/main/java/org/neo4j/graphdb/Entity.java index d0ab3d906ae71..15d0674bf00b5 100644 --- a/community/graphdb-api/src/main/java/org/neo4j/graphdb/IdentifiablePropertyContainer.java +++ b/community/graphdb-api/src/main/java/org/neo4j/graphdb/Entity.java @@ -20,21 +20,21 @@ package org.neo4j.graphdb; /** - * Provides the ability to obtain the unique id of the implementing - * {@link PropertyContainer}. + * An Entity is a {@link PropertyContainer} that is persisted in the database, and identified by an {@link #getId() id}. + *

+ * {@link Node Nodes} and {@link Relationship Relationships} are Entities. */ -public interface IdentifiablePropertyContainer extends PropertyContainer +public interface Entity extends PropertyContainer { /** - * Returns the unique id of this {@link PropertyContainer}. Id's are garbage + * Returns the unique id of this Entity. Id's are garbage * collected over time so they are only guaranteed to be unique during a - * specific time span: if the {@link PropertyContainer} is deleted, it's - * likely that a new {@link PropertyContainer} at some point will get the old - * id. Note: this makes {@link PropertyContainer} id's brittle as + * specific time span: if the Entity is deleted, it's + * likely that a new Entity at some point will get the old + * id. Note: this makes Entity id's brittle as * public APIs. * - * @return The id of this {@link PropertyContainer} + * @return The id of this Entity. */ - long getId(); - + long getId(); } diff --git a/community/graphdb-api/src/main/java/org/neo4j/graphdb/Node.java b/community/graphdb-api/src/main/java/org/neo4j/graphdb/Node.java index 25a9c2eae46e0..0d153dfdf30b0 100644 --- a/community/graphdb-api/src/main/java/org/neo4j/graphdb/Node.java +++ b/community/graphdb-api/src/main/java/org/neo4j/graphdb/Node.java @@ -52,7 +52,7 @@ * when nodes and relationships are deleted, which means it's bad practice to * refer to them this way. Instead, use application generated ids. */ -public interface Node extends IdentifiablePropertyContainer +public interface Node extends Entity { /** * Returns the unique id of this node. Ids are garbage collected over time diff --git a/community/graphdb-api/src/main/java/org/neo4j/graphdb/Relationship.java b/community/graphdb-api/src/main/java/org/neo4j/graphdb/Relationship.java index 2f0a027a5fc7e..c6e2a603c1172 100644 --- a/community/graphdb-api/src/main/java/org/neo4j/graphdb/Relationship.java +++ b/community/graphdb-api/src/main/java/org/neo4j/graphdb/Relationship.java @@ -67,7 +67,7 @@ * when nodes and relationships are deleted, which means it's bad practice to * refer to them this way. Instead, use application generated ids. */ -public interface Relationship extends IdentifiablePropertyContainer +public interface Relationship extends Entity { /** * Returns the unique id of this relationship. Ids are garbage collected