diff --git a/src/main/java/com/loafle/overflow/meta/MetaCrawler.java b/src/main/java/com/loafle/overflow/meta/MetaCrawler.java index e883cb0..bece2e0 100644 --- a/src/main/java/com/loafle/overflow/meta/MetaCrawler.java +++ b/src/main/java/com/loafle/overflow/meta/MetaCrawler.java @@ -2,6 +2,7 @@ package com.loafle.overflow.meta; import javax.persistence.*; import java.sql.Timestamp; +import java.util.Date; /** * Created by root on 17. 6. 22. @@ -10,12 +11,12 @@ import java.sql.Timestamp; @Table(name = "TBL_META_CRAWLER", schema = "public", catalog = "postgres") public class MetaCrawler { private short id; - private Timestamp createDate; + private Date createDate; private String name; private String desc; @Id - @Column(name = "ID", nullable = false) + @GeneratedValue(strategy= GenerationType.IDENTITY) public short getId() { return id; } @@ -24,17 +25,16 @@ public class MetaCrawler { this.id = id; } - @Basic - @Column(name = "CREATE_DATE", nullable = true) - public Timestamp getCreateDate() { + @Temporal(TemporalType.TIMESTAMP) + @Column(name="CREATE_DATE", nullable=false) + public Date getCreateDate() { return createDate; } - public void setCreateDate(Timestamp createDate) { + public void setCreateDate(Date createDate) { this.createDate = createDate; } - @Basic @Column(name = "NAME", nullable = true, length = 50) public String getName() { return name; @@ -44,7 +44,6 @@ public class MetaCrawler { this.name = name; } - @Basic @Column(name = "DESC", nullable = true, length = 100) public String getDesc() { return desc; diff --git a/src/main/java/com/loafle/overflow/meta/MetaCrawlerInputItem.java b/src/main/java/com/loafle/overflow/meta/MetaCrawlerInputItem.java index 430f42d..17a2c6b 100644 --- a/src/main/java/com/loafle/overflow/meta/MetaCrawlerInputItem.java +++ b/src/main/java/com/loafle/overflow/meta/MetaCrawlerInputItem.java @@ -2,6 +2,7 @@ package com.loafle.overflow.meta; import javax.persistence.*; import java.sql.Timestamp; +import java.util.Date; /** * Created by root on 17. 6. 22. @@ -14,7 +15,7 @@ public class MetaCrawlerInputItem { private short crawlerId; private String desc; private String name; - private Timestamp createDate; + private Date createDate; private boolean required; private String defaultValue; private String pattern; @@ -22,7 +23,7 @@ public class MetaCrawlerInputItem { private String keyValue; @Id - @Column(name = "ID", nullable = false) + @GeneratedValue(strategy= GenerationType.IDENTITY) public int getId() { return id; } @@ -51,7 +52,6 @@ public class MetaCrawlerInputItem { this.crawlerId = crawlerId; } - @Basic @Column(name = "DESC", nullable = true, length = 50) public String getDesc() { return desc; @@ -61,7 +61,7 @@ public class MetaCrawlerInputItem { this.desc = desc; } - @Basic + @Column(name = "NAME", nullable = true, length = 50) public String getName() { return name; @@ -71,17 +71,16 @@ public class MetaCrawlerInputItem { this.name = name; } - @Basic + @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; } - @Basic @Column(name = "REQUIRED", nullable = false) public boolean isRequired() { return required; @@ -91,7 +90,6 @@ public class MetaCrawlerInputItem { this.required = required; } - @Basic @Column(name = "DEFAULT_VALUE", nullable = true, length = 50) public String getDefaultValue() { return defaultValue; @@ -101,7 +99,7 @@ public class MetaCrawlerInputItem { this.defaultValue = defaultValue; } - @Basic + @Column(name = "PATTERN", nullable = true, length = 50) public String getPattern() { return pattern; @@ -111,7 +109,7 @@ public class MetaCrawlerInputItem { this.pattern = pattern; } - @Basic + @Column(name = "KEY_NAME", nullable = true, length = 50) public String getKeyName() { return keyName; @@ -121,7 +119,7 @@ public class MetaCrawlerInputItem { this.keyName = keyName; } - @Basic + @Column(name = "KEY_VALUE", nullable = true, length = 50) public String getKeyValue() { return keyValue; diff --git a/src/main/java/com/loafle/overflow/meta/MetaInfraType.java b/src/main/java/com/loafle/overflow/meta/MetaInfraType.java index 22cb803..f9a5801 100644 --- a/src/main/java/com/loafle/overflow/meta/MetaInfraType.java +++ b/src/main/java/com/loafle/overflow/meta/MetaInfraType.java @@ -2,6 +2,7 @@ package com.loafle.overflow.meta; import javax.persistence.*; import java.sql.Timestamp; +import java.util.Date; /** * Created by root on 17. 6. 22. @@ -11,10 +12,10 @@ import java.sql.Timestamp; public class MetaInfraType { private int id; private String name; - private Timestamp createDate; + private Date createDate; @Id - @Column(name = "ID", nullable = false) + @GeneratedValue(strategy= GenerationType.IDENTITY) public int getId() { return id; } @@ -33,13 +34,13 @@ public class MetaInfraType { this.name = name; } - @Basic + @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; } diff --git a/src/main/java/com/loafle/overflow/meta/MetaInfraVendor.java b/src/main/java/com/loafle/overflow/meta/MetaInfraVendor.java index 7cb779c..28e59d4 100644 --- a/src/main/java/com/loafle/overflow/meta/MetaInfraVendor.java +++ b/src/main/java/com/loafle/overflow/meta/MetaInfraVendor.java @@ -2,6 +2,7 @@ package com.loafle.overflow.meta; import javax.persistence.*; import java.sql.Timestamp; +import java.util.Date; /** * Created by root on 17. 6. 22. @@ -11,11 +12,11 @@ import java.sql.Timestamp; public class MetaInfraVendor { private int id; private String name; - private Timestamp createDate; - private int typeId; + private Date createDate; + private MetaInfraType metaInfraType; @Id - @Column(name = "ID", nullable = false) + @GeneratedValue(strategy= GenerationType.IDENTITY) public int getId() { return id; } @@ -34,47 +35,58 @@ public class MetaInfraVendor { this.name = name; } - @Basic + @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; } - @Basic - @Column(name = "TYPE_ID", nullable = false) - public int getTypeId() { - return typeId; +// @Basic +// @Column(name = "TYPE_ID", nullable = false) +// public int getTypeId() { +// return typeId; +// } +// +// public void setTypeId(int typeId) { +// this.typeId = typeId; +// } + + @ManyToOne + @JoinColumn(name = "TYPE_ID", nullable=false) + public MetaInfraType getMetaInfraType() { + return metaInfraType; } - public void setTypeId(int typeId) { - this.typeId = typeId; + public void setMetaInfraType(MetaInfraType metaInfraType) { + this.metaInfraType = metaInfraType; } - @Override - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - MetaInfraVendor that = (MetaInfraVendor) o; - - if (id != that.id) return false; - if (typeId != that.typeId) return false; - if (name != null ? !name.equals(that.name) : that.name != null) return false; - if (createDate != null ? !createDate.equals(that.createDate) : that.createDate != null) return false; - - return true; - } - - @Override - public int hashCode() { - int result = id; - result = 31 * result + (name != null ? name.hashCode() : 0); - result = 31 * result + (createDate != null ? createDate.hashCode() : 0); - result = 31 * result + typeId; - return result; - } +// @Override +// public boolean equals(Object o) { +// if (this == o) return true; +// if (o == null || getClass() != o.getClass()) return false; +// +// MetaInfraVendor that = (MetaInfraVendor) o; +// +// if (id != that.id) return false; +// if (typeId != that.typeId) return false; +// if (name != null ? !name.equals(that.name) : that.name != null) return false; +// if (createDate != null ? !createDate.equals(that.createDate) : that.createDate != null) return false; +// +// return true; +// } +// +// @Override +// public int hashCode() { +// int result = id; +// result = 31 * result + (name != null ? name.hashCode() : 0); +// result = 31 * result + (createDate != null ? createDate.hashCode() : 0); +// result = 31 * result + typeId; +// return result; +// } } diff --git a/src/main/java/com/loafle/overflow/meta/MetaInputType.java b/src/main/java/com/loafle/overflow/meta/MetaInputType.java index 274f620..de72c60 100644 --- a/src/main/java/com/loafle/overflow/meta/MetaInputType.java +++ b/src/main/java/com/loafle/overflow/meta/MetaInputType.java @@ -2,6 +2,7 @@ package com.loafle.overflow.meta; import javax.persistence.*; import java.sql.Timestamp; +import java.util.Date; /** * Created by root on 17. 6. 22. @@ -12,10 +13,10 @@ public class MetaInputType { private short id; private String name; private String desc; - private Timestamp createDate; + private Date createDate; @Id - @Column(name = "ID", nullable = false) + @GeneratedValue(strategy= GenerationType.IDENTITY) public short getId() { return id; } @@ -24,7 +25,7 @@ public class MetaInputType { this.id = id; } - @Basic + @Column(name = "NAME", nullable = true, length = 50) public String getName() { return name; @@ -34,7 +35,7 @@ public class MetaInputType { this.name = name; } - @Basic + @Column(name = "DESC", nullable = true, length = 50) public String getDesc() { return desc; @@ -44,13 +45,13 @@ public class MetaInputType { this.desc = desc; } - @Basic + @Temporal(TemporalType.TIMESTAMP) @Column(name = "CREATE_DATE", nullable = true) - 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/meta/MetaMemberStatus.java b/src/main/java/com/loafle/overflow/meta/MetaMemberStatus.java index 8487ff6..8cfd97c 100644 --- a/src/main/java/com/loafle/overflow/meta/MetaMemberStatus.java +++ b/src/main/java/com/loafle/overflow/meta/MetaMemberStatus.java @@ -12,7 +12,7 @@ public class MetaMemberStatus { private String name; @Id - @Column(name = "ID", nullable = false) + @GeneratedValue(strategy= GenerationType.IDENTITY) public short getId() { return id; } @@ -21,7 +21,7 @@ public class MetaMemberStatus { this.id = id; } - @Basic + @Column(name = "Name", nullable = false, length = 10) public String getName() { return name; diff --git a/src/main/java/com/loafle/overflow/meta/MetaNotification.java b/src/main/java/com/loafle/overflow/meta/MetaNotification.java index 2a1a406..330cf21 100644 --- a/src/main/java/com/loafle/overflow/meta/MetaNotification.java +++ b/src/main/java/com/loafle/overflow/meta/MetaNotification.java @@ -2,6 +2,7 @@ package com.loafle.overflow.meta; import javax.persistence.*; import java.sql.Timestamp; +import java.util.Date; /** * Created by root on 17. 6. 22. @@ -10,12 +11,12 @@ import java.sql.Timestamp; @Table(name = "TBL_META_NOTIFICATION", schema = "public", catalog = "postgres") public class MetaNotification { private long id; - private Timestamp createDate; + private Date createDate; private String name; private String description; @Id - @Column(name = "ID", nullable = false) + @GeneratedValue(strategy= GenerationType.IDENTITY) public long getId() { return id; } @@ -24,17 +25,17 @@ public class MetaNotification { this.id = id; } - @Basic + @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; } - @Basic + @Column(name = "NAME", nullable = true, length = 50) public String getName() { return name; @@ -44,7 +45,7 @@ public class MetaNotification { this.name = name; } - @Basic + @Column(name = "DESCRIPTION", nullable = true, length = 50) public String getDescription() { return description; diff --git a/src/main/java/com/loafle/overflow/meta/MetaProbeArchitecture.java b/src/main/java/com/loafle/overflow/meta/MetaProbeArchitecture.java index fccd22f..d8642f5 100644 --- a/src/main/java/com/loafle/overflow/meta/MetaProbeArchitecture.java +++ b/src/main/java/com/loafle/overflow/meta/MetaProbeArchitecture.java @@ -2,6 +2,7 @@ package com.loafle.overflow.meta; import javax.persistence.*; import java.sql.Timestamp; +import java.util.Date; /** * Created by root on 17. 6. 22. @@ -11,10 +12,10 @@ import java.sql.Timestamp; public class MetaProbeArchitecture { private short id; private String archi; - private Timestamp createDate; + private Date createDate; @Id - @Column(name = "ID", nullable = false) + @GeneratedValue(strategy= GenerationType.IDENTITY) public short getId() { return id; } @@ -23,7 +24,7 @@ public class MetaProbeArchitecture { this.id = id; } - @Basic + @Column(name = "ARCHI", nullable = true, length = 10) public String getArchi() { return archi; @@ -33,13 +34,13 @@ public class MetaProbeArchitecture { this.archi = archi; } - @Basic + @Temporal(TemporalType.TIMESTAMP) @Column(name = "CREATE_DATE", nullable = true) - 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/meta/MetaProbeOs.java b/src/main/java/com/loafle/overflow/meta/MetaProbeOs.java index 33ebdc1..64caa75 100644 --- a/src/main/java/com/loafle/overflow/meta/MetaProbeOs.java +++ b/src/main/java/com/loafle/overflow/meta/MetaProbeOs.java @@ -2,6 +2,7 @@ package com.loafle.overflow.meta; import javax.persistence.*; import java.sql.Timestamp; +import java.util.Date; /** * Created by root on 17. 6. 22. @@ -11,10 +12,10 @@ import java.sql.Timestamp; public class MetaProbeOs { private short id; private String name; - private Timestamp createDate; + private Date createDate; @Id - @Column(name = "ID", nullable = false) + @GeneratedValue(strategy= GenerationType.IDENTITY) public short getId() { return id; } @@ -33,13 +34,13 @@ public class MetaProbeOs { this.name = name; } - @Basic + @Temporal(TemporalType.TIMESTAMP) @Column(name = "CREATE_DATE", nullable = true) - 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/meta/MetaProbePackage.java b/src/main/java/com/loafle/overflow/meta/MetaProbePackage.java index c3f6ba0..66ccf91 100644 --- a/src/main/java/com/loafle/overflow/meta/MetaProbePackage.java +++ b/src/main/java/com/loafle/overflow/meta/MetaProbePackage.java @@ -2,6 +2,7 @@ package com.loafle.overflow.meta; import javax.persistence.*; import java.sql.Timestamp; +import java.util.Date; /** * Created by root on 17. 6. 22. @@ -10,13 +11,13 @@ import java.sql.Timestamp; @Table(name = "TBL_META_PROBE_PACKAGE", schema = "public", catalog = "postgres") public class MetaProbePackage { private long id; - private short versionId; - private short osId; - private short architectureId; - private Timestamp createDate; + private MetaProbeVersion versionId; + private MetaProbeOs osId; + private MetaProbeArchitecture architectureId; + private Date createDate; @Id - @Column(name = "ID", nullable = false) + @GeneratedValue(strategy= GenerationType.IDENTITY) public long getId() { return id; } @@ -25,69 +26,69 @@ public class MetaProbePackage { this.id = id; } - @Basic - @Column(name = "VERSION_ID", nullable = false) - public short getVersionId() { + @ManyToOne + @JoinColumn(name = "VERSION_ID", nullable = false) + public MetaProbeVersion getVersionId() { return versionId; } - public void setVersionId(short versionId) { + public void setVersionId(MetaProbeVersion versionId) { this.versionId = versionId; } - @Basic - @Column(name = "OS_ID", nullable = false) - public short getOsId() { + @ManyToOne + @JoinColumn(name = "OS_ID", nullable = false) + public MetaProbeOs getOsId() { return osId; } - public void setOsId(short osId) { + public void setOsId(MetaProbeOs osId) { this.osId = osId; } - @Basic - @Column(name = "ARCHITECTURE_ID", nullable = false) - public short getArchitectureId() { + @ManyToOne + @JoinColumn(name = "ARCHITECTURE_ID", nullable = false) + public MetaProbeArchitecture getArchitectureId() { return architectureId; } - public void setArchitectureId(short architectureId) { + public void setArchitectureId(MetaProbeArchitecture architectureId) { this.architectureId = architectureId; } - @Basic + @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; } - @Override - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; +// @Override +// public boolean equals(Object o) { +// if (this == o) return true; +// if (o == null || getClass() != o.getClass()) return false; +// +// MetaProbePackage that = (MetaProbePackage) o; +// +// if (id != that.id) return false; +// if (versionId != that.versionId) return false; +// if (osId != that.osId) return false; +// if (architectureId != that.architectureId) return false; +// if (createDate != null ? !createDate.equals(that.createDate) : that.createDate != null) return false; +// +// return true; +// } - MetaProbePackage that = (MetaProbePackage) o; - - if (id != that.id) return false; - if (versionId != that.versionId) return false; - if (osId != that.osId) return false; - if (architectureId != that.architectureId) return false; - if (createDate != null ? !createDate.equals(that.createDate) : that.createDate != null) return false; - - return true; - } - - @Override - public int hashCode() { - int result = (int) (id ^ (id >>> 32)); - result = 31 * result + (int) versionId; - result = 31 * result + (int) osId; - result = 31 * result + (int) architectureId; - result = 31 * result + (createDate != null ? createDate.hashCode() : 0); - return result; - } +// @Override +// public int hashCode() { +// int result = (int) (id ^ (id >>> 32)); +// result = 31 * result + (int) versionId; +// result = 31 * result + (int) osId; +// result = 31 * result + (int) architectureId; +// result = 31 * result + (createDate != null ? createDate.hashCode() : 0); +// return result; +// } } diff --git a/src/main/java/com/loafle/overflow/meta/MetaProbeTaskType.java b/src/main/java/com/loafle/overflow/meta/MetaProbeTaskType.java index 2d8da6c..c6fe74f 100644 --- a/src/main/java/com/loafle/overflow/meta/MetaProbeTaskType.java +++ b/src/main/java/com/loafle/overflow/meta/MetaProbeTaskType.java @@ -2,6 +2,7 @@ package com.loafle.overflow.meta; import javax.persistence.*; import java.sql.Timestamp; +import java.util.Date; /** * Created by root on 17. 6. 22. @@ -12,10 +13,10 @@ public class MetaProbeTaskType { private short id; private String name; private String desc; - private Timestamp createDate; + private Date createDate; @Id - @Column(name = "ID", nullable = false) + @GeneratedValue(strategy= GenerationType.IDENTITY) public short getId() { return id; } @@ -24,7 +25,7 @@ public class MetaProbeTaskType { this.id = id; } - @Basic + @Column(name = "NAME", nullable = false, length = 50) public String getName() { return name; @@ -34,7 +35,7 @@ public class MetaProbeTaskType { this.name = name; } - @Basic + @Column(name = "DESC", nullable = false, length = 50) public String getDesc() { return desc; @@ -44,13 +45,13 @@ public class MetaProbeTaskType { this.desc = desc; } - @Basic + @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; } diff --git a/src/main/java/com/loafle/overflow/meta/MetaProbeVersion.java b/src/main/java/com/loafle/overflow/meta/MetaProbeVersion.java index 4a5e609..bb0cc76 100644 --- a/src/main/java/com/loafle/overflow/meta/MetaProbeVersion.java +++ b/src/main/java/com/loafle/overflow/meta/MetaProbeVersion.java @@ -2,6 +2,7 @@ package com.loafle.overflow.meta; import javax.persistence.*; import java.sql.Timestamp; +import java.util.Date; /** * Created by root on 17. 6. 22. @@ -11,10 +12,10 @@ import java.sql.Timestamp; public class MetaProbeVersion { private short id; private String version; - private Timestamp createDate; + private Date createDate; @Id - @Column(name = "ID", nullable = false) + @GeneratedValue(strategy= GenerationType.IDENTITY) public short getId() { return id; } @@ -33,13 +34,13 @@ public class MetaProbeVersion { this.version = version; } - @Basic + @Temporal(TemporalType.TIMESTAMP) @Column(name = "CREATE_DATE", nullable = true) - 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/meta/MetaSensorItem.java b/src/main/java/com/loafle/overflow/meta/MetaSensorItem.java index c0e2f87..f5e375d 100644 --- a/src/main/java/com/loafle/overflow/meta/MetaSensorItem.java +++ b/src/main/java/com/loafle/overflow/meta/MetaSensorItem.java @@ -2,6 +2,7 @@ package com.loafle.overflow.meta; import javax.persistence.*; import java.sql.Timestamp; +import java.util.Date; /** * Created by root on 17. 6. 22. @@ -10,13 +11,13 @@ import java.sql.Timestamp; @Table(name = "TBL_META_SENSOR_ITEM", schema = "public", catalog = "postgres") public class MetaSensorItem { private int id; - private short typeId; + private MetaSensorItemType metaSensorItemType; private String key; private String name; - private Timestamp createDate; + private Date createDate; @Id - @Column(name = "ID", nullable = false) + @GeneratedValue(strategy= GenerationType.IDENTITY) public int getId() { return id; } @@ -25,17 +26,25 @@ public class MetaSensorItem { this.id = id; } - @Basic + +// @Column(name = "TYPE_ID", nullable = false) +// public short getTypeId() { +// return typeId; +// } +// +// public void setTypeId(short typeId) { +// this.typeId = typeId; +// } + @Column(name = "TYPE_ID", nullable = false) - public short getTypeId() { - return typeId; + public MetaSensorItemType getMetaSensorItemType() { + return metaSensorItemType; } - public void setTypeId(short typeId) { - this.typeId = typeId; + public void setMetaSensorItemType(MetaSensorItemType metaSensorItemType) { + this.metaSensorItemType = metaSensorItemType; } - @Basic @Column(name = "KEY", nullable = true, length = 50) public String getKey() { return key; @@ -45,7 +54,6 @@ public class MetaSensorItem { this.key = key; } - @Basic @Column(name = "NAME", nullable = true, length = 50) public String getName() { return name; @@ -55,39 +63,39 @@ public class MetaSensorItem { this.name = name; } - @Basic + @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; } - @Override - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - - MetaSensorItem that = (MetaSensorItem) o; - - if (id != that.id) return false; - if (typeId != that.typeId) return false; - if (key != null ? !key.equals(that.key) : that.key != null) return false; - if (name != null ? !name.equals(that.name) : that.name != null) return false; - if (createDate != null ? !createDate.equals(that.createDate) : that.createDate != null) return false; - - return true; - } - - @Override - public int hashCode() { - int result = id; - result = 31 * result + (int) typeId; - result = 31 * result + (key != null ? key.hashCode() : 0); - result = 31 * result + (name != null ? name.hashCode() : 0); - result = 31 * result + (createDate != null ? createDate.hashCode() : 0); - return result; - } +// @Override +// public boolean equals(Object o) { +// if (this == o) return true; +// if (o == null || getClass() != o.getClass()) return false; +// +// MetaSensorItem that = (MetaSensorItem) o; +// +// if (id != that.id) return false; +// if (typeId != that.typeId) return false; +// if (key != null ? !key.equals(that.key) : that.key != null) return false; +// if (name != null ? !name.equals(that.name) : that.name != null) return false; +// if (createDate != null ? !createDate.equals(that.createDate) : that.createDate != null) return false; +// +// return true; +// } +// +// @Override +// public int hashCode() { +// int result = id; +// result = 31 * result + (int) typeId; +// result = 31 * result + (key != null ? key.hashCode() : 0); +// result = 31 * result + (name != null ? name.hashCode() : 0); +// result = 31 * result + (createDate != null ? createDate.hashCode() : 0); +// return result; +// } }