From 2db55ac35d6f87abfbe5c05131c7d765b47a1a13 Mon Sep 17 00:00:00 2001 From: Michael Date: Mon, 25 Mar 2019 21:47:46 +0100 Subject: [PATCH] stationen haben nun eine reihenfolge innerhalb eines caches --- .../entities/StationReihenfolge.java | 53 +++++++++++++++++++ .../StationReihenfolgeRepository.java | 7 +++ 2 files changed, 60 insertions(+) create mode 100644 src/main/java/hhn/labsw/bugageocaching/entities/StationReihenfolge.java create mode 100644 src/main/java/hhn/labsw/bugageocaching/repositories/StationReihenfolgeRepository.java diff --git a/src/main/java/hhn/labsw/bugageocaching/entities/StationReihenfolge.java b/src/main/java/hhn/labsw/bugageocaching/entities/StationReihenfolge.java new file mode 100644 index 0000000..b51ef51 --- /dev/null +++ b/src/main/java/hhn/labsw/bugageocaching/entities/StationReihenfolge.java @@ -0,0 +1,53 @@ +package hhn.labsw.bugageocaching.entities; + +import javax.persistence.*; + +@Entity +@Table +public class StationReihenfolge { + + @Id + @GeneratedValue + private int id; + + @OneToOne + private Cache cache; + + @OneToOne + private Station station; + + @OneToOne + private Station nachfolgeStation; + + public int getId() { + return id; + } + + public void setId(int id) { + this.id = id; + } + + public Cache getCache() { + return cache; + } + + public void setCache(Cache cache) { + this.cache = cache; + } + + public Station getStation() { + return station; + } + + public void setStation(Station station) { + this.station = station; + } + + public Station getNachfolgeStation() { + return nachfolgeStation; + } + + public void setNachfolgeStation(Station nachfolgeStation) { + this.nachfolgeStation = nachfolgeStation; + } +} diff --git a/src/main/java/hhn/labsw/bugageocaching/repositories/StationReihenfolgeRepository.java b/src/main/java/hhn/labsw/bugageocaching/repositories/StationReihenfolgeRepository.java new file mode 100644 index 0000000..8897965 --- /dev/null +++ b/src/main/java/hhn/labsw/bugageocaching/repositories/StationReihenfolgeRepository.java @@ -0,0 +1,7 @@ +package hhn.labsw.bugageocaching.repositories; + +import hhn.labsw.bugageocaching.entities.StationReihenfolge; +import org.springframework.data.repository.CrudRepository; + +public interface StationReihenfolgeRepository extends CrudRepository { +}