summaryrefslogtreecommitdiff
path: root/src/main/java/io/trygvis/model/Article.java
diff options
context:
space:
mode:
authorTrygve Laugstøl <trygvis@inamo.no>2013-04-10 09:03:37 +0200
committerTrygve Laugstøl <trygvis@inamo.no>2013-04-10 09:03:37 +0200
commit9cefd3bfc18d0706e6cd3b3595b36d9074a320f3 (patch)
tree36621658fbd09611061b5c9c9955c3807015b2b8 /src/main/java/io/trygvis/model/Article.java
downloadquartz-jpa-hibernate-spring-master.tar.gz
quartz-jpa-hibernate-spring-master.tar.bz2
quartz-jpa-hibernate-spring-master.tar.xz
quartz-jpa-hibernate-spring-master.zip
o Initial import.HEADmaster
Diffstat (limited to 'src/main/java/io/trygvis/model/Article.java')
-rwxr-xr-xsrc/main/java/io/trygvis/model/Article.java57
1 files changed, 57 insertions, 0 deletions
diff --git a/src/main/java/io/trygvis/model/Article.java b/src/main/java/io/trygvis/model/Article.java
new file mode 100755
index 0000000..6383e50
--- /dev/null
+++ b/src/main/java/io/trygvis/model/Article.java
@@ -0,0 +1,57 @@
+package io.trygvis.model;
+
+import java.util.Date;
+
+import javax.persistence.Entity;
+import javax.persistence.GeneratedValue;
+import javax.persistence.GenerationType;
+import javax.persistence.Id;
+import javax.persistence.SequenceGenerator;
+import javax.persistence.Table;
+
+@Entity
+public class Article {
+ @Id
+ @SequenceGenerator(name="id_seq", sequenceName="id_seq")
+ @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "id_seq")
+ private Integer id;
+ private Date created;
+ private Date updated;
+ private String title;
+ private String body;
+
+ @SuppressWarnings("UnusedDeclaration")
+ private Article() {
+ }
+
+ public Article(Date created, Date updated, String title, String body) {
+ this.created = created;
+ this.updated = updated;
+ this.title = title;
+ this.body = body;
+ }
+
+ public Integer getId() {
+ return id;
+ }
+
+ public Date getCreated() {
+ return created;
+ }
+
+ public Date getUpdated() {
+ return updated;
+ }
+
+ public void setUpdated(Date updated) {
+ this.updated = updated;
+ }
+
+ public String getTitle() {
+ return title;
+ }
+
+ public String getBody() {
+ return body;
+ }
+}