ing
This commit is contained in:
parent
8668e54da8
commit
a327e025f6
|
@ -8,7 +8,7 @@ import java.util.Date;
|
|||
/**
|
||||
* Created by root on 17. 6. 22.
|
||||
*/
|
||||
@Entity(name = "INFRA")
|
||||
@Entity
|
||||
@Table(name = "INFRA", schema = "public")
|
||||
@Inheritance(strategy = InheritanceType.JOINED)
|
||||
@DiscriminatorColumn(name = "META_INFRA_TYPE_ID", discriminatorType = DiscriminatorType.INTEGER)
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
package com.loafle.overflow.model.infra;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import javax.persistence.*;
|
||||
|
||||
import com.loafle.overflow.model.meta.MetaTargetHostType;
|
||||
|
@ -7,12 +9,19 @@ import com.loafle.overflow.model.meta.MetaTargetHostType;
|
|||
/**
|
||||
* Created by root on 17. 6. 22.
|
||||
*/
|
||||
@Entity(name = "INFRA_HOST")
|
||||
@Entity
|
||||
@Table(name = "INFRA_HOST", schema = "public")
|
||||
@DiscriminatorValue("2")
|
||||
public class InfraHost extends Infra {
|
||||
private MetaTargetHostType metaTargetHostType;
|
||||
|
||||
private InfraHostMachine infraHostMachine;
|
||||
private InfraHostOS infraHostOS;
|
||||
private List<InfraHostIP> infraHostIPs;
|
||||
private List<InfraHostPort> infraHostPorts;
|
||||
private List<InfraHostApplication> infraHostApplications;
|
||||
private List<InfraHostDaemon> infraHostDaemons;
|
||||
|
||||
@ManyToOne
|
||||
@JoinColumn(name = "META_TARGET_HOST_TYPE_ID", nullable = true)
|
||||
public MetaTargetHostType getMetaTargetHostType() {
|
||||
|
@ -23,4 +32,96 @@ public class InfraHost extends Infra {
|
|||
this.metaTargetHostType = metaTargetHostType;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the infraHostMachine
|
||||
*/
|
||||
@OneToOne
|
||||
@JoinColumn(name = "INFRA_HOST_MACHINE_ID", nullable = true)
|
||||
public InfraHostMachine getInfraHostMachine() {
|
||||
return infraHostMachine;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param infraHostMachine the infraHostMachine to set
|
||||
*/
|
||||
public void setInfraHostMachine(InfraHostMachine infraHostMachine) {
|
||||
this.infraHostMachine = infraHostMachine;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the infraHostOS
|
||||
*/
|
||||
@OneToOne
|
||||
@JoinColumn(name = "INFRA_HOST_OS_ID", nullable = true)
|
||||
public InfraHostOS getInfraHostOS() {
|
||||
return infraHostOS;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param infraHostOS the infraHostOS to set
|
||||
*/
|
||||
public void setInfraHostOS(InfraHostOS infraHostOS) {
|
||||
this.infraHostOS = infraHostOS;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the infraHostIPs
|
||||
*/
|
||||
@OneToMany(cascade = CascadeType.ALL, orphanRemoval = true)
|
||||
public List<InfraHostIP> getInfraHostIPs() {
|
||||
return infraHostIPs;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param infraHostIPs the infraHostIPs to set
|
||||
*/
|
||||
public void setInfraHostIPs(List<InfraHostIP> infraHostIPs) {
|
||||
this.infraHostIPs = infraHostIPs;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the infraHostPorts
|
||||
*/
|
||||
@OneToMany(cascade = CascadeType.ALL, orphanRemoval = true)
|
||||
public List<InfraHostPort> getInfraHostPorts() {
|
||||
return infraHostPorts;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param infraHostPorts the infraHostPorts to set
|
||||
*/
|
||||
public void setInfraHostPorts(List<InfraHostPort> infraHostPorts) {
|
||||
this.infraHostPorts = infraHostPorts;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the infraHostApplications
|
||||
*/
|
||||
@OneToMany(cascade = CascadeType.ALL, orphanRemoval = true)
|
||||
public List<InfraHostApplication> getInfraHostApplications() {
|
||||
return infraHostApplications;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param infraHostApplications the infraHostApplications to set
|
||||
*/
|
||||
public void setInfraHostApplications(List<InfraHostApplication> infraHostApplications) {
|
||||
this.infraHostApplications = infraHostApplications;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the infraHostDaemons
|
||||
*/
|
||||
@OneToMany(cascade = CascadeType.ALL, orphanRemoval = true)
|
||||
public List<InfraHostDaemon> getInfraHostDaemons() {
|
||||
return infraHostDaemons;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param infraHostDaemons the infraHostDaemons to set
|
||||
*/
|
||||
public void setInfraHostDaemons(List<InfraHostDaemon> infraHostDaemons) {
|
||||
this.infraHostDaemons = infraHostDaemons;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -26,7 +26,7 @@ public class InfraHostApplication {
|
|||
}
|
||||
|
||||
@ManyToOne
|
||||
@JoinColumn(name = "INFRA_HOST_ID", nullable = true)
|
||||
@JoinColumn(name = "INFRA_HOST_ID", nullable = false)
|
||||
public InfraHost getInfraHost() {
|
||||
return infraHost;
|
||||
}
|
||||
|
|
|
@ -26,7 +26,7 @@ public class InfraHostDaemon {
|
|||
}
|
||||
|
||||
@ManyToOne
|
||||
@JoinColumn(name = "INFRA_HOST_ID", nullable = true)
|
||||
@JoinColumn(name = "INFRA_HOST_ID", nullable = false)
|
||||
public InfraHost getInfraHost() {
|
||||
return infraHost;
|
||||
}
|
||||
|
|
|
@ -30,7 +30,7 @@ public class InfraHostIP {
|
|||
}
|
||||
|
||||
@ManyToOne
|
||||
@JoinColumn(name = "INFRA_HOST_ID", nullable = true)
|
||||
@JoinColumn(name = "INFRA_HOST_ID", nullable = false)
|
||||
public InfraHost getInfraHost() {
|
||||
return infraHost;
|
||||
}
|
||||
|
|
|
@ -26,7 +26,7 @@ public class InfraHostMachine {
|
|||
}
|
||||
|
||||
@OneToOne
|
||||
@JoinColumn(name = "INFRA_HOST_ID", nullable = true)
|
||||
@JoinColumn(name = "INFRA_HOST_ID", nullable = false)
|
||||
public InfraHost getInfraHost() {
|
||||
return infraHost;
|
||||
}
|
||||
|
|
|
@ -26,7 +26,7 @@ public class InfraHostOS {
|
|||
}
|
||||
|
||||
@OneToOne
|
||||
@JoinColumn(name = "INFRA_HOST_ID", nullable = true)
|
||||
@JoinColumn(name = "INFRA_HOST_ID", nullable = false)
|
||||
public InfraHost getInfraHost() {
|
||||
return infraHost;
|
||||
}
|
||||
|
|
|
@ -31,7 +31,7 @@ public class InfraHostPort {
|
|||
}
|
||||
|
||||
@ManyToOne
|
||||
@JoinColumn(name = "INFRA_HOST_ID", nullable = true)
|
||||
@JoinColumn(name = "INFRA_HOST_ID", nullable = false)
|
||||
public InfraHost getInfraHost() {
|
||||
return infraHost;
|
||||
}
|
||||
|
|
|
@ -7,7 +7,7 @@ import com.loafle.overflow.model.meta.MetaTargetServiceType;
|
|||
/**
|
||||
* Created by root on 17. 6. 22.
|
||||
*/
|
||||
@Entity(name = "INFRA_SERVICE")
|
||||
@Entity
|
||||
@Table(name = "INFRA_SERVICE", schema = "public")
|
||||
@DiscriminatorValue("3")
|
||||
public class InfraService extends Infra {
|
||||
|
@ -37,7 +37,7 @@ public class InfraService extends Infra {
|
|||
this.infraHostIP = infraHostIP;
|
||||
}
|
||||
|
||||
@ManyToOne
|
||||
@OneToOne
|
||||
@JoinColumn(name = "INFRA_HOST_PORT_ID", nullable = true)
|
||||
public InfraHostPort getInfraHostPort() {
|
||||
return infraHostPort;
|
||||
|
|
|
@ -7,7 +7,7 @@ import com.loafle.overflow.model.meta.MetaTargetZoneType;
|
|||
/**
|
||||
* Created by root on 17. 6. 22.
|
||||
*/
|
||||
@Entity(name = "INFRA_ZONE")
|
||||
@Entity
|
||||
@Table(name = "INFRA_ZONE", schema = "public")
|
||||
@DiscriminatorValue("1")
|
||||
public class InfraZone extends Infra {
|
||||
|
|
|
@ -10,6 +10,7 @@ import java.util.Date;
|
|||
@Table(name = "META_SENSOR_ITEM_UNIT", schema = "public")
|
||||
public class MetaSensorItemUnit {
|
||||
private Short id;
|
||||
private String key;
|
||||
private String unit;
|
||||
private String mark;
|
||||
private Date createDate;
|
||||
|
@ -23,6 +24,15 @@ public class MetaSensorItemUnit {
|
|||
this.id = id;
|
||||
}
|
||||
|
||||
@Column(name = "KEY", nullable = true, length = 50)
|
||||
public String getKey() {
|
||||
return key;
|
||||
}
|
||||
|
||||
public void setKey(String key) {
|
||||
this.key = key;
|
||||
}
|
||||
|
||||
@Column(name = "UNIT", nullable = false)
|
||||
public String getUnit() {
|
||||
return unit;
|
||||
|
@ -41,15 +51,6 @@ public class MetaSensorItemUnit {
|
|||
this.mark = mark;
|
||||
}
|
||||
|
||||
@Column(name = "DESCRIPTION", nullable = true, length = 255)
|
||||
public String getDescription() {
|
||||
return description;
|
||||
}
|
||||
|
||||
public void setDescription(String description) {
|
||||
this.description = description;
|
||||
}
|
||||
|
||||
@Temporal(TemporalType.TIMESTAMP)
|
||||
@Column(name = "CREATE_DATE", nullable = false, columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP", insertable = false, updatable = false)
|
||||
public Date getCreateDate() {
|
||||
|
|
|
@ -5,7 +5,7 @@ import javax.persistence.*;
|
|||
/**
|
||||
* Created by root on 17. 6. 22.
|
||||
*/
|
||||
@Entity(name = "META_TARGET_HOST_TYPE")
|
||||
@Entity
|
||||
@Table(name = "META_TARGET_HOST_TYPE", schema = "public")
|
||||
@DiscriminatorValue("2")
|
||||
public class MetaTargetHostType extends MetaTargetType {
|
||||
|
|
|
@ -5,7 +5,7 @@ import javax.persistence.*;
|
|||
/**
|
||||
* Created by root on 17. 6. 22.
|
||||
*/
|
||||
@Entity(name = "META_TARGET_SERVICE_TYPE")
|
||||
@Entity
|
||||
@Table(name = "META_TARGET_SERVICE_TYPE", schema = "public")
|
||||
@DiscriminatorValue("3")
|
||||
public class MetaTargetServiceType extends MetaTargetType {
|
||||
|
|
|
@ -7,7 +7,7 @@ import java.util.Date;
|
|||
/**
|
||||
* Created by root on 17. 6. 22.
|
||||
*/
|
||||
@Entity(name = "META_TARGET_TYPE")
|
||||
@Entity
|
||||
@Table(name = "META_TARGET_TYPE", schema = "public")
|
||||
@Inheritance(strategy = InheritanceType.JOINED)
|
||||
@DiscriminatorColumn(name = "META_INFRA_TYPE_ID", discriminatorType = DiscriminatorType.INTEGER)
|
||||
|
|
|
@ -5,7 +5,7 @@ import javax.persistence.*;
|
|||
/**
|
||||
* Created by root on 17. 6. 22.
|
||||
*/
|
||||
@Entity(name = "META_TARGET_ZONE_TYPE")
|
||||
@Entity
|
||||
@Table(name = "META_TARGET_ZONE_TYPE", schema = "public")
|
||||
@DiscriminatorValue("1")
|
||||
public class MetaTargetZoneType extends MetaTargetType {
|
||||
|
|
|
@ -1,75 +0,0 @@
|
|||
package com.loafle.overflow.model.meta;
|
||||
|
||||
import javax.persistence.*;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* Created by root on 17. 6. 22.
|
||||
*/
|
||||
@Entity
|
||||
@Table(name = "META_VENDOR_CRAWLER", schema = "public")
|
||||
public class MetaVendorCrawler {
|
||||
private Integer id;
|
||||
private MetaCrawler metaCrawler;
|
||||
private MetaInfraVendor metaInfraVendor;
|
||||
private Date createDate;
|
||||
|
||||
@Id
|
||||
public Integer getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Integer id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
@ManyToOne
|
||||
@JoinColumn(name = "META_CRAWLER_ID", nullable = false)
|
||||
public MetaCrawler getMetaCrawler() {
|
||||
return metaCrawler;
|
||||
}
|
||||
|
||||
public void setMetaCrawler(MetaCrawler metaCrawler) {
|
||||
this.metaCrawler = metaCrawler;
|
||||
}
|
||||
|
||||
@ManyToOne
|
||||
@JoinColumn(name = "META_INFRA_VENDOR_ID", nullable = false)
|
||||
public MetaInfraVendor getMetaInfraVendor() {
|
||||
return metaInfraVendor;
|
||||
}
|
||||
|
||||
public void setMetaInfraVendor(MetaInfraVendor metaInfraVendor) {
|
||||
this.metaInfraVendor = metaInfraVendor;
|
||||
}
|
||||
|
||||
// @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, columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP", insertable = false, updatable = false)
|
||||
public Date getCreateDate() {
|
||||
return createDate;
|
||||
}
|
||||
|
||||
public void setCreateDate(Date createDate) {
|
||||
this.createDate = createDate;
|
||||
}
|
||||
}
|
|
@ -1,96 +0,0 @@
|
|||
package com.loafle.overflow.model.meta;
|
||||
|
||||
import javax.persistence.*;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* Created by root on 17. 6. 22.
|
||||
*/
|
||||
@Entity
|
||||
@Table(name = "META_VENDOR_CRAWLER_SENSOR_ITEM", schema = "public")
|
||||
public class MetaVendorCrawlerSensorItem {
|
||||
private Long id;
|
||||
private String interval;
|
||||
private String warnCondition;
|
||||
private Short crawlerId;
|
||||
private MetaSensorItem metaSensorItem;
|
||||
private MetaInfraVendor metaInfraVendor;
|
||||
private Date createDate;
|
||||
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
@Column(name = "INTERVAL", nullable = true, length = 50)
|
||||
public String getInterval() {
|
||||
return interval;
|
||||
}
|
||||
|
||||
public void setInterval(String interval) {
|
||||
this.interval = interval;
|
||||
}
|
||||
|
||||
@Column(name = "WARN_CONDITION", nullable = true, length = 50)
|
||||
public String getWarnCondition() {
|
||||
return warnCondition;
|
||||
}
|
||||
|
||||
public void setWarnCondition(String warnCondition) {
|
||||
this.warnCondition = warnCondition;
|
||||
}
|
||||
|
||||
@ManyToOne
|
||||
@JoinColumn(name = "META_SENSOR_ITEM_ID", nullable = false)
|
||||
public MetaSensorItem getMetaSensorItem() {
|
||||
return metaSensorItem;
|
||||
}
|
||||
|
||||
public void setMetaSensorItem(MetaSensorItem metaSensorItem) {
|
||||
this.metaSensorItem = metaSensorItem;
|
||||
}
|
||||
|
||||
@ManyToOne
|
||||
@JoinColumn(name = "VENDOR_ID", nullable = false)
|
||||
public MetaInfraVendor getMetaInfraVendor() {
|
||||
return metaInfraVendor;
|
||||
}
|
||||
|
||||
public void setMetaInfraVendor(MetaInfraVendor metaInfraVendor) {
|
||||
this.metaInfraVendor = metaInfraVendor;
|
||||
}
|
||||
|
||||
@Basic
|
||||
@Column(name = "CRAWLER_ID", nullable = false)
|
||||
public Short getCrawlerId() {
|
||||
return crawlerId;
|
||||
}
|
||||
|
||||
public void setCrawlerId(Short crawlerId) {
|
||||
this.crawlerId = crawlerId;
|
||||
}
|
||||
|
||||
@Column(name = "DESCRIPTION", nullable = true, length = 255)
|
||||
public String getDescription() {
|
||||
return description;
|
||||
}
|
||||
|
||||
public void setDescription(String description) {
|
||||
this.description = description;
|
||||
}
|
||||
|
||||
@Temporal(TemporalType.TIMESTAMP)
|
||||
@Column(name = "CREATE_DATE", nullable = false, columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP", insertable = false, updatable = false)
|
||||
public Date getCreateDate() {
|
||||
return createDate;
|
||||
}
|
||||
|
||||
public void setCreateDate(Date createDate) {
|
||||
this.createDate = createDate;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user