package dk.thoerup.pictureposterservice; import java.util.Date; import java.util.Set; import javax.persistence.*; @Entity @Table(name="posting") public class Posting { @Id @GeneratedValue(strategy=GenerationType.IDENTITY) int id; @Column(name = "title") String title; @Column(name = "note") String note; @Column(name = "latitude") double latitude; @Column(name = "longitude") double longitude; @Column(name = "author") String author; @Column(name = "postdate") Date postdate; @OneToMany @JoinColumn(name="postId") Set comments; public int getId() { return id; } public String getTitle() { return title; } public void setTitle(String title) { this.title = title; } public String getNote() { return note; } public void setNote(String note) { this.note = note; } public double getLatitude() { return latitude; } public void setLatitude(double latitude) { this.latitude = latitude; } public double getLongitude() { return longitude; } public void setLongitude(double longitude) { this.longitude = longitude; } public String getAuthor() { return author; } public void setAuthor(String author) { this.author = author; } public Date getPostdate() { return postdate; } public void setPostdate(Date postdate) { this.postdate = postdate; } public Set getComments() { return comments; } public void setComments(Set comments) { this.comments = comments; } }