/** * 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; } }
/** * @author Frantisek Hartman */ @RelationshipEntity(type = "FOUNDED") public class Founded extends Associated<Person, Organisation> { Long id; }
@RelationshipEntity(type = "LAST_APPEARANCE") public class LastMovie extends BaseEdge<FilmActor, Movie> { public LastMovie() { super(); } public LastMovie(FilmActor start, Movie end, String title) { super(start, end, title); } }
/** * @author vince */ @RelationshipEntity(type = "IDENTITY_STATE") public class TimeRelation extends AbstractTimeRelation<IdentityNode, StateNode> { // empty by design }
@RelationshipEntity(type = "LAST_APPEARANCE") public class LastDrama extends BaseEdge<StageActor, Drama> { public LastDrama() { super(); } public LastDrama(StageActor start, Drama end, String title) { super(start, end, title); } }
/** * NB: this isn't actually used to save anything at the time of writing; it's just so we can test meta-data resolution for * relationship entities. * * @author Adam George */ @RelationshipEntity(type = "MEMBER_OF") public class ArbitraryRelationshipEntity { // nothing here yet }
/** * @author vince */ @RelationshipEntity(type = "CR") public class CR extends R { //some stuff here ... }
@RelationshipEntity(type = "PLAYED_IN") public class PlayedInMovie extends BaseEdge<FilmActor, Movie> { public PlayedInMovie() { super(); } public PlayedInMovie(FilmActor start, Movie end, String title) { super(start, end, title); } }
@RelationshipEntity(type = "PLAYED_IN") public class PlayedInDrama extends BaseEdge<StageActor, Drama> { public PlayedInDrama() { super(); } public PlayedInDrama(StageActor start, Drama end, String title) { super(start, end, title); } }
/** * @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; }
@RelationshipEntity(type = "LIKES") static class Likes { Long id; @Id String uuid; @StartNode User from; @EndNode User to; int stars; } }
@RelationshipEntity("PLAYS") public class Plays { @Id @GeneratedValue private Long id; @StartNode private User user; @EndNode private Hobby hobby; private String level; }