-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPerson_origin.java
More file actions
50 lines (35 loc) · 908 Bytes
/
Person_origin.java
File metadata and controls
50 lines (35 loc) · 908 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
package history.spring.data.neo4j.domain;
import com.fasterxml.jackson.annotation.JsonIdentityInfo;
import com.fasterxml.jackson.annotation.ObjectIdGenerators;
import org.neo4j.ogm.annotation.GraphId;
import org.neo4j.ogm.annotation.NodeEntity;
import org.neo4j.ogm.annotation.Relationship;
import java.util.ArrayList;
import java.util.List;
@JsonIdentityInfo(generator=ObjectIdGenerators.PropertyGenerator.class, property="id")
@NodeEntity
public class Person_origin {
@GraphId
private Long id;
private String name;
private int born;
@Relationship(type = "ACTED_IN")
private List<Movie> movies = new ArrayList<>();
public Person_origin() {
}
public Person_origin(String name) {
this.name = name;
}
public Long getId() {
return id;
}
public String getName() {
return name;
}
public int getBorn() {
return born;
}
public List<Movie> getMovies() {
return movies;
}
}