Database Reference
In-Depth Information
• Modeling node entities
• Modeling relationship entities
• Modeling relationships between node entities
We'll start with node entities.
9.2.3. Modeling node entities
Within SDN, a
node entity
refers to a Java class that's being used to represent a particular
domain entity represented and backed by a Neo4j node primitive in the underlying graph
database.
Figure 9.3
highlights candidate nodes within the social network domain model
that could be modeled as SDN node entities.
Figure 9.3. Social network model with nodes highlighted
The
Movie
and
User
classes are perfect examples here. The
@NodeEntity
annotation
is used to mark a class as a node entity, generally being placed just before the Java class
definition, as shown in
listing 9.2
and in the following snippet: