meta
This commit is contained in:
snoop 2017-06-22 20:39:17 +09:00
parent 4424126bb3
commit 2cf647d6a8
4 changed files with 211 additions and 147 deletions

View File

@ -11,8 +11,8 @@ import java.util.Date;
@Table(name = "TBL_META_CRAWLER_INPUT_ITEM", schema = "public", catalog = "postgres") @Table(name = "TBL_META_CRAWLER_INPUT_ITEM", schema = "public", catalog = "postgres")
public class MetaCrawlerInputItem { public class MetaCrawlerInputItem {
private int id; private int id;
private short typeId; private MetaInputType metaInputType;
private short crawlerId; private MetaCrawler metaCrawler;
private String desc; private String desc;
private String name; private String name;
private Date createDate; private Date createDate;
@ -32,24 +32,44 @@ public class MetaCrawlerInputItem {
this.id = id; this.id = id;
} }
@Basic // @Basic
@Column(name = "TYPE_ID", nullable = false) // @Column(name = "TYPE_ID", nullable = false)
public short getTypeId() { // public short getTypeId() {
return typeId; // return typeId;
// }
//
// public void setTypeId(short typeId) {
// this.typeId = typeId;
// }
//
// @Basic
// @Column(name = "CRAWLER_ID", nullable = false)
// public short getCrawlerId() {
// return crawlerId;
// }
//
// public void setCrawlerId(short crawlerId) {
// this.crawlerId = crawlerId;
// }
@ManyToOne
@JoinColumn(name = "TYPE_ID", nullable = false)
public MetaInputType getMetaInputType() {
return metaInputType;
} }
public void setTypeId(short typeId) { public void setMetaInputType(MetaInputType metaInputType) {
this.typeId = typeId; this.metaInputType = metaInputType;
} }
@Basic @ManyToOne
@Column(name = "CRAWLER_ID", nullable = false) @JoinColumn(name = "CRAWLER_ID", nullable = false)
public short getCrawlerId() { public MetaCrawler getMetaCrawler() {
return crawlerId; return metaCrawler;
} }
public void setCrawlerId(short crawlerId) { public void setMetaCrawler(MetaCrawler metaCrawler) {
this.crawlerId = crawlerId; this.metaCrawler = metaCrawler;
} }
@Column(name = "DESC", nullable = true, length = 50) @Column(name = "DESC", nullable = true, length = 50)
@ -129,41 +149,41 @@ public class MetaCrawlerInputItem {
this.keyValue = keyValue; this.keyValue = keyValue;
} }
@Override // @Override
public boolean equals(Object o) { // public boolean equals(Object o) {
if (this == o) return true; // if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false; // if (o == null || getClass() != o.getClass()) return false;
//
MetaCrawlerInputItem that = (MetaCrawlerInputItem) o; // MetaCrawlerInputItem that = (MetaCrawlerInputItem) o;
//
if (id != that.id) return false; // if (id != that.id) return false;
if (typeId != that.typeId) return false; // if (typeId != that.typeId) return false;
if (crawlerId != that.crawlerId) return false; // if (crawlerId != that.crawlerId) return false;
if (required != that.required) return false; // if (required != that.required) return false;
if (desc != null ? !desc.equals(that.desc) : that.desc != null) return false; // if (desc != null ? !desc.equals(that.desc) : that.desc != null) return false;
if (name != null ? !name.equals(that.name) : that.name != 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; // if (createDate != null ? !createDate.equals(that.createDate) : that.createDate != null) return false;
if (defaultValue != null ? !defaultValue.equals(that.defaultValue) : that.defaultValue != null) return false; // if (defaultValue != null ? !defaultValue.equals(that.defaultValue) : that.defaultValue != null) return false;
if (pattern != null ? !pattern.equals(that.pattern) : that.pattern != null) return false; // if (pattern != null ? !pattern.equals(that.pattern) : that.pattern != null) return false;
if (keyName != null ? !keyName.equals(that.keyName) : that.keyName != null) return false; // if (keyName != null ? !keyName.equals(that.keyName) : that.keyName != null) return false;
if (keyValue != null ? !keyValue.equals(that.keyValue) : that.keyValue != null) return false; // if (keyValue != null ? !keyValue.equals(that.keyValue) : that.keyValue != null) return false;
//
return true; // return true;
} // }
//
@Override // @Override
public int hashCode() { // public int hashCode() {
int result = id; // int result = id;
result = 31 * result + (int) typeId; // result = 31 * result + (int) typeId;
result = 31 * result + (int) crawlerId; // result = 31 * result + (int) crawlerId;
result = 31 * result + (desc != null ? desc.hashCode() : 0); // result = 31 * result + (desc != null ? desc.hashCode() : 0);
result = 31 * result + (name != null ? name.hashCode() : 0); // result = 31 * result + (name != null ? name.hashCode() : 0);
result = 31 * result + (createDate != null ? createDate.hashCode() : 0); // result = 31 * result + (createDate != null ? createDate.hashCode() : 0);
result = 31 * result + (required ? 1 : 0); // result = 31 * result + (required ? 1 : 0);
result = 31 * result + (defaultValue != null ? defaultValue.hashCode() : 0); // result = 31 * result + (defaultValue != null ? defaultValue.hashCode() : 0);
result = 31 * result + (pattern != null ? pattern.hashCode() : 0); // result = 31 * result + (pattern != null ? pattern.hashCode() : 0);
result = 31 * result + (keyName != null ? keyName.hashCode() : 0); // result = 31 * result + (keyName != null ? keyName.hashCode() : 0);
result = 31 * result + (keyValue != null ? keyValue.hashCode() : 0); // result = 31 * result + (keyValue != null ? keyValue.hashCode() : 0);
return result; // return result;
} // }
} }

