I recently started to explore graph DB’s, and I’ve decided to work more with neo4j. I understand that the nodes and edges in neo4j DB are arbitrary, and that one or more properties (key-value pairs, where the values must be of primitive types only) can be assigned to the nodes and relationships.
Is there a way to make objects of my own classes as NODES and EDGES, so that the proprties of the nodes and edges are encapsulated in the objects themselves?
You mean a way of object-graph mapping?
You could look into Spring Data Neo4j or other mapping approaches like jo4neo or TinkerPop Frames.
an Example from Spring Data Neo4j