Skip to content

Commit

Permalink
Rename IdentifiablePropertyContainer to Entity and clarify its de…
Browse files Browse the repository at this point in the history
…scription.
  • Loading branch information
chrisvest committed Oct 12, 2016
1 parent 1c8d303 commit c87d5fa
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
Expand Up @@ -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}.
* <p>
* {@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. <b>Note</b>: 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. <b>Note</b>: 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();
}
Expand Up @@ -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
Expand Down
Expand Up @@ -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
Expand Down

0 comments on commit c87d5fa

Please sign in to comment.