View File

@ -2,6 +2,7 @@ package com.loafle.overflow.meta;
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.
@ -12,10 +13,10 @@ public class MetaSensorItemType {
private short id; private short id;
private String name; private String name;
private String desc; private String desc;
private Timestamp createDate; private Date createDate;
@Id @Id
@Column(name = "ID", nullable = false) @GeneratedValue(strategy= GenerationType.IDENTITY)
public short getId() { public short getId() {
return id; return id;
} }
@ -44,13 +45,13 @@ public class MetaSensorItemType {
this.desc = desc; this.desc = desc;
} }
@Basic @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;
} }

View File

@ -2,6 +2,7 @@ package com.loafle.overflow.meta;
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.
@ -10,12 +11,12 @@ import java.sql.Timestamp;
@Table(name = "TBL_META_VENDOR_CRAWLER", schema = "public", catalog = "postgres") @Table(name = "TBL_META_VENDOR_CRAWLER", schema = "public", catalog = "postgres")
public class MetaVendorCrawler { public class MetaVendorCrawler {
private int id; private int id;
private short crawlerId; private MetaCrawler metaCrawler;
private int vendorId; private MetaInfraVendor metaInfraVendor;
private Timestamp createDate; private Date createDate;
@Id @Id
@Column(name = "ID", nullable = false) @GeneratedValue(strategy= GenerationType.IDENTITY)
public int getId() { public int getId() {
return id; return id;
} }
@ -24,57 +25,77 @@ public class MetaVendorCrawler {
this.id = id; this.id = id;
} }
@Basic @ManyToOne
@Column(name = "CRAWLER_ID", nullable = false) @JoinColumn(name = "CRAWLER_ID", nullable = false)
public short getCrawlerId() { public MetaCrawler getMetaCrawler() {
return crawlerId; return metaCrawler;
} }
public void setCrawlerId(short crawlerId) { public void setMetaCrawler(MetaCrawler metaCrawler) {
this.crawlerId = crawlerId; this.metaCrawler = metaCrawler;
} }
@Basic @ManyToOne
@Column(name = "VENDOR_ID", nullable = false) @JoinColumn(name = "VENDOR_ID", nullable = false)
public int getVendorId() { public MetaInfraVendor getMetaInfraVendor() {
return vendorId; return metaInfraVendor;
} }
public void setVendorId(int vendorId) { public void setMetaInfraVendor(MetaInfraVendor metaInfraVendor) {
this.vendorId = vendorId; this.metaInfraVendor = metaInfraVendor;
} }
@Basic // @Basic
// @Column(name = "CRAWLER_ID", nullable = false)
// public short getCrawlerId() {
// return crawlerId;
// }
//
// public void setCrawlerId(short crawlerId) {
// this.crawlerId = crawlerId;
// }
//
// @Basic
// @Column(name = "VENDOR_ID", nullable = false)
// public int getVendorId() {
// return vendorId;
// }
//
// public void setVendorId(int vendorId) {
// this.vendorId = vendorId;
// }
@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;
} }
@Override // @Override
public boolean equals(Object o) { // public boolean equals(Object o) {
if (this == o) return true; // if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false; // if (o == null || getClass() != o.getClass()) return false;
//
MetaVendorCrawler that = (MetaVendorCrawler) o; // MetaVendorCrawler that = (MetaVendorCrawler) o;
//
if (id != that.id) return false; // if (id != that.id) return false;
if (crawlerId != that.crawlerId) return false; // if (crawlerId != that.crawlerId) return false;
if (vendorId != that.vendorId) return false; // if (vendorId != that.vendorId) return false;
if (createDate != null ? !createDate.equals(that.createDate) : that.createDate != null) return false; // if (createDate != null ? !createDate.equals(that.createDate) : that.createDate != null) return false;
//
return true; // return true;
} // }
//
@Override // @Override
public int hashCode() { // public int hashCode() {
int result = id; // int result = id;
result = 31 * result + (int) crawlerId; // result = 31 * result + (int) crawlerId;
result = 31 * result + vendorId; // result = 31 * result + vendorId;
result = 31 * result + (createDate != null ? createDate.hashCode() : 0); // result = 31 * result + (createDate != null ? createDate.hashCode() : 0);
return result; // return result;
} // }
} }

