ing
This commit is contained in:
parent
c95612377e
commit
e451a5027e
|
@ -23,7 +23,7 @@ public class InfraHost extends Infra {
|
||||||
private List<InfraHostDaemon> infraHostDaemons;
|
private List<InfraHostDaemon> infraHostDaemons;
|
||||||
|
|
||||||
@ManyToOne
|
@ManyToOne
|
||||||
@JoinColumn(name = "META_TARGET_HOST_TYPE_ID", nullable = true)
|
@JoinColumn(name = "META_TARGET_HOST_TYPE_ID", nullable = false)
|
||||||
public MetaTargetHostType getMetaTargetHostType() {
|
public MetaTargetHostType getMetaTargetHostType() {
|
||||||
return metaTargetHostType;
|
return metaTargetHostType;
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,14 +18,14 @@ import java.util.List;
|
||||||
@Table(name = "SENSOR", schema = "public")
|
@Table(name = "SENSOR", schema = "public")
|
||||||
public class Sensor {
|
public class Sensor {
|
||||||
private Long id;
|
private Long id;
|
||||||
private Date createDate;
|
private Target target;
|
||||||
|
private String displayName;
|
||||||
private String description;
|
private String description;
|
||||||
private MetaSensorStatus metaSensorStatus;
|
private MetaSensorStatus metaSensorStatus;
|
||||||
private Target target;
|
|
||||||
private MetaCrawler metaCrawler;
|
private MetaCrawler metaCrawler;
|
||||||
private String crawlerInputItems;
|
private String crawlerInputItems;
|
||||||
private Integer itemCount = 0;
|
private Integer itemCount = 0;
|
||||||
private String displayName;
|
private Date createDate;
|
||||||
|
|
||||||
// Transient property
|
// Transient property
|
||||||
private List<MetaSensorDisplayItem> sensorItems;
|
private List<MetaSensorDisplayItem> sensorItems;
|
||||||
|
@ -40,16 +40,6 @@ public class Sensor {
|
||||||
this.id = id;
|
this.id = id;
|
||||||
}
|
}
|
||||||
|
|
||||||
@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;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Column(name = "DESCRIPTION", nullable = true, length = 50)
|
@Column(name = "DESCRIPTION", nullable = true, length = 50)
|
||||||
public String getDescription() {
|
public String getDescription() {
|
||||||
return description;
|
return description;
|
||||||
|
@ -117,6 +107,17 @@ public class Sensor {
|
||||||
this.displayName = displayName;
|
this.displayName = displayName;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@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;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@PrePersist
|
@PrePersist
|
||||||
void preInsert() {
|
void preInsert() {
|
||||||
this.itemCount = 0;
|
this.itemCount = 0;
|
||||||
|
|
|
@ -16,11 +16,11 @@ import java.util.List;
|
||||||
public class Target {
|
public class Target {
|
||||||
|
|
||||||
private Long id;
|
private Long id;
|
||||||
private Date createDate;
|
private Infra infra;
|
||||||
private String displayName;
|
private String displayName;
|
||||||
private String description;
|
private String description;
|
||||||
private Integer sensorCount;
|
private Integer sensorCount;
|
||||||
private Infra infra;
|
private Date createDate;
|
||||||
|
|
||||||
// Transient property
|
// Transient property
|
||||||
private List<Sensor> sensors;
|
private List<Sensor> sensors;
|
||||||
|
@ -35,16 +35,6 @@ public class Target {
|
||||||
this.id = id;
|
this.id = id;
|
||||||
}
|
}
|
||||||
|
|
||||||
@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;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Column(name = "DISPLAY_NAME")
|
@Column(name = "DISPLAY_NAME")
|
||||||
public String getDisplayName() {
|
public String getDisplayName() {
|
||||||
return displayName;
|
return displayName;
|
||||||
|
@ -120,4 +110,13 @@ public class Target {
|
||||||
// this.infra = infra;
|
// this.infra = infra;
|
||||||
// }
|
// }
|
||||||
|
|
||||||
|
@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