Commit e8d83881 by Tuukka Kivilahti

and more

1 parent ebf477aa
......@@ -88,6 +88,9 @@ public class Event implements ModelInterface {
@OneToMany(mappedBy = "event")
private List<Bill> bills;
@OneToMany(mappedBy = "event")
private List<Reader> readers;
public Event() {
}
......@@ -263,4 +266,18 @@ public class Event implements ModelInterface {
public void setBills(List<Bill> bills) {
this.bills = bills;
}
/**
* @return the readers
*/
public List<Reader> getReaders() {
return readers;
}
/**
* @param readers the readers to set
*/
public void setReaders(List<Reader> readers) {
this.readers = readers;
}
}
......@@ -55,6 +55,8 @@ public class EventMap implements ModelInterface {
@Version
@Column(nullable = false)
private int jpaVersionField;
@OneToMany(mappedBy = "eventMap")
private List<Reader> readers;
public EventMap() {
}
......@@ -155,4 +157,18 @@ public class EventMap implements ModelInterface {
public void setJpaVersionField(int jpaVersionField) {
this.jpaVersionField = jpaVersionField;
}
/**
* @return the readers
*/
public List<Reader> getReaders() {
return readers;
}
/**
* @param readers the readers to set
*/
public void setReaders(List<Reader> readers) {
this.readers = readers;
}
}
......@@ -54,6 +54,21 @@ public class Reader implements ModelInterface {
@ManyToOne
private Location location;
@ManyToOne
@JoinColumn(name = "events_id", referencedColumnName = "events_id")
private Event event;
@ManyToOne
@JoinColumn(name = "maps_id", referencedColumnName = "maps_id")
private EventMap eventMap;
@Column(name = "map_x")
private Integer mapX;
@Column(name = "map_y")
private Integer mapY;
@Version
@Column(nullable = false)
private int jpaVersionField;
......@@ -157,4 +172,60 @@ public class Reader implements ModelInterface {
public void setJpaVersionField(int jpaVersionField) {
this.jpaVersionField = jpaVersionField;
}
/**
* @return the event
*/
public Event getEvent() {
return event;
}
/**
* @param event the event to set
*/
public void setEvent(Event event) {
this.event = event;
}
/**
* @return the mapX
*/
public Integer getMapX() {
return mapX;
}
/**
* @param mapX the mapX to set
*/
public void setMapX(Integer mapX) {
this.mapX = mapX;
}
/**
* @return the mapY
*/
public Integer getMapY() {
return mapY;
}
/**
* @param mapY the mapY to set
*/
public void setMapY(Integer mapY) {
this.mapY = mapY;
}
/**
* @return the eventMap
*/
public EventMap getEventMap() {
return eventMap;
}
/**
* @param eventMap the eventMap to set
*/
public void setEventMap(EventMap eventMap) {
this.eventMap = eventMap;
}
}
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!