View File

@ -2,6 +2,7 @@ package com.loafle.overflow.meta;
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.
@ -12,13 +13,13 @@ public class MetaVendorCrawlerSensorItem {
private long id; private long id;
private String interval; private String interval;
private String warnCondition; private String warnCondition;
private Timestamp createDate; private Date createDate;
private int itemId; private MetaSensorItem metaSensorItem;
private int vendorId; private MetaInfraVendor metaInfraVendor;
private short crawlerId; private short crawlerId;
@Id @Id
@Column(name = "ID", nullable = false) @GeneratedValue(strategy= GenerationType.IDENTITY)
public long getId() { public long getId() {
return id; return id;
} }
@ -47,34 +48,55 @@ public class MetaVendorCrawlerSensorItem {
this.warnCondition = warnCondition; this.warnCondition = warnCondition;
} }
@Basic @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;
} }
@Basic // @Basic
@Column(name = "ITEM_ID", nullable = false) // @Column(name = "ITEM_ID", nullable = false)
public int getItemId() { // public int getItemId() {
return itemId; // return itemId;
// }
//
// public void setItemId(int itemId) {
// this.itemId = itemId;
// }
//
// @Basic
// @Column(name = "VENDOR_ID", nullable = false)
// public int getVendorId() {
// return vendorId;
// }
//
// public void setVendorId(int vendorId) {
// this.vendorId = vendorId;
// }
@ManyToOne
@JoinColumn(name = "ITEM_ID", nullable = false)
public MetaSensorItem getMetaSensorItem() {
return metaSensorItem;
} }
public void setItemId(int itemId) { public void setMetaSensorItem(MetaSensorItem metaSensorItem) {
this.itemId = itemId; this.metaSensorItem = metaSensorItem;
} }
@Basic @ManyToOne
@Column(name = "VENDOR_ID", nullable = false) @JoinColumn(name = "VENDOR_ID", nullable = false)
public int getVendorId() { public MetaInfraVendor getMetaInfraVendor() {
return vendorId; return metaInfraVendor;
} }
public void setVendorId(int vendorId) { public void setMetaInfraVendor(MetaInfraVendor metaInfraVendor) {
this.vendorId = vendorId; this.metaInfraVendor = metaInfraVendor;
} }
@Basic @Basic
@ -87,34 +109,34 @@ public class MetaVendorCrawlerSensorItem {
this.crawlerId = crawlerId; this.crawlerId = crawlerId;
} }
@Override // @Override
public boolean equals(Object o) { // public boolean equals(Object o) {
if (this == o) return true; // if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false; // if (o == null || getClass() != o.getClass()) return false;
//
MetaVendorCrawlerSensorItem that = (MetaVendorCrawlerSensorItem) o; // MetaVendorCrawlerSensorItem that = (MetaVendorCrawlerSensorItem) o;
//
if (id != that.id) return false; // if (id != that.id) return false;
if (itemId != that.itemId) return false; // if (itemId != that.itemId) return false;
if (vendorId != that.vendorId) return false; // if (vendorId != that.vendorId) return false;
if (crawlerId != that.crawlerId) return false; // if (crawlerId != that.crawlerId) return false;
if (interval != null ? !interval.equals(that.interval) : that.interval != null) return false; // if (interval != null ? !interval.equals(that.interval) : that.interval != null) return false;
if (warnCondition != null ? !warnCondition.equals(that.warnCondition) : that.warnCondition != null) // if (warnCondition != null ? !warnCondition.equals(that.warnCondition) : that.warnCondition != null)
return false; // return false;
if (createDate != null ? !createDate.equals(that.createDate) : that.createDate != null) return false; // if (createDate != null ? !createDate.equals(that.createDate) : that.createDate != null) return false;
//
return true; // return true;
} // }
//
@Override // @Override
public int hashCode() { // public int hashCode() {
int result = (int) (id ^ (id >>> 32)); // int result = (int) (id ^ (id >>> 32));
result = 31 * result + (interval != null ? interval.hashCode() : 0); // result = 31 * result + (interval != null ? interval.hashCode() : 0);
result = 31 * result + (warnCondition != null ? warnCondition.hashCode() : 0); // result = 31 * result + (warnCondition != null ? warnCondition.hashCode() : 0);
result = 31 * result + (createDate != null ? createDate.hashCode() : 0); // result = 31 * result + (createDate != null ? createDate.hashCode() : 0);
result = 31 * result + itemId; // result = 31 * result + itemId;
result = 31 * result + vendorId; // result = 31 * result + vendorId;
result = 31 * result + (int) crawlerId; // result = 31 * result + (int) crawlerId;
return result; // return result;
} // }
} }