fixed
infra id , date added vendortype
This commit is contained in:
parent
217b84ff62
commit
f5491dcc7f
|
@ -47,7 +47,7 @@ public class Infra {
|
|||
}
|
||||
|
||||
@Temporal(TemporalType.TIMESTAMP)
|
||||
@Column(name = "CREATE_DATE", nullable = false, columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP")
|
||||
@Column(name = "CREATE_DATE", nullable = false, columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP", insertable = false, updatable = false)
|
||||
public Date getCreateDate() {
|
||||
return createDate;
|
||||
}
|
||||
|
|
|
@ -11,8 +11,8 @@ import java.util.Date;
|
|||
public class InfraHost {
|
||||
private long id;
|
||||
private InfraOS os;
|
||||
private int ip;
|
||||
private int mac;
|
||||
private long ip;
|
||||
private long mac;
|
||||
private Date createDate;
|
||||
|
||||
@Id
|
||||
|
@ -37,26 +37,26 @@ public class InfraHost {
|
|||
|
||||
@Basic
|
||||
@Column(name = "IP", nullable = false)
|
||||
public int getIp() {
|
||||
public long getIp() {
|
||||
return ip;
|
||||
}
|
||||
|
||||
public void setIp(int ip) {
|
||||
public void setIp(long ip) {
|
||||
this.ip = ip;
|
||||
}
|
||||
|
||||
@Basic
|
||||
@Column(name = "MAC", nullable = false)
|
||||
public int getMac() {
|
||||
public long getMac() {
|
||||
return mac;
|
||||
}
|
||||
|
||||
public void setMac(int mac) {
|
||||
public void setMac(long mac) {
|
||||
this.mac = mac;
|
||||
}
|
||||
|
||||
@Temporal(TemporalType.TIMESTAMP)
|
||||
@Column(name = "CREATE_DATE", nullable = false, columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP")
|
||||
@Column(name = "CREATE_DATE", nullable = false, columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP", insertable = false, updatable = false)
|
||||
public Date getCreateDate() {
|
||||
return createDate;
|
||||
}
|
||||
|
|
|
@ -47,7 +47,7 @@ public class InfraMachine {
|
|||
}
|
||||
|
||||
@Temporal(TemporalType.TIMESTAMP)
|
||||
@Column(name = "CREATE_DATE", nullable = false, columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP")
|
||||
@Column(name = "CREATE_DATE", nullable = false, columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP", insertable = false, updatable = false)
|
||||
public Date getCreateDate() {
|
||||
return createDate;
|
||||
}
|
||||
|
|
|
@ -48,7 +48,7 @@ public class InfraOS {
|
|||
}
|
||||
|
||||
@Temporal(TemporalType.TIMESTAMP)
|
||||
@Column(name = "CREATE_DATE", nullable = false, columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP")
|
||||
@Column(name = "CREATE_DATE", nullable = false, columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP", insertable = false, updatable = false)
|
||||
public Date getCreateDate() {
|
||||
return createDate;
|
||||
}
|
||||
|
|
|
@ -45,7 +45,7 @@ public class InfraOSApplication {
|
|||
}
|
||||
|
||||
@Temporal(TemporalType.TIMESTAMP)
|
||||
@Column(name = "CREATE_DATE", nullable = false, columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP")
|
||||
@Column(name = "CREATE_DATE", nullable = false, columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP", insertable = false, updatable = false)
|
||||
public Date getCreateDate() {
|
||||
return createDate;
|
||||
}
|
||||
|
|
|
@ -45,7 +45,7 @@ public class InfraOSDaemon {
|
|||
}
|
||||
|
||||
@Temporal(TemporalType.TIMESTAMP)
|
||||
@Column(name = "CREATE_DATE", nullable = false, columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP")
|
||||
@Column(name = "CREATE_DATE", nullable = false, columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP", insertable = false, updatable = false)
|
||||
public Date getCreateDate() {
|
||||
return createDate;
|
||||
}
|
||||
|
|
|
@ -40,7 +40,7 @@ public class InfraOSPort {
|
|||
}
|
||||
|
||||
@Temporal(TemporalType.TIMESTAMP)
|
||||
@Column(name = "CREATE_DATE", nullable = false, columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP")
|
||||
@Column(name = "CREATE_DATE", nullable = false, columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP", insertable = false, updatable = false)
|
||||
public Date getCreateDate() {
|
||||
return createDate;
|
||||
}
|
||||
|
|
|
@ -70,7 +70,7 @@ public class InfraService {
|
|||
}
|
||||
|
||||
@Temporal(TemporalType.TIMESTAMP)
|
||||
@Column(name = "CREATE_DATE", nullable = false, columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP")
|
||||
@Column(name = "CREATE_DATE", nullable = false, columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP", insertable = false, updatable = false)
|
||||
public Date getCreateDate() {
|
||||
return createDate;
|
||||
}
|
||||
|
|
|
@ -107,6 +107,8 @@ INSERT INTO public.meta_infra_vendor (id,create_date,"name",type_id) VALUES (
|
|||
41,'2017-06-26 20:59:36.385','WMI',7);
|
||||
INSERT INTO public.meta_infra_vendor (id,create_date,"name",type_id) VALUES (
|
||||
42,'2017-06-26 20:59:36.414','SNMP_V2',7);
|
||||
INSERT INTO public.meta_infra_vendor (id,create_date,"name",type_id) VALUES (
|
||||
43,'2017-06-27 14:32:12.506','UNKNOWN',7);
|
||||
|
||||
INSERT INTO public.meta_crawler (id,create_date,description,"name") VALUES (
|
||||
1,'2017-06-25 17:00:43.869','WMI','WMI_CRAWLER');
|
||||
|
|
|
@ -25,6 +25,23 @@ public class MetaInfraVendorDAOTest {
|
|||
@Autowired
|
||||
private MetaInfraVendorDAO metaInfraVendorDAO;
|
||||
|
||||
@Test
|
||||
public void createOne() {
|
||||
|
||||
int startIdx = 43;
|
||||
|
||||
MetaInfraType typeApp = new MetaInfraType();
|
||||
typeApp.setId(7);
|
||||
|
||||
MetaInfraVendor vendor = new MetaInfraVendor();
|
||||
vendor.setId(startIdx);
|
||||
vendor.setMetaInfraType(typeApp);
|
||||
vendor.setName("UNKNOWN");
|
||||
|
||||
this.metaInfraVendorDAO.save(vendor);
|
||||
}
|
||||
|
||||
|
||||
@Test
|
||||
public void create() {
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user