Database Reference
In-Depth Information
<!-- Logging with SLF4J & LogBack -->
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>${slf4j.version}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<version>${logback.version}</version>
<scope>runtime</scope>
</dependency>
Our Maven-based Spring Data Neo4j project is ready with all its dependencies. Now we
need to create and configure our domain model, which will contain Movies, Actors, and
their associations, similar to what we created in Chapter 3 , Pattern Matching in Neo4j .
Let's perform the following steps to create and configure the domain model using Spring
Data Neo4j. All Java source files should be stored at Spring-
Neo4j\src\main\java .
1. Create an org.neo4j.spring.samples.domain.Artist.java class
with the following attributes:
package org.neo4j.spring.samples.domain;
import org.springframework.data.neo4j.annotation.*;
public class Artist {
private Long graphId;
private String id;
private String name;
private int year_Of_Birth;
}
2. Define the getters and setters for each of the properties defined in
Artist.java and you get a POJO.
Search WWH ::




Custom Search