/** * A Role relationship entity between an actor and movie. * * @author Luanne Misquitta * @author Michael J. Simons */ @RelationshipEntity(type = "ACTED_IN") @NoArgsConstructor(force = true, access = AccessLevel.PRIVATE) @Getter public class Role { private @Id @GeneratedValue Long id; private @StartNode Actor actor; private String role; private @EndNode Movie movie; Role(Actor actor, String role, Movie movie) { this.actor = actor; this.role = role; this.movie = movie; } }
@StartNode private NewsSource newsSource;
@StartNode private NewsAuthor newsAuthor;
@StartNode private NewsArticle article;
@StartNode private NewsArticle newsArticle;
/** * @author vince */ public abstract class R { private Long id; @StartNode private A a; @EndNode private B b; public A getA() { return a; } public void setA(A a) { this.a = a; } public B getB() { return b; } public void setB(B b) { this.b = b; } }
/** * @author Frantisek Hartman */ @RelationshipEntity(type = "ASSOCIATED_WITH") public class Associated { private Long id; @StartNode Entity start; @EndNode Entity end; }
/** * @author Frantisek Hartman */ @RelationshipEntity(type = "FOUNDED") public class Founded { Long id; @StartNode Person person; @EndNode Entity organisation; }
@RelationshipEntity(type = "Arc") public static class Arc { Long id; Long created; @StartNode Vertex from; @EndNode Vertex to; } }
/** * @author vince */ @RelationshipEntity(type = "KNOWS") public class Knows { Long id; @StartNode Entity knower; @EndNode Entity knowee; }
@RelationshipEntity(type = "abstractDynamicProperty") public abstract class L<T> { Long id; private T property; @StartNode public SomeNode a; @EndNode public SomeOtherNode b; }
/** * @author Frantisek Hartman */ @RelationshipEntity(type = "ASSOCIATED_WITH") public class Associated<S extends Entity, T extends Entity> { private Long id; @StartNode S start; @EndNode T end; }
@RelationshipEntity(type = "GENERIC") public class GenericRelationship<S extends EntitySuperInterface, T extends EntitySuperInterface> { private Long id; @StartNode public S source; @EndNode public T target; }
/** * @author Frantisek Hartman */ @RelationshipEntity(type = "FOUNDED") public class Founded { Long id; @StartNode Person person; @EndNode Organisation organisation; }
/** * Relationship entity which is not referred from node entities * @author Frantisek Hartman */ @RelationshipEntity(type = "VISITED") public class Visited { Long id; @StartNode Person person; @EndNode Location location; Date when; }
/** * @author Nils Dr\u00F6ge */ @RelationshipEntity(type = "RELATED_TO") public class RichRelation { @StartNode public Person person; @EndNode public Article article; Long id; public RichRelation() { } }
@RelationshipEntity(type = "EDGE") public static class R { Long id; @StartNode A a; @EndNode B b; int number; @Override public String toString() { return this.getClass().getSimpleName() + ":" + a.id + "->" + b.id; } }
@RelationshipEntity(type = "EDGE") public static class R { Long id; @StartNode A a; @EndNode B b; int number; @Override public String toString() { return this.getClass().getSimpleName() + ":" + a.id + "->" + b.id; } } }
@RelationshipEntity(type = "EDGE") public static class R { Long id; String comments; Integer stars; @StartNode U u; @EndNode M m; public R() { } public R(U u, M m, String comments, Integer stars) { this.u = u; this.m = m; this.comments = comments; this.stars = stars; } }
/** * @author Vince Bickers */ @RelationshipEntity(type = "ACTS_IN") public class Role { Long id; String played; @StartNode Actor actor; @EndNode Movie movie; public Role() { } public Role(String character, Actor actor, Movie movie) { played = character; this.actor = actor; this.movie = movie; } }