From 2c95216c92993279652db12fa2355311d8569d7a Mon Sep 17 00:00:00 2001 From: snoop Date: Thu, 22 Jun 2017 21:35:38 +0900 Subject: [PATCH] fixed --- .../overflow/module/member/model/Member.java | 9 ++++--- .../overflow/module/probe/model/Probe.java | 25 ++++++++++--------- .../overflow/module/sensor/model/Sensor.java | 15 +++++------ .../module/sensor/model/SensorItem.java | 9 ++++--- 4 files changed, 31 insertions(+), 27 deletions(-) diff --git a/src/main/java/com/loafle/overflow/module/member/model/Member.java b/src/main/java/com/loafle/overflow/module/member/model/Member.java index f722a70..9131ee5 100644 --- a/src/main/java/com/loafle/overflow/module/member/model/Member.java +++ b/src/main/java/com/loafle/overflow/module/member/model/Member.java @@ -4,6 +4,7 @@ import com.loafle.overflow.meta.MetaMemberStatus; import javax.persistence.*; import java.sql.Timestamp; +import java.util.Date; /** * Created by root on 17. 6. 22. @@ -18,7 +19,7 @@ public class Member { private String name; private String phone; private String companyName; - private Timestamp createDate; + private Date createDate; private MetaMemberStatus status; @Id @@ -91,13 +92,13 @@ public class Member { this.companyName = companyName; } - @Basic + @Temporal(TemporalType.TIMESTAMP) @Column(name = "CREATE_DATE", nullable = false, columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP", insertable = false, updatable = false) - public Timestamp getCreateDate() { + public Date getCreateDate() { return createDate; } - public void setCreateDate(Timestamp createDate) { + public void setCreateDate(Date createDate) { this.createDate = createDate; } diff --git a/src/main/java/com/loafle/overflow/module/probe/model/Probe.java b/src/main/java/com/loafle/overflow/module/probe/model/Probe.java index dfcabf8..fddc12e 100644 --- a/src/main/java/com/loafle/overflow/module/probe/model/Probe.java +++ b/src/main/java/com/loafle/overflow/module/probe/model/Probe.java @@ -4,6 +4,7 @@ import com.loafle.overflow.module.domain.Domain; import javax.persistence.*; import java.sql.Timestamp; +import java.util.Date; /** * Created by root on 17. 6. 22. @@ -14,9 +15,9 @@ public class Probe { private long id; private String status; private String description; - private Timestamp createDate; - private Timestamp lastPollingDate; - private Timestamp nextPollingDate; + private Date createDate; + private Date lastPollingDate; + private Date nextPollingDate; private Domain domain; private String probeKey; private String encryptionKey; @@ -51,33 +52,33 @@ public class Probe { this.description = description; } - + @Temporal(TemporalType.TIMESTAMP) @Column(name = "CREATE_DATE", nullable = false) - public Timestamp getCreateDate() { + public Date getCreateDate() { return createDate; } - public void setCreateDate(Timestamp createDate) { + public void setCreateDate(Date createDate) { this.createDate = createDate; } - + @Temporal(TemporalType.TIMESTAMP) @Column(name = "LAST_POLLING_DATE", nullable = false, columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP", insertable = false, updatable = false) - public Timestamp getLastPollingDate() { + public Date getLastPollingDate() { return lastPollingDate; } - public void setLastPollingDate(Timestamp lastPollingDate) { + public void setLastPollingDate(Date lastPollingDate) { this.lastPollingDate = lastPollingDate; } - + @Temporal(TemporalType.TIMESTAMP) @Column(name = "NEXT_POLLING_DATE", nullable = true) - public Timestamp getNextPollingDate() { + public Date getNextPollingDate() { return nextPollingDate; } - public void setNextPollingDate(Timestamp nextPollingDate) { + public void setNextPollingDate(Date nextPollingDate) { this.nextPollingDate = nextPollingDate; } diff --git a/src/main/java/com/loafle/overflow/module/sensor/model/Sensor.java b/src/main/java/com/loafle/overflow/module/sensor/model/Sensor.java index 54b213b..63e9059 100644 --- a/src/main/java/com/loafle/overflow/module/sensor/model/Sensor.java +++ b/src/main/java/com/loafle/overflow/module/sensor/model/Sensor.java @@ -5,6 +5,7 @@ import com.loafle.overflow.module.target.model.Target; import javax.persistence.*; import java.sql.Timestamp; +import java.util.Date; /** * Created by root on 17. 6. 22. @@ -13,7 +14,7 @@ import java.sql.Timestamp; @Table(name = "TBL_SENSOR", schema = "public", catalog = "postgres") public class Sensor { private long id; - private Timestamp createDate; + private Date createDate; private String desc; private String status; private Target target; @@ -30,17 +31,17 @@ public class Sensor { this.id = id; } - @Basic + @Temporal(TemporalType.TIMESTAMP) @Column(name = "CREATE_DATE", nullable = false, columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP", insertable = false, updatable = false) - public Timestamp getCreateDate() { + public Date getCreateDate() { return createDate; } - public void setCreateDate(Timestamp createDate) { + public void setCreateDate(Date createDate) { this.createDate = createDate; } - @Basic + @Column(name = "DESC", nullable = true, length = 50) public String getDesc() { return desc; @@ -50,7 +51,7 @@ public class Sensor { this.desc = desc; } - @Basic + @Column(name = "STATUS", nullable = true, length = 50) public String getStatus() { return status; @@ -80,7 +81,7 @@ public class Sensor { this.crawler = crawler; } - @Basic + @Column(name = "CRAWELR_INPUT_ITEMS", nullable = true, length = 50) public String getcrawlerInputItems() { return crawlerInputItems; diff --git a/src/main/java/com/loafle/overflow/module/sensor/model/SensorItem.java b/src/main/java/com/loafle/overflow/module/sensor/model/SensorItem.java index f77e105..7eeb87a 100644 --- a/src/main/java/com/loafle/overflow/module/sensor/model/SensorItem.java +++ b/src/main/java/com/loafle/overflow/module/sensor/model/SensorItem.java @@ -4,6 +4,7 @@ import com.loafle.overflow.meta.MetaSensorItem; import javax.persistence.*; import java.sql.Timestamp; +import java.util.Date; /** * Created by root on 17. 6. 22. @@ -14,7 +15,7 @@ public class SensorItem { private long id; private Sensor sensor; private MetaSensorItem item; - private Timestamp createDate; + private Date createDate; @Id @GeneratedValue(strategy= GenerationType.IDENTITY) @@ -46,13 +47,13 @@ public class SensorItem { this.item = item; } - @Basic + @Temporal(TemporalType.TIMESTAMP) @Column(name = "CREATE_DATE", nullable = false, columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP", insertable = false, updatable = false) - public Timestamp getCreateDate() { + public Date getCreateDate() { return createDate; } - public void setCreateDate(Timestamp createDate) { + public void setCreateDate(Date createDate) { this.createDate = createDate; }