some modle variables has changed.
This commit is contained in:
parent
b9be479aa5
commit
c31f9e685e
|
@ -42,11 +42,11 @@ public class Infra {
|
|||
|
||||
@ManyToOne
|
||||
@JoinColumn(name = "TYPE_ID", nullable = false)
|
||||
public MetaInfraType getType() {
|
||||
public MetaInfraType getInfraType() {
|
||||
return infraType;
|
||||
}
|
||||
|
||||
public void setType(MetaInfraType infraType) {
|
||||
public void setInfraType(MetaInfraType infraType) {
|
||||
this.infraType = infraType;
|
||||
}
|
||||
|
||||
|
@ -118,7 +118,7 @@ public class Infra {
|
|||
infraType.setId(7);
|
||||
}
|
||||
|
||||
infra.setType(infraType);
|
||||
infra.setInfraType(infraType);
|
||||
|
||||
return infra;
|
||||
}
|
||||
|
|
|
@ -33,21 +33,21 @@ public class MetaCrawlerInputItem {
|
|||
|
||||
@ManyToOne
|
||||
@JoinColumn(name = "TYPE_ID", nullable = false)
|
||||
public MetaInputType getMetaInputType() {
|
||||
public MetaInputType getInputType() {
|
||||
return inputType;
|
||||
}
|
||||
|
||||
public void setMetaInputType(MetaInputType inputType) {
|
||||
public void setInputType(MetaInputType inputType) {
|
||||
this.inputType = inputType;
|
||||
}
|
||||
|
||||
@ManyToOne
|
||||
@JoinColumn(name = "CRAWLER_ID", nullable = false)
|
||||
public MetaCrawler getMetaCrawler() {
|
||||
public MetaCrawler getCrawler() {
|
||||
return crawler;
|
||||
}
|
||||
|
||||
public void setMetaCrawler(MetaCrawler crawler) {
|
||||
public void setCrawler(MetaCrawler crawler) {
|
||||
this.crawler = crawler;
|
||||
}
|
||||
|
||||
|
|
|
@ -46,11 +46,11 @@ public class MetaInfraVendor {
|
|||
|
||||
@ManyToOne
|
||||
@JoinColumn(name = "TYPE_ID", nullable=false)
|
||||
public MetaInfraType getMetaInfraType() {
|
||||
public MetaInfraType getInfraType() {
|
||||
return infraType;
|
||||
}
|
||||
|
||||
public void setMetaInfraType(MetaInfraType infraType) {
|
||||
public void setInfraType(MetaInfraType infraType) {
|
||||
this.infraType = infraType;
|
||||
}
|
||||
|
||||
|
|
|
@ -37,11 +37,11 @@ public class MetaSensorItem {
|
|||
|
||||
@ManyToOne
|
||||
@JoinColumn(name = "TYPE_ID", nullable = false)
|
||||
public MetaSensorItemType getMetaSensorItemType() {
|
||||
public MetaSensorItemType getItemType() {
|
||||
return itemType;
|
||||
}
|
||||
|
||||
public void setMetaSensorItemType(MetaSensorItemType itemType) {
|
||||
public void setItemType(MetaSensorItemType itemType) {
|
||||
this.itemType = itemType;
|
||||
}
|
||||
|
||||
|
|
|
@ -25,21 +25,21 @@ public class MetaVendorCrawler {
|
|||
|
||||
@ManyToOne
|
||||
@JoinColumn(name = "CRAWLER_ID", nullable = false)
|
||||
public MetaCrawler getMetaCrawler() {
|
||||
public MetaCrawler getCrawler() {
|
||||
return crawler;
|
||||
}
|
||||
|
||||
public void setMetaCrawler(MetaCrawler crawler) {
|
||||
public void setCrawler(MetaCrawler crawler) {
|
||||
this.crawler = crawler;
|
||||
}
|
||||
|
||||
@ManyToOne
|
||||
@JoinColumn(name = "VENDOR_ID", nullable = false)
|
||||
public MetaInfraVendor getMetaInfraVendor() {
|
||||
public MetaInfraVendor getInfraVendor() {
|
||||
return infraVendor;
|
||||
}
|
||||
|
||||
public void setMetaInfraVendor(MetaInfraVendor infraVendor) {
|
||||
public void setInfraVendor(MetaInfraVendor infraVendor) {
|
||||
this.infraVendor = infraVendor;
|
||||
}
|
||||
|
||||
|
|
|
@ -14,7 +14,7 @@ public class MetaVendorCrawlerSensorItem {
|
|||
private String warnCondition;
|
||||
private Date createDate;
|
||||
private MetaSensorItem sensorItem;
|
||||
private MetaInfraVendor infraVendor;
|
||||
private MetaInfraVendor vendor;
|
||||
private short crawlerId;
|
||||
|
||||
@Id
|
||||
|
@ -57,45 +57,25 @@ public class MetaVendorCrawlerSensorItem {
|
|||
this.createDate = createDate;
|
||||
}
|
||||
|
||||
// @Basic
|
||||
// @Column(name = "ITEM_ID", nullable = false)
|
||||
// public int getItemId() {
|
||||
// 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() {
|
||||
public MetaSensorItem getSensorItem() {
|
||||
return sensorItem;
|
||||
}
|
||||
|
||||
public void setMetaSensorItem(MetaSensorItem sensorItem) {
|
||||
public void setSensorItem(MetaSensorItem sensorItem) {
|
||||
this.sensorItem = sensorItem;
|
||||
}
|
||||
|
||||
@ManyToOne
|
||||
@JoinColumn(name = "VENDOR_ID", nullable = false)
|
||||
public MetaInfraVendor getMetaInfraVendor() {
|
||||
return infraVendor;
|
||||
public MetaInfraVendor getVendor() {
|
||||
return vendor;
|
||||
}
|
||||
|
||||
public void setMetaInfraVendor(MetaInfraVendor infraVendor) {
|
||||
this.infraVendor = infraVendor;
|
||||
public void setVendor(MetaInfraVendor vendor) {
|
||||
this.vendor = vendor;
|
||||
}
|
||||
|
||||
@Basic
|
||||
|
|
|
@ -15,35 +15,13 @@ import java.util.Date;
|
|||
@Table(name = "PROBE", schema = "public", catalog = "postgres")
|
||||
public class Probe {
|
||||
|
||||
/*
|
||||
domain Domain
|
||||
target count int
|
||||
sensor count int
|
||||
displayName String
|
||||
description String
|
||||
cidr String
|
||||
createdDate Date
|
||||
restartedDated Date
|
||||
authorizedDate Date
|
||||
authorizedMember Member
|
||||
host InfraHost // host > infraOS > infraMachine -> Probe
|
||||
probeKey String
|
||||
encryptionKey String
|
||||
status (Meta)
|
||||
*/
|
||||
|
||||
private long id;
|
||||
private MetaProbeStatus status;
|
||||
private String description;
|
||||
private Date createDate;
|
||||
|
||||
private Domain domain;
|
||||
private String probeKey;
|
||||
private String encryptionKey;
|
||||
|
||||
// private Date lastPollingDate;
|
||||
// private Date nextPollingDate;
|
||||
|
||||
private int targetCount;
|
||||
private int sensorCount;
|
||||
private String displayName;
|
||||
|
@ -180,11 +158,11 @@ status (Meta)
|
|||
|
||||
@ManyToOne
|
||||
@JoinColumn(name = "HOST_ID", nullable = false)
|
||||
public InfraHost getInfraHost() {
|
||||
public InfraHost getHost() {
|
||||
return host;
|
||||
}
|
||||
|
||||
public void setInfraHost(InfraHost host) {
|
||||
public void setHost(InfraHost host) {
|
||||
this.host = host;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -34,11 +34,11 @@ public class ProbeTask {
|
|||
|
||||
@ManyToOne
|
||||
@JoinColumn(name = "TYPE_ID", nullable = false)
|
||||
public MetaProbeTaskType getMetaProbeTaskType() {
|
||||
public MetaProbeTaskType getTaskType() {
|
||||
return taskType;
|
||||
}
|
||||
|
||||
public void setMetaProbeTaskType(MetaProbeTaskType taskType) {
|
||||
public void setTaskType(MetaProbeTaskType taskType) {
|
||||
this.taskType = taskType;
|
||||
}
|
||||
|
||||
|
|
|
@ -2,7 +2,6 @@ package com.loafle.overflow.module.infra.service;
|
|||
|
||||
import com.loafle.overflow.module.infra.model.Infra;
|
||||
import com.loafle.overflow.module.meta.model.MetaInfraType;
|
||||
import com.loafle.overflow.module.meta.model.MetaInfraVendor;
|
||||
import com.loafle.overflow.module.probe.model.Probe;
|
||||
import com.loafle.overflow.module.target.model.Target;
|
||||
import com.loafle.overflow.spring.AppConfig;
|
||||
|
@ -16,8 +15,6 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|||
import org.springframework.test.context.ContextConfiguration;
|
||||
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
|
||||
|
||||
import static org.junit.Assert.*;
|
||||
|
||||
/**
|
||||
* Created by snoop on 17. 7. 27.
|
||||
*/
|
||||
|
@ -49,7 +46,7 @@ public class InfraServiceTest {
|
|||
metaInfraType.setId(type);
|
||||
|
||||
Infra infra = new Infra();
|
||||
infra.setType(metaInfraType);
|
||||
infra.setInfraType(metaInfraType);
|
||||
infra.setChildId(childId);
|
||||
|
||||
|
||||
|
|
|
@ -15,8 +15,6 @@ import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
|
|||
|
||||
import java.util.List;
|
||||
|
||||
import static org.junit.Assert.*;
|
||||
|
||||
/**
|
||||
* Created by snoop on 17. 7. 27.
|
||||
*/
|
||||
|
@ -50,8 +48,8 @@ public class MetaVendorCrawlerServiceTest {
|
|||
MetaInfraVendor metaInfraVendor = new MetaInfraVendor();
|
||||
metaInfraVendor.setId(42);
|
||||
|
||||
metaVendorCrawler.setMetaCrawler(metaCrawler);
|
||||
metaVendorCrawler.setMetaInfraVendor(metaInfraVendor);
|
||||
metaVendorCrawler.setCrawler(metaCrawler);
|
||||
metaVendorCrawler.setInfraVendor(metaInfraVendor);
|
||||
|
||||
metaVendorCrawler.setId(1);
|
||||
this.service.regist(metaVendorCrawler);
|
||||
|
|
|
@ -16,11 +16,8 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|||
import org.springframework.test.context.ContextConfiguration;
|
||||
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import static org.junit.Assert.*;
|
||||
|
||||
/**
|
||||
* Created by snoop on 17. 6. 28.
|
||||
*/
|
||||
|
@ -66,7 +63,7 @@ public class ProbeServiceTest {
|
|||
InfraHost infraHost = new InfraHost();
|
||||
infraHost.setId(1);
|
||||
|
||||
probe.setInfraHost(infraHost);
|
||||
probe.setHost(infraHost);
|
||||
|
||||
this.probeService.regist(probe);
|
||||
|
||||
|
|
|
@ -15,8 +15,6 @@ import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
|
|||
|
||||
import java.util.List;
|
||||
|
||||
import static org.junit.Assert.*;
|
||||
|
||||
/**
|
||||
* Created by snoop on 17. 6. 28.
|
||||
*/
|
||||
|
@ -36,7 +34,7 @@ public class ProbeTaskServiceTest {
|
|||
MetaProbeTaskType typeDiscovery = new MetaProbeTaskType();
|
||||
typeDiscovery.setId((short)1);
|
||||
|
||||
probeTask.setMetaProbeTaskType(typeDiscovery);
|
||||
probeTask.setTaskType(typeDiscovery);
|
||||
probeTask.setData("");
|
||||
|
||||
Probe probe = new Probe();
|
||||
|
|
Loading…
Reference in New Issue
Block a user