This commit is contained in:
snoop 2017-06-22 21:35:38 +09:00
parent 512f28d9ed
commit 2c95216c92
4 changed files with 31 additions and 27 deletions

View File

@ -4,6 +4,7 @@ import com.loafle.overflow.meta.MetaMemberStatus;
import javax.persistence.*; import javax.persistence.*;
import java.sql.Timestamp; import java.sql.Timestamp;
import java.util.Date;
/** /**
* Created by root on 17. 6. 22. * Created by root on 17. 6. 22.
@ -18,7 +19,7 @@ public class Member {
private String name; private String name;
private String phone; private String phone;
private String companyName; private String companyName;
private Timestamp createDate; private Date createDate;
private MetaMemberStatus status; private MetaMemberStatus status;
@Id @Id
@ -91,13 +92,13 @@ public class Member {
this.companyName = companyName; this.companyName = companyName;
} }
@Basic @Temporal(TemporalType.TIMESTAMP)
@Column(name = "CREATE_DATE", nullable = false, columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP", insertable = false, updatable = false) @Column(name = "CREATE_DATE", nullable = false, columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP", insertable = false, updatable = false)
public Timestamp getCreateDate() { public Date getCreateDate() {
return createDate; return createDate;
} }
public void setCreateDate(Timestamp createDate) { public void setCreateDate(Date createDate) {
this.createDate = createDate; this.createDate = createDate;
} }

View File

@ -4,6 +4,7 @@ import com.loafle.overflow.module.domain.Domain;
import javax.persistence.*; import javax.persistence.*;
import java.sql.Timestamp; import java.sql.Timestamp;
import java.util.Date;
/** /**
* Created by root on 17. 6. 22. * Created by root on 17. 6. 22.
@ -14,9 +15,9 @@ public class Probe {
private long id; private long id;
private String status; private String status;
private String description; private String description;
private Timestamp createDate; private Date createDate;
private Timestamp lastPollingDate; private Date lastPollingDate;
private Timestamp nextPollingDate; private Date nextPollingDate;
private Domain domain; private Domain domain;
private String probeKey; private String probeKey;
private String encryptionKey; private String encryptionKey;
@ -51,33 +52,33 @@ public class Probe {
this.description = description; this.description = description;
} }
@Temporal(TemporalType.TIMESTAMP)
@Column(name = "CREATE_DATE", nullable = false) @Column(name = "CREATE_DATE", nullable = false)
public Timestamp getCreateDate() { public Date getCreateDate() {
return createDate; return createDate;
} }
public void setCreateDate(Timestamp createDate) { public void setCreateDate(Date createDate) {
this.createDate = createDate; this.createDate = createDate;
} }
@Temporal(TemporalType.TIMESTAMP)
@Column(name = "LAST_POLLING_DATE", nullable = false, columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP", insertable = false, updatable = false) @Column(name = "LAST_POLLING_DATE", nullable = false, columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP", insertable = false, updatable = false)
public Timestamp getLastPollingDate() { public Date getLastPollingDate() {
return lastPollingDate; return lastPollingDate;
} }
public void setLastPollingDate(Timestamp lastPollingDate) { public void setLastPollingDate(Date lastPollingDate) {
this.lastPollingDate = lastPollingDate; this.lastPollingDate = lastPollingDate;
} }
@Temporal(TemporalType.TIMESTAMP)
@Column(name = "NEXT_POLLING_DATE", nullable = true) @Column(name = "NEXT_POLLING_DATE", nullable = true)
public Timestamp getNextPollingDate() { public Date getNextPollingDate() {
return nextPollingDate; return nextPollingDate;
} }
public void setNextPollingDate(Timestamp nextPollingDate) { public void setNextPollingDate(Date nextPollingDate) {
this.nextPollingDate = nextPollingDate; this.nextPollingDate = nextPollingDate;
} }

View File

@ -5,6 +5,7 @@ import com.loafle.overflow.module.target.model.Target;
import javax.persistence.*; import javax.persistence.*;
import java.sql.Timestamp; import java.sql.Timestamp;
import java.util.Date;
/** /**
* Created by root on 17. 6. 22. * Created by root on 17. 6. 22.
@ -13,7 +14,7 @@ import java.sql.Timestamp;
@Table(name = "TBL_SENSOR", schema = "public", catalog = "postgres") @Table(name = "TBL_SENSOR", schema = "public", catalog = "postgres")
public class Sensor { public class Sensor {
private long id; private long id;
private Timestamp createDate; private Date createDate;
private String desc; private String desc;
private String status; private String status;
private Target target; private Target target;
@ -30,17 +31,17 @@ public class Sensor {
this.id = id; this.id = id;
} }
@Basic @Temporal(TemporalType.TIMESTAMP)
@Column(name = "CREATE_DATE", nullable = false, columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP", insertable = false, updatable = false) @Column(name = "CREATE_DATE", nullable = false, columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP", insertable = false, updatable = false)
public Timestamp getCreateDate() { public Date getCreateDate() {
return createDate; return createDate;
} }
public void setCreateDate(Timestamp createDate) { public void setCreateDate(Date createDate) {
this.createDate = createDate; this.createDate = createDate;
} }
@Basic
@Column(name = "DESC", nullable = true, length = 50) @Column(name = "DESC", nullable = true, length = 50)
public String getDesc() { public String getDesc() {
return desc; return desc;
@ -50,7 +51,7 @@ public class Sensor {
this.desc = desc; this.desc = desc;
} }
@Basic
@Column(name = "STATUS", nullable = true, length = 50) @Column(name = "STATUS", nullable = true, length = 50)
public String getStatus() { public String getStatus() {
return status; return status;
@ -80,7 +81,7 @@ public class Sensor {
this.crawler = crawler; this.crawler = crawler;
} }
@Basic
@Column(name = "CRAWELR_INPUT_ITEMS", nullable = true, length = 50) @Column(name = "CRAWELR_INPUT_ITEMS", nullable = true, length = 50)
public String getcrawlerInputItems() { public String getcrawlerInputItems() {
return crawlerInputItems; return crawlerInputItems;

View File

@ -4,6 +4,7 @@ import com.loafle.overflow.meta.MetaSensorItem;
import javax.persistence.*; import javax.persistence.*;
import java.sql.Timestamp; import java.sql.Timestamp;
import java.util.Date;
/** /**
* Created by root on 17. 6. 22. * Created by root on 17. 6. 22.
@ -14,7 +15,7 @@ public class SensorItem {
private long id; private long id;
private Sensor sensor; private Sensor sensor;
private MetaSensorItem item; private MetaSensorItem item;
private Timestamp createDate; private Date createDate;
@Id @Id
@GeneratedValue(strategy= GenerationType.IDENTITY) @GeneratedValue(strategy= GenerationType.IDENTITY)
@ -46,13 +47,13 @@ public class SensorItem {
this.item = item; this.item = item;
} }
@Basic @Temporal(TemporalType.TIMESTAMP)
@Column(name = "CREATE_DATE", nullable = false, columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP", insertable = false, updatable = false) @Column(name = "CREATE_DATE", nullable = false, columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP", insertable = false, updatable = false)
public Timestamp getCreateDate() { public Date getCreateDate() {
return createDate; return createDate;
} }
public void setCreateDate(Timestamp createDate) { public void setCreateDate(Date createDate) {
this.createDate = createDate; this.createDate = createDate;
} }