annotions position

This commit is contained in:
insanity 2018-06-22 19:48:32 +09:00
parent 5e9c10a868
commit ca845e02b9
51 changed files with 869 additions and 621 deletions

View File

@ -8,13 +8,22 @@ import java.util.Date;
@Entity @Entity
@Table(name = "API_KEY", schema = "public") @Table(name = "API_KEY", schema = "public")
public class ApiKey { public class ApiKey {
private Long id;
private String apiKey;
private Date createDate;
private Domain domain;
@Id @Id
@GeneratedValue(strategy = GenerationType.IDENTITY) @GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id;
@Column(name = "API_KEY", nullable = false, unique = true, length = 50)
private String apiKey;
@Temporal(TemporalType.TIMESTAMP)
@Column(name = "CREATE_DATE", nullable = false, columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP", insertable = false, updatable = false)
private Date createDate;
@ManyToOne
@JoinColumn(name = "DOMAIN_ID", nullable = false)
private Domain domain;
public Long getId() { public Long getId() {
return id; return id;
} }
@ -23,7 +32,6 @@ public class ApiKey {
this.id = id; this.id = id;
} }
@Column(name = "API_KEY", nullable = false, unique = true, length = 50)
public String getApiKey() { public String getApiKey() {
return apiKey; return apiKey;
} }
@ -32,8 +40,6 @@ public class ApiKey {
this.apiKey = apiKey; this.apiKey = apiKey;
} }
@Temporal(TemporalType.TIMESTAMP)
@Column(name = "CREATE_DATE", nullable = false, columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP", insertable = false, updatable = false)
public Date getCreateDate() { public Date getCreateDate() {
return createDate; return createDate;
} }
@ -42,8 +48,6 @@ public class ApiKey {
this.createDate = createDate; this.createDate = createDate;
} }
@ManyToOne
@JoinColumn(name = "DOMAIN_ID", nullable = false)
public Domain getDomain() { public Domain getDomain() {
return domain; return domain;
} }

View File

@ -14,14 +14,27 @@ import java.util.Date;
@Entity @Entity
@Table(name = "AUTH_CRAWLER", schema = "public") @Table(name = "AUTH_CRAWLER", schema = "public")
public class AuthCrawler { public class AuthCrawler {
private Long id;
private MetaCrawler metaCrawler;
private Target target;
private String authJson;
private Date createDate;
@Id @Id
@GeneratedValue(strategy = GenerationType.IDENTITY) @GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id;
@ManyToOne
@JoinColumn(name = "META_CRAWLER_ID", nullable = false)
private MetaCrawler metaCrawler;
@ManyToOne
@OnDelete(action = OnDeleteAction.CASCADE)
@JoinColumn(name = "TARGET_ID", nullable = false)
private Target target;
@Column(name = "AUTH_JSON", nullable = false)
private String authJson;
@Temporal(TemporalType.TIMESTAMP)
@Column(name = "CREATE_DATE", nullable = false, columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP", insertable = false, updatable = false)
private Date createDate;
public Long getId() { public Long getId() {
return id; return id;
} }
@ -30,8 +43,6 @@ public class AuthCrawler {
this.id = id; this.id = id;
} }
@ManyToOne
@JoinColumn(name = "META_CRAWLER_ID", nullable = false)
public MetaCrawler getMetaCrawler() { public MetaCrawler getMetaCrawler() {
return metaCrawler; return metaCrawler;
} }
@ -40,9 +51,6 @@ public class AuthCrawler {
this.metaCrawler = metaCrawler; this.metaCrawler = metaCrawler;
} }
@ManyToOne
@OnDelete(action = OnDeleteAction.CASCADE)
@JoinColumn(name = "TARGET_ID", nullable = false)
public Target getTarget() { public Target getTarget() {
return target; return target;
} }
@ -51,7 +59,6 @@ public class AuthCrawler {
this.target = target; this.target = target;
} }
@Column(name = "AUTH_JSON", nullable = false)
public String getAuthJson() { public String getAuthJson() {
return authJson; return authJson;
} }
@ -60,8 +67,6 @@ public class AuthCrawler {
this.authJson = authJson; this.authJson = authJson;
} }
@Temporal(TemporalType.TIMESTAMP)
@Column(name = "CREATE_DATE", nullable = false, columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP", insertable = false, updatable = false)
public Date getCreateDate() { public Date getCreateDate() {
return createDate; return createDate;
} }

View File

@ -9,8 +9,17 @@ import java.util.Date;
@Entity @Entity
@Table(name = "DOMAIN", schema = "public") @Table(name = "DOMAIN", schema = "public")
public class Domain { public class Domain {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id; private Long id;
@Basic
@Column(name = "NAME", nullable = true, length = 50)
private String name; private String name;
@Temporal(TemporalType.TIMESTAMP)
@Column(name = "CREATE_DATE", nullable = false, columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP", insertable = false, updatable = false)
private Date createDate; private Date createDate;
public Domain() { public Domain() {
@ -20,8 +29,6 @@ public class Domain {
this.id = id; this.id = id;
} }
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
public Long getId() { public Long getId() {
return id; return id;
} }
@ -30,8 +37,6 @@ public class Domain {
this.id = id; this.id = id;
} }
@Basic
@Column(name = "NAME", nullable = true, length = 50)
public String getName() { public String getName() {
return name; return name;
} }
@ -40,8 +45,6 @@ public class Domain {
this.name = name; this.name = name;
} }
@Temporal(TemporalType.TIMESTAMP)
@Column(name = "CREATE_DATE", nullable = false, columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP", insertable = false, updatable = false)
public Date getCreateDate() { public Date getCreateDate() {
return createDate; return createDate;
} }

View File

@ -12,13 +12,23 @@ import javax.persistence.*;
@Entity @Entity
@Table(name = "DOMAIN_MEMBER", schema = "public") @Table(name = "DOMAIN_MEMBER", schema = "public")
public class DomainMember { public class DomainMember {
private Long id;
private Date createDate;
private Member member;
private Domain domain;
@Id @Id
@GeneratedValue(strategy = GenerationType.IDENTITY) @GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id;
@Basic
@Column(name = "CREATE_DATE", nullable = false, columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP", insertable = false, updatable = false)
private Date createDate;
@ManyToOne
@JoinColumn(name = "MEMBER_ID", nullable = false)
private Member member;
@ManyToOne
@JoinColumn(name = "DOMAIN_ID", nullable = false)
private Domain domain;
public Long getId() { public Long getId() {
return id; return id;
} }
@ -27,8 +37,6 @@ public class DomainMember {
this.id = id; this.id = id;
} }
@Basic
@Column(name = "CREATE_DATE", nullable = false, columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP", insertable = false, updatable = false)
public Date getCreateDate() { public Date getCreateDate() {
return createDate; return createDate;
} }
@ -37,8 +45,6 @@ public class DomainMember {
this.createDate = createDate; this.createDate = createDate;
} }
@ManyToOne
@JoinColumn(name = "MEMBER_ID", nullable = false)
public Member getMember() { public Member getMember() {
return member; return member;
} }
@ -47,8 +53,6 @@ public class DomainMember {
this.member = member; this.member = member;
} }
@ManyToOne
@JoinColumn(name = "DOMAIN_ID", nullable = false)
public Domain getDomain() { public Domain getDomain() {
return domain; return domain;
} }

View File

@ -12,15 +12,31 @@ import java.util.Date;
@Entity @Entity
@Table(name = "EMAIL_AUTH", schema = "public") @Table(name = "EMAIL_AUTH", schema = "public")
public class EmailAuth { public class EmailAuth {
private Long id;
private String emailAuthKey;
private Date createDate;
private Date authConfirmDate;
private Member member;
private MetaEmailType metaEmailType;
@Id @Id
@GeneratedValue(strategy = GenerationType.IDENTITY) @GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id;
@Basic
@Column(name = "EMAIL_AUTH_KEY", nullable = true, length = 50)
private String emailAuthKey;
@Basic
@Column(name = "CREATE_DATE", nullable = false, columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP", insertable = false, updatable = false)
private Date createDate;
@Basic
@Column(name = "AUTH_CONFIRM_DATE", nullable = true, insertable = true, updatable = true)
private Date authConfirmDate;
@ManyToOne
@JoinColumn(name = "MEMBER_ID", nullable = false)
private Member member;
@ManyToOne
@JoinColumn(name = "META_EMAIL_TYPE_ID", nullable = false)
private MetaEmailType metaEmailType;
public Long getId() { public Long getId() {
return id; return id;
} }
@ -29,8 +45,6 @@ public class EmailAuth {
this.id = id; this.id = id;
} }
@Basic
@Column(name = "EMAIL_AUTH_KEY", nullable = true, length = 50)
public String getEmailAuthKey() { public String getEmailAuthKey() {
return emailAuthKey; return emailAuthKey;
} }
@ -39,8 +53,6 @@ public class EmailAuth {
this.emailAuthKey = emailAuthKey; this.emailAuthKey = emailAuthKey;
} }
@Basic
@Column(name = "CREATE_DATE", nullable = false, columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP", insertable = false, updatable = false)
public Date getCreateDate() { public Date getCreateDate() {
return createDate; return createDate;
} }
@ -49,8 +61,6 @@ public class EmailAuth {
this.createDate = createDate; this.createDate = createDate;
} }
@Basic
@Column(name = "AUTH_CONFIRM_DATE", nullable = true, insertable = true, updatable = true)
public Date getAuthConfirmDate() { public Date getAuthConfirmDate() {
return authConfirmDate; return authConfirmDate;
} }
@ -59,8 +69,6 @@ public class EmailAuth {
this.authConfirmDate = authConfirmDate; this.authConfirmDate = authConfirmDate;
} }
@ManyToOne
@JoinColumn(name = "MEMBER_ID", nullable = false)
public Member getMember() { public Member getMember() {
return member; return member;
} }
@ -69,8 +77,6 @@ public class EmailAuth {
this.member = member; this.member = member;
} }
@ManyToOne
@JoinColumn(name = "META_EMAIL_TYPE_ID", nullable = false)
public MetaEmailType getMetaEmailType() { public MetaEmailType getMetaEmailType() {
return metaEmailType; return metaEmailType;
} }

View File

@ -14,18 +14,34 @@ import java.util.Date;
@Entity @Entity
@Table(name = "HISTORY", schema = "public") @Table(name = "HISTORY", schema = "public")
public class History { public class History {
private Long id;
private Date createDate;
private MetaHistoryType metaHistoryType;
private String message;
private Probe probe;
private Member member;
private Domain domain;
// private MetaResultType resultType; // i'm not sure this is necessary
@Id @Id
@GeneratedValue(strategy = GenerationType.IDENTITY) @GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id;
@Temporal(TemporalType.TIMESTAMP)
@Column(name = "CREATE_DATE", nullable = false, columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP", insertable = false, updatable = false)
private Date createDate;
@ManyToOne
@JoinColumn(name = "META_HISTORY_TYPE_ID", nullable = false)
private MetaHistoryType metaHistoryType;
@Column(name = "MESSAGE", nullable = false, length = 255)
private String message;
@ManyToOne
@JoinColumn(name = "PROBE_ID", nullable = false)
private Probe probe;
@ManyToOne
@JoinColumn(name = "MEMBER_ID", nullable = false)
private Member member;
@ManyToOne
@JoinColumn(name = "DOMAIN_ID", nullable = false)
private Domain domain;
public Long getId() { public Long getId() {
return id; return id;
} }
@ -34,8 +50,6 @@ public class History {
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() { public Date getCreateDate() {
return createDate; return createDate;
} }
@ -44,8 +58,6 @@ public class History {
this.createDate = createDate; this.createDate = createDate;
} }
@ManyToOne
@JoinColumn(name = "META_HISTORY_TYPE_ID", nullable = false)
public MetaHistoryType getMetaHistoryType() { public MetaHistoryType getMetaHistoryType() {
return metaHistoryType; return metaHistoryType;
} }
@ -54,7 +66,6 @@ public class History {
this.metaHistoryType = metaHistoryType; this.metaHistoryType = metaHistoryType;
} }
@Column(name = "MESSAGE", nullable = false, length = 255)
public String getMessage() { public String getMessage() {
return message; return message;
} }
@ -63,8 +74,6 @@ public class History {
this.message = message; this.message = message;
} }
@ManyToOne
@JoinColumn(name = "PROBE_ID", nullable = false)
public Probe getProbe() { public Probe getProbe() {
return probe; return probe;
} }
@ -73,8 +82,6 @@ public class History {
this.probe = probe; this.probe = probe;
} }
@ManyToOne
@JoinColumn(name = "MEMBER_ID", nullable = false)
public Member getMember() { public Member getMember() {
return member; return member;
} }
@ -83,8 +90,6 @@ public class History {
this.member = member; this.member = member;
} }
@ManyToOne
@JoinColumn(name = "DOMAIN_ID", nullable = false)
public Domain getDomain() { public Domain getDomain() {
return domain; return domain;
} }

View File

@ -13,9 +13,21 @@ import java.util.Date;
@Inheritance(strategy = InheritanceType.JOINED) @Inheritance(strategy = InheritanceType.JOINED)
@DiscriminatorColumn(name = "INFRA_TYPE", discriminatorType = DiscriminatorType.INTEGER) @DiscriminatorColumn(name = "INFRA_TYPE", discriminatorType = DiscriminatorType.INTEGER)
public abstract class Infra { public abstract class Infra {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id; private Long id;
@ManyToOne
@JoinColumn(name = "META_INFRA_TYPE_ID", nullable = false)
private MetaInfraType metaInfraType; private MetaInfraType metaInfraType;
@ManyToOne
@JoinColumn(name = "PROBE_ID", nullable = false)
private Probe probe; private Probe probe;
@Temporal(TemporalType.TIMESTAMP)
@Column(name = "CREATE_DATE", nullable = false, columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP", insertable = false, updatable = false)
private Date createDate; private Date createDate;
protected Infra() { protected Infra() {
@ -26,8 +38,6 @@ public abstract class Infra {
this.id = id; this.id = id;
} }
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
public Long getId() { public Long getId() {
return id; return id;
} }
@ -36,8 +46,6 @@ public abstract class Infra {
this.id = id; this.id = id;
} }
@ManyToOne
@JoinColumn(name = "META_INFRA_TYPE_ID", nullable = false)
public MetaInfraType getMetaInfraType() { public MetaInfraType getMetaInfraType() {
return metaInfraType; return metaInfraType;
} }
@ -46,8 +54,6 @@ public abstract class Infra {
this.metaInfraType = metaInfraType; this.metaInfraType = metaInfraType;
} }
@ManyToOne
@JoinColumn(name = "PROBE_ID", nullable = false)
public Probe getProbe() { public Probe getProbe() {
return probe; return probe;
} }
@ -56,8 +62,6 @@ public abstract class Infra {
this.probe = probe; this.probe = probe;
} }
@Temporal(TemporalType.TIMESTAMP)
@Column(name = "CREATE_DATE", nullable = false, columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP", insertable = false, updatable = false)
public Date getCreateDate() { public Date getCreateDate() {
return createDate; return createDate;
} }

View File

@ -18,15 +18,30 @@ import org.hibernate.annotations.FetchMode;
@Table(name = "INFRA_HOST", schema = "public") @Table(name = "INFRA_HOST", schema = "public")
@DiscriminatorValue("2") @DiscriminatorValue("2")
public class InfraHost extends Infra { public class InfraHost extends Infra {
@ManyToOne
@JoinColumn(name = "INFRA_ZONE_ID", nullable = false)
private InfraZone infraZone; private InfraZone infraZone;
@ManyToOne
@JoinColumn(name = "META_TARGET_HOST_TYPE_ID", nullable = false)
private MetaTargetHostType metaTargetHostType; private MetaTargetHostType metaTargetHostType;
@OneToOne(fetch = FetchType.EAGER, cascade = CascadeType.ALL)
@JoinColumn(name = "INFRA_HOST_MACHINE_ID", nullable = true)
private InfraHostMachine infraHostMachine; private InfraHostMachine infraHostMachine;
@OneToOne(fetch = FetchType.EAGER, cascade = CascadeType.ALL)
@JoinColumn(name = "INFRA_HOST_OS_ID", nullable = true)
private InfraHostOS infraHostOS; private InfraHostOS infraHostOS;
@OneToMany(fetch = FetchType.EAGER, cascade = CascadeType.ALL, orphanRemoval = true, mappedBy = "infraHost")
@Fetch(FetchMode.SELECT)
@JsonSerialize(using = InfraHostIPsSerializer.class) @JsonSerialize(using = InfraHostIPsSerializer.class)
private List<InfraHostIP> infraHostIPs; private List<InfraHostIP> infraHostIPs;
@ManyToOne
@JoinColumn(name = "CONTAINER_INFRA_HOST_ID", nullable = true)
private InfraHost containerInfraHost; private InfraHost containerInfraHost;
public InfraHost() { public InfraHost() {
@ -37,8 +52,6 @@ public class InfraHost extends Infra {
super(id); super(id);
} }
@ManyToOne
@JoinColumn(name = "INFRA_ZONE_ID", nullable = false)
public InfraZone getInfraZone() { public InfraZone getInfraZone() {
return infraZone; return infraZone;
} }
@ -47,8 +60,6 @@ public class InfraHost extends Infra {
this.infraZone = infraZone; this.infraZone = infraZone;
} }
@ManyToOne
@JoinColumn(name = "META_TARGET_HOST_TYPE_ID", nullable = false)
public MetaTargetHostType getMetaTargetHostType() { public MetaTargetHostType getMetaTargetHostType() {
return metaTargetHostType; return metaTargetHostType;
} }
@ -60,8 +71,6 @@ public class InfraHost extends Infra {
/** /**
* @return the infraHostMachine * @return the infraHostMachine
*/ */
@OneToOne(fetch = FetchType.EAGER, cascade = CascadeType.ALL)
@JoinColumn(name = "INFRA_HOST_MACHINE_ID", nullable = true)
public InfraHostMachine getInfraHostMachine() { public InfraHostMachine getInfraHostMachine() {
return infraHostMachine; return infraHostMachine;
} }
@ -76,8 +85,6 @@ public class InfraHost extends Infra {
/** /**
* @return the infraHostOS * @return the infraHostOS
*/ */
@OneToOne(fetch = FetchType.EAGER, cascade = CascadeType.ALL)
@JoinColumn(name = "INFRA_HOST_OS_ID", nullable = true)
public InfraHostOS getInfraHostOS() { public InfraHostOS getInfraHostOS() {
return infraHostOS; return infraHostOS;
} }
@ -92,8 +99,6 @@ public class InfraHost extends Infra {
/** /**
* @return the infraHostIPs * @return the infraHostIPs
*/ */
@OneToMany(fetch = FetchType.EAGER, cascade = CascadeType.ALL, orphanRemoval = true, mappedBy = "infraHost")
@Fetch(FetchMode.SELECT)
public List<InfraHostIP> getInfraHostIPs() { public List<InfraHostIP> getInfraHostIPs() {
return infraHostIPs; return infraHostIPs;
} }
@ -108,8 +113,6 @@ public class InfraHost extends Infra {
/** /**
* @return the containerInfraHost * @return the containerInfraHost
*/ */
@ManyToOne
@JoinColumn(name = "CONTAINER_INFRA_HOST_ID", nullable = true)
public InfraHost getContainerInfraHost() { public InfraHost getContainerInfraHost() {
return containerInfraHost; return containerInfraHost;
} }

View File

@ -10,13 +10,23 @@ import java.util.Date;
@Entity @Entity
@Table(name = "INFRA_HOST_APPLICATION", schema = "public") @Table(name = "INFRA_HOST_APPLICATION", schema = "public")
public class InfraHostApplication { public class InfraHostApplication {
private Long id;
private InfraHost infraHost;
private String name;
private Date createDate;
@Id @Id
@GeneratedValue(strategy = GenerationType.IDENTITY) @GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id;
@ManyToOne
@JoinColumn(name = "INFRA_HOST_ID", nullable = false)
private InfraHost infraHost;
@Basic
@Column(name = "NAME", nullable = true)
private String name;
@Temporal(TemporalType.TIMESTAMP)
@Column(name = "CREATE_DATE", nullable = false, columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP", insertable = false, updatable = false)
private Date createDate;
public Long getId() { public Long getId() {
return id; return id;
} }
@ -25,8 +35,6 @@ public class InfraHostApplication {
this.id = id; this.id = id;
} }
@ManyToOne
@JoinColumn(name = "INFRA_HOST_ID", nullable = false)
public InfraHost getInfraHost() { public InfraHost getInfraHost() {
return infraHost; return infraHost;
} }
@ -35,8 +43,6 @@ public class InfraHostApplication {
this.infraHost = infraHost; this.infraHost = infraHost;
} }
@Basic
@Column(name = "NAME", nullable = true)
public String getName() { public String getName() {
return name; return name;
} }
@ -45,8 +51,6 @@ public class InfraHostApplication {
this.name = name; this.name = name;
} }
@Temporal(TemporalType.TIMESTAMP)
@Column(name = "CREATE_DATE", nullable = false, columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP", insertable = false, updatable = false)
public Date getCreateDate() { public Date getCreateDate() {
return createDate; return createDate;
} }

View File

@ -10,13 +10,23 @@ import java.util.Date;
@Entity @Entity
@Table(name = "INFRA_HOST_DAEMON", schema = "public") @Table(name = "INFRA_HOST_DAEMON", schema = "public")
public class InfraHostDaemon { public class InfraHostDaemon {
private Long id;
private InfraHost infraHost;
private String name;
private Date createDate;
@Id @Id
@GeneratedValue(strategy = GenerationType.IDENTITY) @GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id;
@ManyToOne
@JoinColumn(name = "INFRA_HOST_ID", nullable = false)
private InfraHost infraHost;
@Basic
@Column(name = "NAME", nullable = true)
private String name;
@Temporal(TemporalType.TIMESTAMP)
@Column(name = "CREATE_DATE", nullable = false, columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP", insertable = false, updatable = false)
private Date createDate;
public Long getId() { public Long getId() {
return id; return id;
} }
@ -25,8 +35,6 @@ public class InfraHostDaemon {
this.id = id; this.id = id;
} }
@ManyToOne
@JoinColumn(name = "INFRA_HOST_ID", nullable = false)
public InfraHost getInfraHost() { public InfraHost getInfraHost() {
return infraHost; return infraHost;
} }
@ -35,8 +43,6 @@ public class InfraHostDaemon {
this.infraHost = infraHost; this.infraHost = infraHost;
} }
@Basic
@Column(name = "NAME", nullable = true)
public String getName() { public String getName() {
return name; return name;
} }
@ -45,9 +51,6 @@ public class InfraHostDaemon {
this.name = name; this.name = name;
} }
@Temporal(TemporalType.TIMESTAMP)
@Column(name = "CREATE_DATE", nullable = false, columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP", insertable = false, updatable = false)
public Date getCreateDate() { public Date getCreateDate() {
return createDate; return createDate;
} }

View File

@ -12,17 +12,39 @@ import java.util.Date;
@Entity @Entity
@Table(name = "INFRA_HOST_IP", schema = "public") @Table(name = "INFRA_HOST_IP", schema = "public")
public class InfraHostIP { public class InfraHostIP {
private Long id;
private InfraHost infraHost;
private MetaIPType metaIPType;
private String address;
private String mac;
private String iface;
private String gateway;
private Date createDate;
@Id @Id
@GeneratedValue(strategy = GenerationType.IDENTITY) @GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id;
@ManyToOne
@JoinColumn(name = "INFRA_HOST_ID", nullable = false)
private InfraHost infraHost;
@ManyToOne
@JoinColumn(name = "META_IP_TYPE_ID", nullable = true)
private MetaIPType metaIPType;
@Basic
@Column(name = "ADDRESS", nullable = true)
private String address;
@Basic
@Column(name = "MAC", nullable = true)
private String mac;
@Basic
@Column(name = "IFACE", nullable = true)
private String iface;
@Basic
@Column(name = "GATEWAY", nullable = true)
private String gateway;
@Temporal(TemporalType.TIMESTAMP)
@Column(name = "CREATE_DATE", nullable = false, columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP", insertable = false, updatable = false)
private Date createDate;
public Long getId() { public Long getId() {
return id; return id;
} }
@ -31,8 +53,6 @@ public class InfraHostIP {
this.id = id; this.id = id;
} }
@ManyToOne
@JoinColumn(name = "INFRA_HOST_ID", nullable = false)
public InfraHost getInfraHost() { public InfraHost getInfraHost() {
return infraHost; return infraHost;
} }
@ -41,8 +61,6 @@ public class InfraHostIP {
this.infraHost = infraHost; this.infraHost = infraHost;
} }
@ManyToOne
@JoinColumn(name = "META_IP_TYPE_ID", nullable = true)
public MetaIPType getMetaIPType() { public MetaIPType getMetaIPType() {
return metaIPType; return metaIPType;
} }
@ -51,8 +69,6 @@ public class InfraHostIP {
this.metaIPType = metaIPType; this.metaIPType = metaIPType;
} }
@Basic
@Column(name = "ADDRESS", nullable = true)
public String getAddress() { public String getAddress() {
return address; return address;
} }
@ -61,8 +77,6 @@ public class InfraHostIP {
this.address = address; this.address = address;
} }
@Basic
@Column(name = "MAC", nullable = true)
public String getMac() { public String getMac() {
return mac; return mac;
} }
@ -71,8 +85,6 @@ public class InfraHostIP {
this.mac = mac; this.mac = mac;
} }
@Basic
@Column(name = "IFACE", nullable = true)
public String getIface() { public String getIface() {
return iface; return iface;
} }
@ -81,8 +93,6 @@ public class InfraHostIP {
this.iface = iface; this.iface = iface;
} }
@Basic
@Column(name = "GATEWAY", nullable = true)
public String getGateway() { public String getGateway() {
return gateway; return gateway;
} }
@ -91,8 +101,6 @@ public class InfraHostIP {
this.gateway = gateway; this.gateway = gateway;
} }
@Temporal(TemporalType.TIMESTAMP)
@Column(name = "CREATE_DATE", nullable = false, columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP", insertable = false, updatable = false)
public Date getCreateDate() { public Date getCreateDate() {
return createDate; return createDate;
} }

View File

@ -10,12 +10,19 @@ import java.util.Date;
@Entity @Entity
@Table(name = "INFRA_HOST_MACHINE", schema = "public") @Table(name = "INFRA_HOST_MACHINE", schema = "public")
public class InfraHostMachine { public class InfraHostMachine {
private Long id;
private String meta;
private Date createDate;
@Id @Id
@GeneratedValue(strategy = GenerationType.IDENTITY) @GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id;
@Basic
@Column(name = "META", nullable = true, length = 2000)
private String meta;
@Temporal(TemporalType.TIMESTAMP)
@Column(name = "CREATE_DATE", nullable = false, columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP", insertable = false, updatable = false)
private Date createDate;
public Long getId() { public Long getId() {
return id; return id;
} }
@ -24,8 +31,6 @@ public class InfraHostMachine {
this.id = id; this.id = id;
} }
@Basic
@Column(name = "META", nullable = true, length = 2000)
public String getMeta() { public String getMeta() {
return meta; return meta;
} }
@ -34,8 +39,6 @@ public class InfraHostMachine {
this.meta = meta; this.meta = meta;
} }
@Temporal(TemporalType.TIMESTAMP)
@Column(name = "CREATE_DATE", nullable = false, columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP", insertable = false, updatable = false)
public Date getCreateDate() { public Date getCreateDate() {
return createDate; return createDate;
} }

View File

@ -10,19 +10,47 @@ import java.util.Date;
@Entity @Entity
@Table(name = "INFRA_HOST_OS", schema = "public") @Table(name = "INFRA_HOST_OS", schema = "public")
public class InfraHostOS { public class InfraHostOS {
private Long id;
private String name;
private String os;
private String platform;
private String platformFamily;
private String platformVersion;
private String kernelVersion;
private String hostID;
private String meta;
private Date createDate;
@Id @Id
@GeneratedValue(strategy = GenerationType.IDENTITY) @GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id;
@Basic
@Column(name = "NAME", nullable = true, length = 100)
private String name;
@Basic
@Column(name = "OS", nullable = true, length = 100)
private String os;
@Basic
@Column(name = "PLATFORM", nullable = true, length = 100)
private String platform;
@Basic
@Column(name = "PLATFORM_FAMILY", nullable = true, length = 100)
private String platformFamily;
@Basic
@Column(name = "PLATFORM_VERSION", nullable = true, length = 100)
private String platformVersion;
@Basic
@Column(name = "KERNEL_VERSION", nullable = true, length = 100)
private String kernelVersion;
@Basic
@Column(name = "HOST_ID", nullable = true, length = 50)
private String hostID;
@Basic
@Column(name = "META", nullable = true, length = 2000)
private String meta;
@Temporal(TemporalType.TIMESTAMP)
@Column(name = "CREATE_DATE", nullable = false, columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP", insertable = false, updatable = false)
private Date createDate;
public Long getId() { public Long getId() {
return id; return id;
} }
@ -34,8 +62,6 @@ public class InfraHostOS {
/** /**
* @return the name * @return the name
*/ */
@Basic
@Column(name = "NAME", nullable = true, length = 100)
public String getName() { public String getName() {
return name; return name;
} }
@ -50,8 +76,6 @@ public class InfraHostOS {
/** /**
* @return the os * @return the os
*/ */
@Basic
@Column(name = "OS", nullable = true, length = 100)
public String getOs() { public String getOs() {
return os; return os;
} }
@ -66,8 +90,6 @@ public class InfraHostOS {
/** /**
* @return the platform * @return the platform
*/ */
@Basic
@Column(name = "PLATFORM", nullable = true, length = 100)
public String getPlatform() { public String getPlatform() {
return platform; return platform;
} }
@ -82,8 +104,6 @@ public class InfraHostOS {
/** /**
* @return the platformFamily * @return the platformFamily
*/ */
@Basic
@Column(name = "PLATFORM_FAMILY", nullable = true, length = 100)
public String getPlatformFamily() { public String getPlatformFamily() {
return platformFamily; return platformFamily;
} }
@ -98,8 +118,6 @@ public class InfraHostOS {
/** /**
* @return the platformVersion * @return the platformVersion
*/ */
@Basic
@Column(name = "PLATFORM_VERSION", nullable = true, length = 100)
public String getPlatformVersion() { public String getPlatformVersion() {
return platformVersion; return platformVersion;
} }
@ -114,8 +132,6 @@ public class InfraHostOS {
/** /**
* @return the kernelVersion * @return the kernelVersion
*/ */
@Basic
@Column(name = "KERNEL_VERSION", nullable = true, length = 100)
public String getKernelVersion() { public String getKernelVersion() {
return kernelVersion; return kernelVersion;
} }
@ -130,8 +146,6 @@ public class InfraHostOS {
/** /**
* @return the hostID * @return the hostID
*/ */
@Basic
@Column(name = "HOST_ID", nullable = true, length = 50)
public String getHostID() { public String getHostID() {
return hostID; return hostID;
} }
@ -143,8 +157,6 @@ public class InfraHostOS {
this.hostID = hostID; this.hostID = hostID;
} }
@Basic
@Column(name = "META", nullable = true, length = 2000)
public String getMeta() { public String getMeta() {
return meta; return meta;
} }
@ -153,8 +165,6 @@ public class InfraHostOS {
this.meta = meta; this.meta = meta;
} }
@Temporal(TemporalType.TIMESTAMP)
@Column(name = "CREATE_DATE", nullable = false, columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP", insertable = false, updatable = false)
public Date getCreateDate() { public Date getCreateDate() {
return createDate; return createDate;
} }

View File

@ -12,14 +12,27 @@ import java.util.Date;
@Entity @Entity
@Table(name = "INFRA_HOST_PORT", schema = "public") @Table(name = "INFRA_HOST_PORT", schema = "public")
public class InfraHostPort { public class InfraHostPort {
private Long id;
private InfraHostIP infraHostIP;
private MetaPortType metaPortType;
private Integer port;
private Date createDate;
@Id @Id
@GeneratedValue(strategy = GenerationType.IDENTITY) @GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id;
@ManyToOne
@JoinColumn(name = "INFRA_HOST_IP_ID", nullable = false)
private InfraHostIP infraHostIP;
@ManyToOne
@JoinColumn(name = "META_PORT_TYPE_ID", nullable = true)
private MetaPortType metaPortType;
@Basic
@Column(name = "PORT", nullable = true)
private Integer port;
@Temporal(TemporalType.TIMESTAMP)
@Column(name = "CREATE_DATE", nullable = false, columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP", insertable = false, updatable = false)
private Date createDate;
public Long getId() { public Long getId() {
return id; return id;
} }
@ -28,8 +41,6 @@ public class InfraHostPort {
this.id = id; this.id = id;
} }
@ManyToOne
@JoinColumn(name = "INFRA_HOST_IP_ID", nullable = false)
public InfraHostIP getInfraHostIP() { public InfraHostIP getInfraHostIP() {
return infraHostIP; return infraHostIP;
} }
@ -38,8 +49,6 @@ public class InfraHostPort {
this.infraHostIP = infraHostIP; this.infraHostIP = infraHostIP;
} }
@ManyToOne
@JoinColumn(name = "META_PORT_TYPE_ID", nullable = true)
public MetaPortType getMetaPortType() { public MetaPortType getMetaPortType() {
return metaPortType; return metaPortType;
} }
@ -48,8 +57,6 @@ public class InfraHostPort {
this.metaPortType = metaPortType; this.metaPortType = metaPortType;
} }
@Basic
@Column(name = "PORT", nullable = true)
public Integer getPort() { public Integer getPort() {
return port; return port;
} }
@ -58,8 +65,6 @@ public class InfraHostPort {
this.port = port; this.port = port;
} }
@Temporal(TemporalType.TIMESTAMP)
@Column(name = "CREATE_DATE", nullable = false, columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP", insertable = false, updatable = false)
public Date getCreateDate() { public Date getCreateDate() {
return createDate; return createDate;
} }

View File

@ -13,9 +13,20 @@ import com.loafle.overflow.model.meta.MetaTargetServiceType;
@DiscriminatorValue("3") @DiscriminatorValue("3")
public class InfraService extends Infra { public class InfraService extends Infra {
@ManyToOne
@JoinColumn(name = "META_TARGET_SERVICE_TYPE_ID", nullable = true)
private MetaTargetServiceType metaTargetServiceType; private MetaTargetServiceType metaTargetServiceType;
@OneToOne
@JoinColumn(name = "INFRA_HOST_PORT_ID", nullable = true)
private InfraHostPort infraHostPort; private InfraHostPort infraHostPort;
@ManyToOne
@JoinColumn(name = "META_CRYPTO_TYPE_ID", nullable = true)
private MetaCryptoType metaCryptoType; private MetaCryptoType metaCryptoType;
@Basic
@Column(name = "DESCRIPTION", nullable = true, length = 500)
private String description; private String description;
public InfraService() { public InfraService() {
@ -26,8 +37,6 @@ public class InfraService extends Infra {
super(id); super(id);
} }
@ManyToOne
@JoinColumn(name = "META_TARGET_SERVICE_TYPE_ID", nullable = true)
public MetaTargetServiceType getMetaTargetServiceType() { public MetaTargetServiceType getMetaTargetServiceType() {
return metaTargetServiceType; return metaTargetServiceType;
} }
@ -36,8 +45,6 @@ public class InfraService extends Infra {
this.metaTargetServiceType = metaTargetServiceType; this.metaTargetServiceType = metaTargetServiceType;
} }
@OneToOne
@JoinColumn(name = "INFRA_HOST_PORT_ID", nullable = true)
public InfraHostPort getInfraHostPort() { public InfraHostPort getInfraHostPort() {
return infraHostPort; return infraHostPort;
} }
@ -46,8 +53,6 @@ public class InfraService extends Infra {
this.infraHostPort = infraHostPort; this.infraHostPort = infraHostPort;
} }
@ManyToOne
@JoinColumn(name = "META_CRYPTO_TYPE_ID", nullable = true)
public MetaCryptoType getMetaCryptoType() { public MetaCryptoType getMetaCryptoType() {
return metaCryptoType; return metaCryptoType;
} }
@ -59,8 +64,6 @@ public class InfraService extends Infra {
/** /**
* @return the description * @return the description
*/ */
@Basic
@Column(name = "DESCRIPTION", nullable = true, length = 500)
public String getDescription() { public String getDescription() {
return description; return description;
} }

View File

@ -12,12 +12,29 @@ import com.loafle.overflow.model.meta.MetaTargetZoneType;
@Table(name = "INFRA_ZONE", schema = "public") @Table(name = "INFRA_ZONE", schema = "public")
@DiscriminatorValue("1") @DiscriminatorValue("1")
public class InfraZone extends Infra { public class InfraZone extends Infra {
@ManyToOne
@JoinColumn(name = "META_TARGET_ZONE_TYPE_ID", nullable = true)
private MetaTargetZoneType metaTargetZoneType; private MetaTargetZoneType metaTargetZoneType;
@ManyToOne
@JoinColumn(name = "META_IP_TYPE_ID", nullable = true)
private MetaIPType metaIPType; private MetaIPType metaIPType;
@Basic
@Column(name = "NETWORK", nullable = true)
private String network; private String network;
@Basic
@Column(name = "IFACE", nullable = true)
private String iface; private String iface;
@Basic
@Column(name = "ADDRESS", nullable = true)
private String address; private String address;
@Basic
@Column(name = "MAC", nullable = true)
private String mac; private String mac;
public InfraZone() { public InfraZone() {
@ -28,8 +45,6 @@ public class InfraZone extends Infra {
super(id); super(id);
} }
@ManyToOne
@JoinColumn(name = "META_TARGET_ZONE_TYPE_ID", nullable = true)
public MetaTargetZoneType getMetaTargetZoneType() { public MetaTargetZoneType getMetaTargetZoneType() {
return metaTargetZoneType; return metaTargetZoneType;
} }
@ -38,8 +53,6 @@ public class InfraZone extends Infra {
this.metaTargetZoneType = metaTargetZoneType; this.metaTargetZoneType = metaTargetZoneType;
} }
@Basic
@Column(name = "NETWORK", nullable = true)
public String getNetwork() { public String getNetwork() {
return network; return network;
} }
@ -48,8 +61,6 @@ public class InfraZone extends Infra {
this.network = network; this.network = network;
} }
@Basic
@Column(name = "IFACE", nullable = true)
public String getIface() { public String getIface() {
return iface; return iface;
} }
@ -58,8 +69,6 @@ public class InfraZone extends Infra {
this.iface = iface; this.iface = iface;
} }
@ManyToOne
@JoinColumn(name = "META_IP_TYPE_ID", nullable = true)
public MetaIPType getMetaIPType() { public MetaIPType getMetaIPType() {
return metaIPType; return metaIPType;
} }
@ -68,8 +77,6 @@ public class InfraZone extends Infra {
this.metaIPType = metaIPType; this.metaIPType = metaIPType;
} }
@Basic
@Column(name = "ADDRESS", nullable = true)
public String getAddress() { public String getAddress() {
return address; return address;
} }
@ -78,8 +85,6 @@ public class InfraZone extends Infra {
this.address = address; this.address = address;
} }
@Basic
@Column(name = "MAC", nullable = true)
public String getMac() { public String getMac() {
return mac; return mac;
} }

View File

@ -12,15 +12,45 @@ import java.util.Date;
@Entity @Entity
@Table(name = "MEMBER", schema = "public") @Table(name = "MEMBER", schema = "public")
public class Member { public class Member {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id; private Long id;
@Basic
@Column(name = "EMAIL", nullable = false, length = 50)
private String email; private String email;
@Basic
@JsonIgnore
@Column(name = "PW", nullable = true, length = 64)
private transient String pw; private transient String pw;
@Basic
@Column(name = "NAME", nullable = true, length = 50)
private String name; private String name;
@Basic
@Column(name = "PHONE", nullable = true, length = 50)
private String phone; private String phone;
@Basic
@Column(name = "COMPANY_NAME", nullable = true, length = 50)
private String companyName; private String companyName;
@Temporal(TemporalType.TIMESTAMP)
@Column(name = "CREATE_DATE", nullable = false, columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP", insertable = false, updatable = false)
private Date createDate; private Date createDate;
@ManyToOne
@JoinColumn(name = "META_MEMBER_STATUS_ID", nullable = false)
private MetaMemberStatus metaMemberStatus; private MetaMemberStatus metaMemberStatus;
@Column(name = "SIGNIN_FAIL_COUNT", nullable = true, columnDefinition = "int default 0")
private Integer signinFailCount; private Integer signinFailCount;
@Basic
@Column(name = "TOTP_TYPE", nullable = false, columnDefinition = "Boolean default false")
private Boolean totpType; private Boolean totpType;
public Member() { public Member() {
@ -30,8 +60,6 @@ public class Member {
this.id = id; this.id = id;
} }
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
public Long getId() { public Long getId() {
return id; return id;
} }
@ -40,8 +68,6 @@ public class Member {
this.id = id; this.id = id;
} }
@Basic
@Column(name = "EMAIL", nullable = false, length = 50)
public String getEmail() { public String getEmail() {
return email; return email;
} }
@ -50,9 +76,6 @@ public class Member {
this.email = email; this.email = email;
} }
@Basic
@JsonIgnore
@Column(name = "PW", nullable = true, length = 64)
public String getPw() { public String getPw() {
return pw; return pw;
} }
@ -61,8 +84,6 @@ public class Member {
this.pw = pw; this.pw = pw;
} }
@Basic
@Column(name = "NAME", nullable = true, length = 50)
public String getName() { public String getName() {
return name; return name;
} }
@ -71,8 +92,6 @@ public class Member {
this.name = name; this.name = name;
} }
@Basic
@Column(name = "PHONE", nullable = true, length = 50)
public String getPhone() { public String getPhone() {
return phone; return phone;
} }
@ -81,8 +100,6 @@ public class Member {
this.phone = phone; this.phone = phone;
} }
@Basic
@Column(name = "COMPANY_NAME", nullable = true, length = 50)
public String getCompanyName() { public String getCompanyName() {
return companyName; return companyName;
} }
@ -91,8 +108,6 @@ public class Member {
this.companyName = companyName; this.companyName = companyName;
} }
@Temporal(TemporalType.TIMESTAMP)
@Column(name = "CREATE_DATE", nullable = false, columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP", insertable = false, updatable = false)
public Date getCreateDate() { public Date getCreateDate() {
return createDate; return createDate;
} }
@ -101,8 +116,6 @@ public class Member {
this.createDate = createDate; this.createDate = createDate;
} }
@ManyToOne
@JoinColumn(name = "META_MEMBER_STATUS_ID", nullable = false)
public MetaMemberStatus getMetaMemberStatus() { public MetaMemberStatus getMetaMemberStatus() {
return metaMemberStatus; return metaMemberStatus;
} }
@ -111,7 +124,6 @@ public class Member {
this.metaMemberStatus = metaMemberStatus; this.metaMemberStatus = metaMemberStatus;
} }
@Column(name = "SIGNIN_FAIL_COUNT", nullable = true, columnDefinition = "int default 0")
public Integer getSigninFailCount() { public Integer getSigninFailCount() {
return this.signinFailCount; return this.signinFailCount;
} }
@ -120,8 +132,6 @@ public class Member {
this.signinFailCount = failCount; this.signinFailCount = failCount;
} }
@Basic
@Column(name = "TOTP_TYPE", nullable = false, columnDefinition = "Boolean default false")
public Boolean isTotpType() { public Boolean isTotpType() {
return totpType; return totpType;
} }

View File

@ -9,11 +9,28 @@ import java.util.Date;
@Entity @Entity
@Table(name = "MEMBER_TOTP", schema = "public") @Table(name = "MEMBER_TOTP", schema = "public")
public class MemberTotp { public class MemberTotp {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id; private Long id;
@OneToOne
@JoinColumn(name = "MEMBER_ID", nullable = false)
private Member member; private Member member;
@Basic
@Column(name = "SECRET_CODE", nullable = false, length = 20)
private String secretCode; private String secretCode;
@Temporal(TemporalType.TIMESTAMP)
@Column(name = "CREATE_DATE", nullable = false, columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP", insertable = false, updatable = false)
private Date createDate; private Date createDate;
@Temporal(TemporalType.TIMESTAMP)
@Column(name = "UPDATE_DATE", nullable = false, columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP", insertable = false, updatable = true)
private Date updateDate; private Date updateDate;
@Transient
private String otpAuth; private String otpAuth;
public MemberTotp() { public MemberTotp() {
@ -23,8 +40,6 @@ public class MemberTotp {
this.id = id; this.id = id;
} }
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
public Long getId() { public Long getId() {
return id; return id;
} }
@ -33,8 +48,6 @@ public class MemberTotp {
this.id = id; this.id = id;
} }
@OneToOne
@JoinColumn(name = "MEMBER_ID", nullable = false)
public Member getMember() { public Member getMember() {
return member; return member;
} }
@ -43,8 +56,6 @@ public class MemberTotp {
this.member = member; this.member = member;
} }
@Basic
@Column(name = "SECRET_CODE", nullable = false, length = 20)
public String getSecretCode() { public String getSecretCode() {
return secretCode; return secretCode;
} }
@ -53,8 +64,6 @@ public class MemberTotp {
this.secretCode = secretCode; this.secretCode = secretCode;
} }
@Temporal(TemporalType.TIMESTAMP)
@Column(name = "CREATE_DATE", nullable = false, columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP", insertable = false, updatable = false)
public Date getCreateDate() { public Date getCreateDate() {
return createDate; return createDate;
} }
@ -63,8 +72,6 @@ public class MemberTotp {
this.createDate = createDate; this.createDate = createDate;
} }
@Temporal(TemporalType.TIMESTAMP)
@Column(name = "UPDATE_DATE", nullable = false, columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP", insertable = false, updatable = true)
public Date getUpdateDate() { public Date getUpdateDate() {
return updateDate; return updateDate;
} }
@ -73,7 +80,6 @@ public class MemberTotp {
this.updateDate = updateDate; this.updateDate = updateDate;
} }
@Transient
public String getOtpAuth() { public String getOtpAuth() {
return otpAuth; return otpAuth;
} }

View File

@ -9,13 +9,24 @@ import java.util.Date;
@Entity @Entity
@Table(name = "META_CRAWLER", schema = "public") @Table(name = "META_CRAWLER", schema = "public")
public class MetaCrawler { public class MetaCrawler {
private Short id;
private String key;
private String name;
private Boolean isDefault;
private Date createDate;
@Id @Id
private Short id;
@Column(name = "KEY", nullable = true, length = 50)
private String key;
@Column(name = "NAME", nullable = true, length = 50)
private String name;
@Basic
@Column(name = "IS_DEFAULT", nullable = false, columnDefinition = "Boolean default false")
private Boolean isDefault;
@Temporal(TemporalType.TIMESTAMP)
@Column(name = "CREATE_DATE", nullable = false, columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP", insertable = false, updatable = false)
private Date createDate;
public Short getId() { public Short getId() {
return id; return id;
} }
@ -24,7 +35,6 @@ public class MetaCrawler {
this.id = id; this.id = id;
} }
@Column(name = "KEY", nullable = true, length = 50)
public String getKey() { public String getKey() {
return key; return key;
} }
@ -33,7 +43,6 @@ public class MetaCrawler {
this.key = key; this.key = key;
} }
@Column(name = "NAME", nullable = true, length = 50)
public String getName() { public String getName() {
return name; return name;
} }
@ -42,8 +51,6 @@ public class MetaCrawler {
this.name = name; this.name = name;
} }
@Basic
@Column(name = "IS_DEFAULT", nullable = false, columnDefinition = "Boolean default false")
public Boolean getDefault() { public Boolean getDefault() {
return isDefault; return isDefault;
} }
@ -52,8 +59,6 @@ public class MetaCrawler {
isDefault = aDefault; isDefault = aDefault;
} }
@Temporal(TemporalType.TIMESTAMP)
@Column(name = "CREATE_DATE", nullable = false, columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP", insertable = false, updatable = false)
public Date getCreateDate() { public Date getCreateDate() {
return createDate; return createDate;
} }

View File

@ -9,18 +9,40 @@ import java.util.Date;
@Entity @Entity
@Table(name = "META_CRAWLER_INPUT_ITEM", schema = "public") @Table(name = "META_CRAWLER_INPUT_ITEM", schema = "public")
public class MetaCrawlerInputItem { public class MetaCrawlerInputItem {
private Integer id;
private String name;
private MetaInputType metaInputType;
private MetaCrawler metaCrawler;
private Boolean required;
private String defaultValue;
private String pattern;
private String keyName;
private String keyValue;
private Date createDate;
@Id @Id
private Integer id;
@Column(name = "NAME", nullable = true, length = 50)
private String name;
@ManyToOne
@JoinColumn(name = "META_INPUT_TYPE_ID", nullable = false)
private MetaInputType metaInputType;
@ManyToOne
@JoinColumn(name = "META_CRAWLER_ID", nullable = false)
private MetaCrawler metaCrawler;
@Column(name = "REQUIRED", nullable = false)
private Boolean required;
@Column(name = "DEFAULT_VALUE", nullable = true, length = 50)
private String defaultValue;
@Column(name = "PATTERN", nullable = true, length = 50)
private String pattern;
@Column(name = "KEY_NAME", nullable = true, length = 50)
private String keyName;
@Column(name = "KEY_VALUE", nullable = true, length = 50)
private String keyValue;
@Temporal(TemporalType.TIMESTAMP)
@Column(name = "CREATE_DATE", nullable = false, columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP", insertable = false, updatable = false)
private Date createDate;
public Integer getId() { public Integer getId() {
return id; return id;
} }
@ -29,8 +51,6 @@ public class MetaCrawlerInputItem {
this.id = id; this.id = id;
} }
@ManyToOne
@JoinColumn(name = "META_INPUT_TYPE_ID", nullable = false)
public MetaInputType getMetaInputType() { public MetaInputType getMetaInputType() {
return metaInputType; return metaInputType;
} }
@ -39,8 +59,6 @@ public class MetaCrawlerInputItem {
this.metaInputType = metaInputType; this.metaInputType = metaInputType;
} }
@ManyToOne
@JoinColumn(name = "META_CRAWLER_ID", nullable = false)
public MetaCrawler getMetaCrawler() { public MetaCrawler getMetaCrawler() {
return metaCrawler; return metaCrawler;
} }
@ -49,7 +67,6 @@ public class MetaCrawlerInputItem {
this.metaCrawler = metaCrawler; this.metaCrawler = metaCrawler;
} }
@Column(name = "NAME", nullable = true, length = 50)
public String getName() { public String getName() {
return name; return name;
} }
@ -58,8 +75,6 @@ public class MetaCrawlerInputItem {
this.name = name; this.name = name;
} }
@Temporal(TemporalType.TIMESTAMP)
@Column(name = "CREATE_DATE", nullable = false, columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP", insertable = false, updatable = false)
public Date getCreateDate() { public Date getCreateDate() {
return createDate; return createDate;
} }
@ -68,7 +83,6 @@ public class MetaCrawlerInputItem {
this.createDate = createDate; this.createDate = createDate;
} }
@Column(name = "REQUIRED", nullable = false)
public Boolean isRequired() { public Boolean isRequired() {
return required; return required;
} }
@ -77,7 +91,6 @@ public class MetaCrawlerInputItem {
this.required = required; this.required = required;
} }
@Column(name = "DEFAULT_VALUE", nullable = true, length = 50)
public String getDefaultValue() { public String getDefaultValue() {
return defaultValue; return defaultValue;
} }
@ -86,7 +99,6 @@ public class MetaCrawlerInputItem {
this.defaultValue = defaultValue; this.defaultValue = defaultValue;
} }
@Column(name = "PATTERN", nullable = true, length = 50)
public String getPattern() { public String getPattern() {
return pattern; return pattern;
} }
@ -95,7 +107,6 @@ public class MetaCrawlerInputItem {
this.pattern = pattern; this.pattern = pattern;
} }
@Column(name = "KEY_NAME", nullable = true, length = 50)
public String getKeyName() { public String getKeyName() {
return keyName; return keyName;
} }
@ -104,7 +115,6 @@ public class MetaCrawlerInputItem {
this.keyName = keyName; this.keyName = keyName;
} }
@Column(name = "KEY_VALUE", nullable = true, length = 50)
public String getKeyValue() { public String getKeyValue() {
return keyValue; return keyValue;
} }

View File

@ -11,13 +11,22 @@ import javax.persistence.*;
@Table(name = "META_CRAWLER_MAPPING", schema = "public") @Table(name = "META_CRAWLER_MAPPING", schema = "public")
public class MetaCrawlerMapping { public class MetaCrawlerMapping {
private Long id;
private MetaTargetType metaTargetType;
private MetaCrawler metaCrawler;
private Date createDate;
@Id @Id
@GeneratedValue(strategy = GenerationType.IDENTITY) @GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id;
@ManyToOne
@JoinColumn(name = "META_TARGET_TYPE_ID", nullable = false)
private MetaTargetType metaTargetType;
@ManyToOne
@JoinColumn(name = "META_CRAWLER_ID", nullable = false)
private MetaCrawler metaCrawler;
@Temporal(TemporalType.TIMESTAMP)
@Column(name = "CREATE_DATE", nullable = false, columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP", insertable = false, updatable = false)
private Date createDate;
public Long getId() { public Long getId() {
return id; return id;
} }
@ -26,8 +35,6 @@ public class MetaCrawlerMapping {
this.id = id; this.id = id;
} }
@ManyToOne
@JoinColumn(name = "META_TARGET_TYPE_ID", nullable = false)
public MetaTargetType getMetaTargetType() { public MetaTargetType getMetaTargetType() {
return metaTargetType; return metaTargetType;
} }
@ -36,8 +43,6 @@ public class MetaCrawlerMapping {
this.metaTargetType = metaTargetType; this.metaTargetType = metaTargetType;
} }
@ManyToOne
@JoinColumn(name = "META_CRAWLER_ID", nullable = false)
public MetaCrawler getMetaCrawler() { public MetaCrawler getMetaCrawler() {
return metaCrawler; return metaCrawler;
} }
@ -46,8 +51,6 @@ public class MetaCrawlerMapping {
this.metaCrawler = metaCrawler; this.metaCrawler = metaCrawler;
} }
@Temporal(TemporalType.TIMESTAMP)
@Column(name = "CREATE_DATE", nullable = false, columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP", insertable = false, updatable = false)
public Date getCreateDate() { public Date getCreateDate() {
return createDate; return createDate;
} }

View File

@ -7,9 +7,17 @@ import java.util.Date;
@Table(name = "META_CRYPTO_TYPE", schema = "public") @Table(name = "META_CRYPTO_TYPE", schema = "public")
public class MetaCryptoType { public class MetaCryptoType {
@Id
private Short id; private Short id;
@Column(name = "NAME", nullable = true, length = 50)
private String name; private String name;
@Column(name = "KEY", nullable = true, length = 50)
private String key; private String key;
@Temporal(TemporalType.TIMESTAMP)
@Column(name = "CREATE_DATE", nullable = false, columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP", insertable = false, updatable = false)
private Date createDate; private Date createDate;
public MetaCryptoType() { public MetaCryptoType() {
@ -19,7 +27,6 @@ public class MetaCryptoType {
this.id = id; this.id = id;
} }
@Id
public Short getId() { public Short getId() {
return id; return id;
} }
@ -28,7 +35,6 @@ public class MetaCryptoType {
this.id = id; this.id = id;
} }
@Column(name = "KEY", nullable = true, length = 50)
public String getKey() { public String getKey() {
return key; return key;
} }
@ -37,7 +43,6 @@ public class MetaCryptoType {
this.key = key; this.key = key;
} }
@Column(name = "NAME", nullable = true, length = 50)
public String getName() { public String getName() {
return name; return name;
} }
@ -46,8 +51,6 @@ public class MetaCryptoType {
this.name = name; this.name = name;
} }
@Temporal(TemporalType.TIMESTAMP)
@Column(name = "CREATE_DATE", nullable = false, columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP", insertable = false, updatable = false)
public Date getCreateDate() { public Date getCreateDate() {
return createDate; return createDate;
} }

View File

@ -7,9 +7,17 @@ import java.util.Date;
@Table(name = "META_EMAIL_TYPE", schema = "public") @Table(name = "META_EMAIL_TYPE", schema = "public")
public class MetaEmailType { public class MetaEmailType {
@Id
private Short id; private Short id;
@Column(name = "NAME", nullable = true, length = 50)
private String name; private String name;
@Column(name = "KEY", nullable = true, length = 50)
private String key; private String key;
@Temporal(TemporalType.TIMESTAMP)
@Column(name = "CREATE_DATE", nullable = false, columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP", insertable = false, updatable = false)
private Date createDate; private Date createDate;
public MetaEmailType() { public MetaEmailType() {
@ -19,7 +27,6 @@ public class MetaEmailType {
this.id = id; this.id = id;
} }
@Id
public Short getId() { public Short getId() {
return id; return id;
} }
@ -28,7 +35,6 @@ public class MetaEmailType {
this.id = id; this.id = id;
} }
@Column(name = "KEY", nullable = true, length = 50)
public String getKey() { public String getKey() {
return key; return key;
} }
@ -37,7 +43,6 @@ public class MetaEmailType {
this.key = key; this.key = key;
} }
@Column(name = "NAME", nullable = true, length = 50)
public String getName() { public String getName() {
return name; return name;
} }
@ -46,8 +51,6 @@ public class MetaEmailType {
this.name = name; this.name = name;
} }
@Temporal(TemporalType.TIMESTAMP)
@Column(name = "CREATE_DATE", nullable = false, columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP", insertable = false, updatable = false)
public Date getCreateDate() { public Date getCreateDate() {
return createDate; return createDate;
} }
@ -57,9 +60,7 @@ public class MetaEmailType {
} }
public static enum Enum { public static enum Enum {
SIGNUP((short)1), SIGNUP((short) 1), RESET_PASSWORD((short) 2),;
RESET_PASSWORD((short)2),
;
private final Short value; private final Short value;

View File

@ -9,9 +9,18 @@ import java.util.Date;
@Entity @Entity
@Table(name = "META_HISTORY_TYPE", schema = "public") @Table(name = "META_HISTORY_TYPE", schema = "public")
public class MetaHistoryType { public class MetaHistoryType {
@Id
private Integer id; private Integer id;
@Column(name = "KEY", nullable = true, length = 50)
private String key; private String key;
@Column(name = "NAME", nullable = true, length = 50)
private String name; private String name;
@Temporal(TemporalType.TIMESTAMP)
@Column(name = "CREATE_DATE", nullable = false, columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP", insertable = false, updatable = false)
private Date createDate; private Date createDate;
public MetaHistoryType() { public MetaHistoryType() {
@ -22,7 +31,6 @@ public class MetaHistoryType {
this.id = id; this.id = id;
} }
@Id
public Integer getId() { public Integer getId() {
return id; return id;
} }
@ -31,7 +39,6 @@ public class MetaHistoryType {
this.id = id; this.id = id;
} }
@Column(name = "KEY", nullable = true, length = 50)
public String getKey() { public String getKey() {
return key; return key;
} }
@ -40,7 +47,6 @@ public class MetaHistoryType {
this.key = key; this.key = key;
} }
@Column(name = "NAME", nullable = true, length = 50)
public String getName() { public String getName() {
return name; return name;
} }
@ -49,8 +55,6 @@ public class MetaHistoryType {
this.name = name; this.name = name;
} }
@Temporal(TemporalType.TIMESTAMP)
@Column(name = "CREATE_DATE", nullable = false, columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP", insertable = false, updatable = false)
public Date getCreateDate() { public Date getCreateDate() {
return createDate; return createDate;
} }

View File

@ -7,9 +7,17 @@ import java.util.Date;
@Table(name = "META_IP_TYPE", schema = "public") @Table(name = "META_IP_TYPE", schema = "public")
public class MetaIPType { public class MetaIPType {
@Id
private Short id; private Short id;
@Column(name = "NAME", nullable = true, length = 50)
private String name; private String name;
@Column(name = "KEY", nullable = true, length = 50)
private String key; private String key;
@Temporal(TemporalType.TIMESTAMP)
@Column(name = "CREATE_DATE", nullable = false, columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP", insertable = false, updatable = false)
private Date createDate; private Date createDate;
public MetaIPType() { public MetaIPType() {
@ -19,7 +27,6 @@ public class MetaIPType {
this.id = id; this.id = id;
} }
@Id
public Short getId() { public Short getId() {
return id; return id;
} }
@ -28,7 +35,6 @@ public class MetaIPType {
this.id = id; this.id = id;
} }
@Column(name = "KEY", nullable = true, length = 50)
public String getKey() { public String getKey() {
return key; return key;
} }
@ -37,7 +43,6 @@ public class MetaIPType {
this.key = key; this.key = key;
} }
@Column(name = "NAME", nullable = true, length = 50)
public String getName() { public String getName() {
return name; return name;
} }
@ -46,8 +51,6 @@ public class MetaIPType {
this.name = name; this.name = name;
} }
@Temporal(TemporalType.TIMESTAMP)
@Column(name = "CREATE_DATE", nullable = false, columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP", insertable = false, updatable = false)
public Date getCreateDate() { public Date getCreateDate() {
return createDate; return createDate;
} }

View File

@ -9,9 +9,18 @@ import java.util.Date;
@Entity @Entity
@Table(name = "META_INFRA_TYPE", schema = "public") @Table(name = "META_INFRA_TYPE", schema = "public")
public class MetaInfraType { public class MetaInfraType {
@Id
private Short id; private Short id;
@Column(name = "KEY", nullable = true, length = 50)
private String key; private String key;
@Column(name = "NAME", nullable = true, length = 50)
private String name; private String name;
@Temporal(TemporalType.TIMESTAMP)
@Column(name = "CREATE_DATE", nullable = false, columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP", insertable = false, updatable = false)
private Date createDate; private Date createDate;
public MetaInfraType() { public MetaInfraType() {
@ -21,7 +30,6 @@ public class MetaInfraType {
this.id = id; this.id = id;
} }
@Id
public Short getId() { public Short getId() {
return id; return id;
} }
@ -30,7 +38,6 @@ public class MetaInfraType {
this.id = id; this.id = id;
} }
@Column(name = "KEY", nullable = true, length = 50)
public String getKey() { public String getKey() {
return key; return key;
} }
@ -39,7 +46,6 @@ public class MetaInfraType {
this.key = key; this.key = key;
} }
@Column(name = "NAME", nullable = true, length = 50)
public String getName() { public String getName() {
return name; return name;
} }
@ -48,8 +54,6 @@ public class MetaInfraType {
this.name = name; this.name = name;
} }
@Temporal(TemporalType.TIMESTAMP)
@Column(name = "CREATE_DATE", nullable = false, columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP", insertable = false, updatable = false)
public Date getCreateDate() { public Date getCreateDate() {
return createDate; return createDate;
} }
@ -59,10 +63,7 @@ public class MetaInfraType {
} }
public static enum Enum { public static enum Enum {
ZONE((short)1), ZONE((short) 1), HOST((short) 2), SERVICE((short) 3),;
HOST((short)2),
SERVICE((short)3),
;
private final Short value; private final Short value;

View File

@ -9,12 +9,20 @@ import java.util.Date;
@Entity @Entity
@Table(name = "META_INPUT_TYPE", schema = "public") @Table(name = "META_INPUT_TYPE", schema = "public")
public class MetaInputType { public class MetaInputType {
private Short id;
private String key;
private String name;
private Date createDate;
@Id @Id
private Short id;
@Column(name = "KEY", nullable = true, length = 50)
private String key;
@Column(name = "NAME", nullable = true, length = 50)
private String name;
@Temporal(TemporalType.TIMESTAMP)
@Column(name = "CREATE_DATE", nullable = false, columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP", insertable = false, updatable = false)
private Date createDate;
public Short getId() { public Short getId() {
return id; return id;
} }
@ -23,7 +31,6 @@ public class MetaInputType {
this.id = id; this.id = id;
} }
@Column(name = "KEY", nullable = true, length = 50)
public String getKey() { public String getKey() {
return key; return key;
} }
@ -32,7 +39,6 @@ public class MetaInputType {
this.key = key; this.key = key;
} }
@Column(name = "NAME", nullable = true, length = 50)
public String getName() { public String getName() {
return name; return name;
} }
@ -41,8 +47,6 @@ public class MetaInputType {
this.name = name; this.name = name;
} }
@Temporal(TemporalType.TIMESTAMP)
@Column(name = "CREATE_DATE", nullable = false, columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP", insertable = false, updatable = false)
public Date getCreateDate() { public Date getCreateDate() {
return createDate; return createDate;
} }

View File

@ -15,9 +15,18 @@ import javax.persistence.TemporalType;
@Entity @Entity
@Table(name = "META_MEMBER_STATUS", schema = "public") @Table(name = "META_MEMBER_STATUS", schema = "public")
public class MetaMemberStatus { public class MetaMemberStatus {
@Id
private Short id; private Short id;
@Column(name = "KEY", nullable = true, length = 50)
private String key; private String key;
@Column(name = "Name", nullable = false, length = 100)
private String name; private String name;
@Temporal(TemporalType.TIMESTAMP)
@Column(name = "CREATE_DATE", nullable = false, columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP", insertable = false, updatable = false)
private Date createDate; private Date createDate;
public MetaMemberStatus() { public MetaMemberStatus() {
@ -28,7 +37,6 @@ public class MetaMemberStatus {
this.id = id; this.id = id;
} }
@Id
public Short getId() { public Short getId() {
return id; return id;
} }
@ -37,7 +45,6 @@ public class MetaMemberStatus {
this.id = id; this.id = id;
} }
@Column(name = "KEY", nullable = true, length = 50)
public String getKey() { public String getKey() {
return key; return key;
} }
@ -46,7 +53,6 @@ public class MetaMemberStatus {
this.key = key; this.key = key;
} }
@Column(name = "Name", nullable = false, length = 100)
public String getName() { public String getName() {
return name; return name;
} }
@ -55,8 +61,6 @@ public class MetaMemberStatus {
this.name = name; this.name = name;
} }
@Temporal(TemporalType.TIMESTAMP)
@Column(name = "CREATE_DATE", nullable = false, columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP", insertable = false, updatable = false)
public Date getCreateDate() { public Date getCreateDate() {
return createDate; return createDate;
} }
@ -66,11 +70,7 @@ public class MetaMemberStatus {
} }
public static enum Enum { public static enum Enum {
NOAUTH((short)1), NOAUTH((short) 1), NORMAL((short) 2), DORMANCY((short) 3), WITHDRAWAL((short) 4),;
NORMAL((short)2),
DORMANCY((short)3),
WITHDRAWAL((short)4),
;
private final Short value; private final Short value;

View File

@ -15,9 +15,18 @@ import javax.persistence.TemporalType;
@Entity @Entity
@Table(name = "META_NOAUTH_PROBE_STATUS", schema = "public") @Table(name = "META_NOAUTH_PROBE_STATUS", schema = "public")
public class MetaNoAuthProbeStatus { public class MetaNoAuthProbeStatus {
@Id
private Short id; private Short id;
@Column(name = "KEY", nullable = true, length = 50)
private String key; private String key;
@Column(name = "Name", nullable = false, length = 10)
private String name; private String name;
@Temporal(TemporalType.TIMESTAMP)
@Column(name = "CREATE_DATE", nullable = false, columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP", insertable = false, updatable = false)
private Date createDate; private Date createDate;
public MetaNoAuthProbeStatus() { public MetaNoAuthProbeStatus() {
@ -28,7 +37,6 @@ public class MetaNoAuthProbeStatus {
this.id = id; this.id = id;
} }
@Id
public Short getId() { public Short getId() {
return id; return id;
} }
@ -37,7 +45,6 @@ public class MetaNoAuthProbeStatus {
this.id = id; this.id = id;
} }
@Column(name = "KEY", nullable = true, length = 50)
public String getKey() { public String getKey() {
return key; return key;
} }
@ -46,7 +53,6 @@ public class MetaNoAuthProbeStatus {
this.key = key; this.key = key;
} }
@Column(name = "Name", nullable = false, length = 10)
public String getName() { public String getName() {
return name; return name;
} }
@ -55,8 +61,6 @@ public class MetaNoAuthProbeStatus {
this.name = name; this.name = name;
} }
@Temporal(TemporalType.TIMESTAMP)
@Column(name = "CREATE_DATE", nullable = false, columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP", insertable = false, updatable = false)
public Date getCreateDate() { public Date getCreateDate() {
return createDate; return createDate;
} }
@ -66,10 +70,7 @@ public class MetaNoAuthProbeStatus {
} }
public static enum Enum { public static enum Enum {
ACCEPTED((short)1), ACCEPTED((short) 1), DENIED((short) 2), PROCESSING((short) 3),;
DENIED((short)2),
PROCESSING((short)3),
;
private final Short value; private final Short value;

View File

@ -7,9 +7,17 @@ import java.util.Date;
@Table(name = "META_PORT_TYPE", schema = "public") @Table(name = "META_PORT_TYPE", schema = "public")
public class MetaPortType { public class MetaPortType {
@Id
private Short id; private Short id;
@Column(name = "NAME", nullable = true, length = 50)
private String name; private String name;
@Column(name = "KEY", nullable = true, length = 50)
private String key; private String key;
@Temporal(TemporalType.TIMESTAMP)
@Column(name = "CREATE_DATE", nullable = false, columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP", insertable = false, updatable = false)
private Date createDate; private Date createDate;
public MetaPortType() { public MetaPortType() {
@ -19,7 +27,6 @@ public class MetaPortType {
this.id = id; this.id = id;
} }
@Id
public Short getId() { public Short getId() {
return id; return id;
} }
@ -28,7 +35,6 @@ public class MetaPortType {
this.id = id; this.id = id;
} }
@Column(name = "KEY", nullable = true, length = 50)
public String getKey() { public String getKey() {
return key; return key;
} }
@ -37,7 +43,6 @@ public class MetaPortType {
this.key = key; this.key = key;
} }
@Column(name = "NAME", nullable = true, length = 50)
public String getName() { public String getName() {
return name; return name;
} }
@ -46,8 +51,6 @@ public class MetaPortType {
this.name = name; this.name = name;
} }
@Temporal(TemporalType.TIMESTAMP)
@Column(name = "CREATE_DATE", nullable = false, columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP", insertable = false, updatable = false)
public Date getCreateDate() { public Date getCreateDate() {
return createDate; return createDate;
} }

View File

@ -15,9 +15,18 @@ import javax.persistence.TemporalType;
@Entity @Entity
@Table(name = "META_PROBE_STATUS", schema = "public") @Table(name = "META_PROBE_STATUS", schema = "public")
public class MetaProbeStatus { public class MetaProbeStatus {
@Id
private Short id; private Short id;
@Column(name = "KEY", nullable = true, length = 50)
private String key; private String key;
@Column(name = "Name", nullable = false, length = 10)
private String name; private String name;
@Temporal(TemporalType.TIMESTAMP)
@Column(name = "CREATE_DATE", nullable = false, columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP", insertable = false, updatable = false)
private Date createDate; private Date createDate;
public MetaProbeStatus() { public MetaProbeStatus() {
@ -28,7 +37,6 @@ public class MetaProbeStatus {
this.id = id; this.id = id;
} }
@Id
public Short getId() { public Short getId() {
return id; return id;
} }
@ -37,7 +45,6 @@ public class MetaProbeStatus {
this.id = id; this.id = id;
} }
@Column(name = "KEY", nullable = true, length = 50)
public String getKey() { public String getKey() {
return key; return key;
} }
@ -46,7 +53,6 @@ public class MetaProbeStatus {
this.key = key; this.key = key;
} }
@Column(name = "Name", nullable = false, length = 10)
public String getName() { public String getName() {
return name; return name;
} }
@ -55,8 +61,6 @@ public class MetaProbeStatus {
this.name = name; this.name = name;
} }
@Temporal(TemporalType.TIMESTAMP)
@Column(name = "CREATE_DATE", nullable = false, columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP", insertable = false, updatable = false)
public Date getCreateDate() { public Date getCreateDate() {
return createDate; return createDate;
} }
@ -66,9 +70,7 @@ public class MetaProbeStatus {
} }
public static enum Enum { public static enum Enum {
INITIAL((short)1), INITIAL((short) 1), NORMAL((short) 2),;
NORMAL((short)2),
;
private final Short value; private final Short value;

View File

@ -10,13 +10,33 @@ import java.util.Date;
@Table(name = "META_SENSOR_DISPLAY_ITEM", schema = "public") @Table(name = "META_SENSOR_DISPLAY_ITEM", schema = "public")
public class MetaSensorDisplayItem { public class MetaSensorDisplayItem {
@Id
private Long id; private Long id;
@Column(name = "KEY", nullable = false)
private String key; private String key;
@Column(name = "NAME", nullable = false)
private String name; private String name;
@Basic
@Column(name = "IS_DEFAULT", nullable = false, columnDefinition = "Boolean default false")
private Boolean isDefault; private Boolean isDefault;
@ManyToOne
@JoinColumn(name = "META_CRAWLER_ID", nullable = false)
private MetaCrawler metaCrawler; private MetaCrawler metaCrawler;
@ManyToOne
@JoinColumn(name = "META_SENSOR_ITEM_UNIT_ID", nullable = true)
private MetaSensorItemUnit metaSensorItemUnit; private MetaSensorItemUnit metaSensorItemUnit;
@ManyToOne
@JoinColumn(name = "META_SENSOR_ITEM_TYPE_ID", nullable = false)
private MetaSensorItemType metaSensorItemType; private MetaSensorItemType metaSensorItemType;
@Temporal(TemporalType.TIMESTAMP)
@Column(name = "CREATE_DATE", nullable = false, columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP", insertable = false, updatable = false)
private Date createDate; private Date createDate;
public MetaSensorDisplayItem() { public MetaSensorDisplayItem() {
@ -27,7 +47,6 @@ public class MetaSensorDisplayItem {
this.id = id; this.id = id;
} }
@Id
public Long getId() { public Long getId() {
return id; return id;
} }
@ -36,7 +55,6 @@ public class MetaSensorDisplayItem {
this.id = id; this.id = id;
} }
@Column(name = "KEY", nullable = false)
public String getKey() { public String getKey() {
return key; return key;
} }
@ -45,7 +63,6 @@ public class MetaSensorDisplayItem {
this.key = key; this.key = key;
} }
@Column(name = "NAME", nullable = false)
public String getName() { public String getName() {
return name; return name;
} }
@ -54,8 +71,6 @@ public class MetaSensorDisplayItem {
this.name = name; this.name = name;
} }
@ManyToOne
@JoinColumn(name = "META_CRAWLER_ID", nullable = false)
public MetaCrawler getMetaCrawler() { public MetaCrawler getMetaCrawler() {
return metaCrawler; return metaCrawler;
} }
@ -64,8 +79,6 @@ public class MetaSensorDisplayItem {
this.metaCrawler = metaCrawler; this.metaCrawler = metaCrawler;
} }
@ManyToOne
@JoinColumn(name = "META_SENSOR_ITEM_UNIT_ID", nullable = true)
public MetaSensorItemUnit getMetaSensorItemUnit() { public MetaSensorItemUnit getMetaSensorItemUnit() {
return metaSensorItemUnit; return metaSensorItemUnit;
} }
@ -74,8 +87,6 @@ public class MetaSensorDisplayItem {
this.metaSensorItemUnit = metaSensorItemUnit; this.metaSensorItemUnit = metaSensorItemUnit;
} }
@Temporal(TemporalType.TIMESTAMP)
@Column(name = "CREATE_DATE", nullable = false, columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP", insertable = false, updatable = false)
public Date getCreateDate() { public Date getCreateDate() {
return createDate; return createDate;
} }
@ -84,8 +95,6 @@ public class MetaSensorDisplayItem {
this.createDate = createDate; this.createDate = createDate;
} }
@Basic
@Column(name = "IS_DEFAULT", nullable = false, columnDefinition = "Boolean default false")
public Boolean getDefault() { public Boolean getDefault() {
return isDefault; return isDefault;
} }
@ -94,8 +103,6 @@ public class MetaSensorDisplayItem {
isDefault = aDefault; isDefault = aDefault;
} }
@ManyToOne
@JoinColumn(name = "META_SENSOR_ITEM_TYPE_ID", nullable = false)
public MetaSensorItemType getMetaSensorItemType() { public MetaSensorItemType getMetaSensorItemType() {
return metaSensorItemType; return metaSensorItemType;
} }

View File

@ -11,13 +11,22 @@ import javax.persistence.*;
@Table(name = "META_SENSOR_DISPLAY_MAPPING", schema = "public") @Table(name = "META_SENSOR_DISPLAY_MAPPING", schema = "public")
public class MetaSensorDisplayMapping { public class MetaSensorDisplayMapping {
private Long id;
private MetaSensorDisplayItem metaSensorDisplayItem;
private MetaSensorItemKey metaSensorItemKey;
private Date createDate;
@Id @Id
@GeneratedValue(strategy = GenerationType.IDENTITY) @GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id;
@ManyToOne
@JoinColumn(name = "META_SENSOR_DISPLAY_ITEM_ID", nullable = false)
private MetaSensorDisplayItem metaSensorDisplayItem;
@ManyToOne
@JoinColumn(name = "META_SENSOR_ITEM_KEY_ID", nullable = false)
private MetaSensorItemKey metaSensorItemKey;
@Temporal(TemporalType.TIMESTAMP)
@Column(name = "CREATE_DATE", nullable = false, columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP", insertable = false, updatable = false)
private Date createDate;
public Long getId() { public Long getId() {
return id; return id;
} }
@ -26,8 +35,6 @@ public class MetaSensorDisplayMapping {
this.id = id; this.id = id;
} }
@ManyToOne
@JoinColumn(name = "META_SENSOR_DISPLAY_ITEM_ID", nullable = false)
public MetaSensorDisplayItem getMetaSensorDisplayItem() { public MetaSensorDisplayItem getMetaSensorDisplayItem() {
return metaSensorDisplayItem; return metaSensorDisplayItem;
} }
@ -36,8 +43,6 @@ public class MetaSensorDisplayMapping {
this.metaSensorDisplayItem = metaSensorDisplayItem; this.metaSensorDisplayItem = metaSensorDisplayItem;
} }
@ManyToOne
@JoinColumn(name = "META_SENSOR_ITEM_KEY_ID", nullable = false)
public MetaSensorItemKey getMetaSensorItemKey() { public MetaSensorItemKey getMetaSensorItemKey() {
return metaSensorItemKey; return metaSensorItemKey;
} }
@ -46,8 +51,6 @@ public class MetaSensorDisplayMapping {
this.metaSensorItemKey = metaSensorItemKey; this.metaSensorItemKey = metaSensorItemKey;
} }
@Temporal(TemporalType.TIMESTAMP)
@Column(name = "CREATE_DATE", nullable = false, columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP", insertable = false, updatable = false)
public Date getCreateDate() { public Date getCreateDate() {
return createDate; return createDate;
} }

View File

@ -9,12 +9,20 @@ import java.util.Date;
@Entity @Entity
@Table(name = "META_SENSOR_ITEM", schema = "public") @Table(name = "META_SENSOR_ITEM", schema = "public")
public class MetaSensorItem { public class MetaSensorItem {
private Integer id;
private String key;
private String name;
private Date createDate;
@Id @Id
private Integer id;
@Column(name = "KEY", nullable = true, length = 100)
private String key;
@Column(name = "NAME", nullable = true, length = 100)
private String name;
@Temporal(TemporalType.TIMESTAMP)
@Column(name = "CREATE_DATE", nullable = false, columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP", insertable = false, updatable = false)
private Date createDate;
public Integer getId() { public Integer getId() {
return id; return id;
} }
@ -23,7 +31,6 @@ public class MetaSensorItem {
this.id = id; this.id = id;
} }
@Column(name = "KEY", nullable = true, length = 100)
public String getKey() { public String getKey() {
return key; return key;
} }
@ -32,7 +39,6 @@ public class MetaSensorItem {
this.key = key; this.key = key;
} }
@Column(name = "NAME", nullable = true, length = 100)
public String getName() { public String getName() {
return name; return name;
} }
@ -41,8 +47,6 @@ public class MetaSensorItem {
this.name = name; this.name = name;
} }
@Temporal(TemporalType.TIMESTAMP)
@Column(name = "CREATE_DATE", nullable = false, columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP", insertable = false, updatable = false)
public Date getCreateDate() { public Date getCreateDate() {
return createDate; return createDate;
} }

View File

@ -9,18 +9,39 @@ import java.util.Date;
@Entity @Entity
@Table(name = "META_SENSOR_ITEM_KEY", schema = "public") @Table(name = "META_SENSOR_ITEM_KEY", schema = "public")
public class MetaSensorItemKey { public class MetaSensorItemKey {
private Long id;
private String key;
private String name;
private String froms;
private String option;
private MetaSensorItem metaSensorItem;
private MetaCrawler metaCrawler;
private MetaSensorItemUnit metaSensorItemUnit;
private Date createDate;
@Id @Id
@GeneratedValue(strategy = GenerationType.IDENTITY) @GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id;
@Column(name = "KEY", nullable = false, length = 100)
private String key;
@Column(name = "NAME", nullable = true, length = 100)
private String name;
@Column(name = "FROMS", nullable = false, length = 100)
private String froms;
@Column(name = "OPTION_JSON", nullable = true)
private String option;
@ManyToOne
@JoinColumn(name = "META_SENSOR_ITEM_ID", nullable = false)
private MetaSensorItem metaSensorItem;
@ManyToOne
@JoinColumn(name = "META_CRAWLER_ID", nullable = false)
private MetaCrawler metaCrawler;
@ManyToOne
@JoinColumn(name = "META_SENSOR_ITEM_UNIT_ID", nullable = true)
private MetaSensorItemUnit metaSensorItemUnit;
@Temporal(TemporalType.TIMESTAMP)
@Column(name = "CREATE_DATE", nullable = false, columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP", insertable = false, updatable = false)
private Date createDate;
public Long getId() { public Long getId() {
return id; return id;
} }
@ -29,7 +50,6 @@ public class MetaSensorItemKey {
this.id = id; this.id = id;
} }
@Column(name = "NAME", nullable = true, length = 100)
public String getName() { public String getName() {
return name; return name;
} }
@ -38,8 +58,6 @@ public class MetaSensorItemKey {
this.name = name; this.name = name;
} }
@ManyToOne
@JoinColumn(name = "META_SENSOR_ITEM_ID", nullable = false)
public MetaSensorItem getMetaSensorItem() { public MetaSensorItem getMetaSensorItem() {
return metaSensorItem; return metaSensorItem;
} }
@ -48,7 +66,6 @@ public class MetaSensorItemKey {
this.metaSensorItem = metaSensorItem; this.metaSensorItem = metaSensorItem;
} }
@Column(name = "KEY", nullable = false, length = 100)
public String getKey() { public String getKey() {
return key; return key;
} }
@ -57,7 +74,6 @@ public class MetaSensorItemKey {
this.key = key; this.key = key;
} }
@Column(name = "FROMS", nullable = false, length = 100)
public String getFroms() { public String getFroms() {
return froms; return froms;
} }
@ -66,7 +82,6 @@ public class MetaSensorItemKey {
this.froms = froms; this.froms = froms;
} }
@Column(name = "OPTION_JSON", nullable = true)
public String getOption() { public String getOption() {
return option; return option;
} }
@ -75,8 +90,6 @@ public class MetaSensorItemKey {
this.option = option; this.option = option;
} }
@ManyToOne
@JoinColumn(name = "META_CRAWLER_ID", nullable = false)
public MetaCrawler getMetaCrawler() { public MetaCrawler getMetaCrawler() {
return metaCrawler; return metaCrawler;
} }
@ -85,8 +98,6 @@ public class MetaSensorItemKey {
this.metaCrawler = metaCrawler; this.metaCrawler = metaCrawler;
} }
@Temporal(TemporalType.TIMESTAMP)
@Column(name = "CREATE_DATE", nullable = false, columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP", insertable = false, updatable = false)
public Date getCreateDate() { public Date getCreateDate() {
return createDate; return createDate;
} }
@ -95,8 +106,6 @@ public class MetaSensorItemKey {
this.createDate = createDate; this.createDate = createDate;
} }
@ManyToOne
@JoinColumn(name = "META_SENSOR_ITEM_UNIT_ID", nullable = true)
public MetaSensorItemUnit getMetaSensorItemUnit() { public MetaSensorItemUnit getMetaSensorItemUnit() {
return metaSensorItemUnit; return metaSensorItemUnit;
} }

View File

@ -9,9 +9,18 @@ import java.util.Date;
@Entity @Entity
@Table(name = "META_SENSOR_ITEM_TYPE", schema = "public") @Table(name = "META_SENSOR_ITEM_TYPE", schema = "public")
public class MetaSensorItemType { public class MetaSensorItemType {
@Id
private Short id; private Short id;
@Column(name = "KEY", nullable = true, length = 50)
private String key; private String key;
@Column(name = "NAME", nullable = true, length = 50)
private String name; private String name;
@Temporal(TemporalType.TIMESTAMP)
@Column(name = "CREATE_DATE", nullable = false, columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP", insertable = false, updatable = false)
private Date createDate; private Date createDate;
public MetaSensorItemType() { public MetaSensorItemType() {
@ -21,7 +30,6 @@ public class MetaSensorItemType {
this.id = id; this.id = id;
} }
@Id
public Short getId() { public Short getId() {
return id; return id;
} }
@ -30,7 +38,6 @@ public class MetaSensorItemType {
this.id = id; this.id = id;
} }
@Column(name = "KEY", nullable = true, length = 50)
public String getKey() { public String getKey() {
return key; return key;
} }
@ -39,7 +46,6 @@ public class MetaSensorItemType {
this.key = key; this.key = key;
} }
@Column(name = "NAME", nullable = true, length = 50)
public String getName() { public String getName() {
return name; return name;
} }
@ -48,8 +54,6 @@ public class MetaSensorItemType {
this.name = name; this.name = name;
} }
@Temporal(TemporalType.TIMESTAMP)
@Column(name = "CREATE_DATE", nullable = false, columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP", insertable = false, updatable = false)
public Date getCreateDate() { public Date getCreateDate() {
return createDate; return createDate;
} }

View File

@ -9,13 +9,23 @@ import java.util.Date;
@Entity @Entity
@Table(name = "META_SENSOR_ITEM_UNIT", schema = "public") @Table(name = "META_SENSOR_ITEM_UNIT", schema = "public")
public class MetaSensorItemUnit { public class MetaSensorItemUnit {
private Short id;
private String key;
private String unit;
private String mark;
private Date createDate;
@Id @Id
private Short id;
@Column(name = "KEY", nullable = true, length = 50)
private String key;
@Column(name = "UNIT", nullable = false)
private String unit;
@Column(name = "MARK", nullable = false)
private String mark;
@Temporal(TemporalType.TIMESTAMP)
@Column(name = "CREATE_DATE", nullable = false, columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP", insertable = false, updatable = false)
private Date createDate;
public Short getId() { public Short getId() {
return id; return id;
} }
@ -24,7 +34,6 @@ public class MetaSensorItemUnit {
this.id = id; this.id = id;
} }
@Column(name = "KEY", nullable = true, length = 50)
public String getKey() { public String getKey() {
return key; return key;
} }
@ -33,7 +42,6 @@ public class MetaSensorItemUnit {
this.key = key; this.key = key;
} }
@Column(name = "UNIT", nullable = false)
public String getUnit() { public String getUnit() {
return unit; return unit;
} }
@ -42,7 +50,6 @@ public class MetaSensorItemUnit {
this.unit = unit; this.unit = unit;
} }
@Column(name = "MARK", nullable = false)
public String getMark() { public String getMark() {
return mark; return mark;
} }
@ -51,8 +58,6 @@ public class MetaSensorItemUnit {
this.mark = mark; this.mark = mark;
} }
@Temporal(TemporalType.TIMESTAMP)
@Column(name = "CREATE_DATE", nullable = false, columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP", insertable = false, updatable = false)
public Date getCreateDate() { public Date getCreateDate() {
return createDate; return createDate;
} }

View File

@ -15,9 +15,18 @@ import javax.persistence.TemporalType;
@Entity @Entity
@Table(name = "META_SENSOR_STATUS", schema = "public") @Table(name = "META_SENSOR_STATUS", schema = "public")
public class MetaSensorStatus { public class MetaSensorStatus {
@Id
private Short id; private Short id;
@Column(name = "KEY", nullable = true, length = 50)
private String key; private String key;
@Column(name = "Name", nullable = false, length = 10)
private String name; private String name;
@Temporal(TemporalType.TIMESTAMP)
@Column(name = "CREATE_DATE", nullable = false, columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP", insertable = false, updatable = false)
private Date createDate; private Date createDate;
public MetaSensorStatus() { public MetaSensorStatus() {
@ -28,7 +37,6 @@ public class MetaSensorStatus {
this.id = id; this.id = id;
} }
@Id
public Short getId() { public Short getId() {
return id; return id;
} }
@ -37,7 +45,6 @@ public class MetaSensorStatus {
this.id = id; this.id = id;
} }
@Column(name = "KEY", nullable = true, length = 50)
public String getKey() { public String getKey() {
return key; return key;
} }
@ -46,7 +53,6 @@ public class MetaSensorStatus {
this.key = key; this.key = key;
} }
@Column(name = "Name", nullable = false, length = 10)
public String getName() { public String getName() {
return name; return name;
} }
@ -55,8 +61,6 @@ public class MetaSensorStatus {
this.name = name; this.name = name;
} }
@Temporal(TemporalType.TIMESTAMP)
@Column(name = "CREATE_DATE", nullable = false, columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP", insertable = false, updatable = false)
public Date getCreateDate() { public Date getCreateDate() {
return createDate; return createDate;
} }

View File

@ -11,13 +11,21 @@ import javax.persistence.*;
@Table(name = "META_TARGET_HOST_TYPE_MAPPING", schema = "public") @Table(name = "META_TARGET_HOST_TYPE_MAPPING", schema = "public")
public class MetaTargetHostTypeMapping { public class MetaTargetHostTypeMapping {
private Long id;
private MetaTargetHostType metaTargetHostType;
private String pattern;
private Date createDate;
@Id @Id
@GeneratedValue(strategy = GenerationType.IDENTITY) @GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id;
@ManyToOne
@JoinColumn(name = "META_TARGET_HOST_TYPE_ID", nullable = false)
private MetaTargetHostType metaTargetHostType;
@Column(name = "PATTERN", nullable = false, length = 50)
private String pattern;
@Temporal(TemporalType.TIMESTAMP)
@Column(name = "CREATE_DATE", nullable = false, columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP", insertable = false, updatable = false)
private Date createDate;
public Long getId() { public Long getId() {
return id; return id;
} }
@ -26,8 +34,6 @@ public class MetaTargetHostTypeMapping {
this.id = id; this.id = id;
} }
@ManyToOne
@JoinColumn(name = "META_TARGET_HOST_TYPE_ID", nullable = false)
public MetaTargetHostType getMetaTargetHostType() { public MetaTargetHostType getMetaTargetHostType() {
return metaTargetHostType; return metaTargetHostType;
} }
@ -36,7 +42,6 @@ public class MetaTargetHostTypeMapping {
this.metaTargetHostType = metaTargetHostType; this.metaTargetHostType = metaTargetHostType;
} }
@Column(name = "PATTERN", nullable = false, length = 50)
public String getPattern() { public String getPattern() {
return pattern; return pattern;
} }
@ -45,8 +50,6 @@ public class MetaTargetHostTypeMapping {
this.pattern = pattern; this.pattern = pattern;
} }
@Temporal(TemporalType.TIMESTAMP)
@Column(name = "CREATE_DATE", nullable = false, columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP", insertable = false, updatable = false)
public Date getCreateDate() { public Date getCreateDate() {
return createDate; return createDate;
} }

View File

@ -15,9 +15,18 @@ import javax.persistence.TemporalType;
@Entity @Entity
@Table(name = "META_TARGET_STATUS", schema = "public") @Table(name = "META_TARGET_STATUS", schema = "public")
public class MetaTargetStatus { public class MetaTargetStatus {
@Id
private Short id; private Short id;
@Column(name = "KEY", nullable = true, length = 50)
private String key; private String key;
@Column(name = "Name", nullable = false, length = 10)
private String name; private String name;
@Temporal(TemporalType.TIMESTAMP)
@Column(name = "CREATE_DATE", nullable = false, columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP", insertable = false, updatable = false)
private Date createDate; private Date createDate;
public MetaTargetStatus() { public MetaTargetStatus() {
@ -28,7 +37,6 @@ public class MetaTargetStatus {
this.id = id; this.id = id;
} }
@Id
public Short getId() { public Short getId() {
return id; return id;
} }
@ -37,7 +45,6 @@ public class MetaTargetStatus {
this.id = id; this.id = id;
} }
@Column(name = "KEY", nullable = true, length = 50)
public String getKey() { public String getKey() {
return key; return key;
} }
@ -46,7 +53,6 @@ public class MetaTargetStatus {
this.key = key; this.key = key;
} }
@Column(name = "Name", nullable = false, length = 10)
public String getName() { public String getName() {
return name; return name;
} }
@ -55,8 +61,6 @@ public class MetaTargetStatus {
this.name = name; this.name = name;
} }
@Temporal(TemporalType.TIMESTAMP)
@Column(name = "CREATE_DATE", nullable = false, columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP", insertable = false, updatable = false)
public Date getCreateDate() { public Date getCreateDate() {
return createDate; return createDate;
} }
@ -66,11 +70,7 @@ public class MetaTargetStatus {
} }
public static enum Enum { public static enum Enum {
UP((short)1), UP((short) 1), DOWN((short) 2), WARN((short) 3), ERROR((short) 4),;
DOWN((short)2),
WARN((short)3),
ERROR((short)4),
;
private final Short value; private final Short value;

View File

@ -12,14 +12,28 @@ import java.util.Date;
@Inheritance(strategy = InheritanceType.SINGLE_TABLE) @Inheritance(strategy = InheritanceType.SINGLE_TABLE)
@DiscriminatorColumn(name = "INFRA_TYPE", discriminatorType = DiscriminatorType.INTEGER) @DiscriminatorColumn(name = "INFRA_TYPE", discriminatorType = DiscriminatorType.INTEGER)
public abstract class MetaTargetType { public abstract class MetaTargetType {
private Integer id;
private MetaInfraType metaInfraType;
private String key;
private String name;
private Boolean isSupported;
private Date createDate;
@Id @Id
private Integer id;
@ManyToOne
@JoinColumn(name = "META_INFRA_TYPE_ID", insertable = false, updatable = false)
private MetaInfraType metaInfraType;
@Column(name = "KEY", nullable = true, length = 50)
private String key;
@Column(name = "NAME", nullable = true, length = 50)
private String name;
@Basic
@Column(name = "IS_SUPPORTED", nullable = false, columnDefinition = "Boolean default false")
private Boolean isSupported;
@Temporal(TemporalType.TIMESTAMP)
@Column(name = "CREATE_DATE", nullable = false, columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP", insertable = false, updatable = false)
private Date createDate;
public Integer getId() { public Integer getId() {
return id; return id;
} }
@ -28,8 +42,6 @@ public abstract class MetaTargetType {
this.id = id; this.id = id;
} }
@ManyToOne
@JoinColumn(name = "META_INFRA_TYPE_ID", insertable = false, updatable = false)
public MetaInfraType getMetaInfraType() { public MetaInfraType getMetaInfraType() {
return metaInfraType; return metaInfraType;
} }
@ -38,7 +50,6 @@ public abstract class MetaTargetType {
this.metaInfraType = metaInfraType; this.metaInfraType = metaInfraType;
} }
@Column(name = "KEY", nullable = true, length = 50)
public String getKey() { public String getKey() {
return key; return key;
} }
@ -47,7 +58,6 @@ public abstract class MetaTargetType {
this.key = key; this.key = key;
} }
@Column(name = "NAME", nullable = true, length = 50)
public String getName() { public String getName() {
return name; return name;
} }
@ -56,8 +66,6 @@ public abstract class MetaTargetType {
this.name = name; this.name = name;
} }
@Basic
@Column(name = "IS_SUPPORTED", nullable = false, columnDefinition = "Boolean default false")
public Boolean getSupported() { public Boolean getSupported() {
return isSupported; return isSupported;
} }
@ -66,8 +74,6 @@ public abstract class MetaTargetType {
this.isSupported = isSupported; this.isSupported = isSupported;
} }
@Temporal(TemporalType.TIMESTAMP)
@Column(name = "CREATE_DATE", nullable = false, columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP", insertable = false, updatable = false)
public Date getCreateDate() { public Date getCreateDate() {
return createDate; return createDate;
} }

View File

@ -9,13 +9,24 @@ import java.util.Date;
@Entity @Entity
@Table(name = "META_TARGET_TYPE_CATEGORY", schema = "public") @Table(name = "META_TARGET_TYPE_CATEGORY", schema = "public")
public class MetaTargetTypeCategory { public class MetaTargetTypeCategory {
private Integer id;
private MetaInfraType metaInfraType;
private String key;
private String name;
private Date createDate;
@Id @Id
private Integer id;
@ManyToOne
@JoinColumn(name = "META_INFRA_TYPE_ID", nullable = false)
private MetaInfraType metaInfraType;
@Column(name = "KEY", nullable = true, length = 50)
private String key;
@Column(name = "NAME", nullable = true, length = 50)
private String name;
@Temporal(TemporalType.TIMESTAMP)
@Column(name = "CREATE_DATE", nullable = false, columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP", insertable = false, updatable = false)
private Date createDate;
public Integer getId() { public Integer getId() {
return id; return id;
} }
@ -24,8 +35,6 @@ public class MetaTargetTypeCategory {
this.id = id; this.id = id;
} }
@ManyToOne
@JoinColumn(name = "META_INFRA_TYPE_ID", nullable = false)
public MetaInfraType getMetaInfraType() { public MetaInfraType getMetaInfraType() {
return metaInfraType; return metaInfraType;
} }
@ -34,7 +43,6 @@ public class MetaTargetTypeCategory {
this.metaInfraType = metaInfraType; this.metaInfraType = metaInfraType;
} }
@Column(name = "KEY", nullable = true, length = 50)
public String getKey() { public String getKey() {
return key; return key;
} }
@ -43,7 +51,6 @@ public class MetaTargetTypeCategory {
this.key = key; this.key = key;
} }
@Column(name = "NAME", nullable = true, length = 50)
public String getName() { public String getName() {
return name; return name;
} }
@ -52,8 +59,6 @@ public class MetaTargetTypeCategory {
this.name = name; this.name = name;
} }
@Temporal(TemporalType.TIMESTAMP)
@Column(name = "CREATE_DATE", nullable = false, columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP", insertable = false, updatable = false)
public Date getCreateDate() { public Date getCreateDate() {
return createDate; return createDate;
} }

View File

@ -11,13 +11,22 @@ import javax.persistence.*;
@Table(name = "META_TARGET_TYPE_CATEGORY_MAPPING", schema = "public") @Table(name = "META_TARGET_TYPE_CATEGORY_MAPPING", schema = "public")
public class MetaTargetTypeCategoryMapping { public class MetaTargetTypeCategoryMapping {
private Long id;
private MetaTargetTypeCategory metaTargetTypeCategory;
private MetaTargetType metaTargetType;
private Date createDate;
@Id @Id
@GeneratedValue(strategy = GenerationType.IDENTITY) @GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id;
@ManyToOne
@JoinColumn(name = "META_TARGET_TYPE_CATEGORY_ID", nullable = false)
private MetaTargetTypeCategory metaTargetTypeCategory;
@ManyToOne
@JoinColumn(name = "META_TARGET_TYPE_ID", nullable = false)
private MetaTargetType metaTargetType;
@Temporal(TemporalType.TIMESTAMP)
@Column(name = "CREATE_DATE", nullable = false, columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP", insertable = false, updatable = false)
private Date createDate;
public Long getId() { public Long getId() {
return id; return id;
} }
@ -26,8 +35,6 @@ public class MetaTargetTypeCategoryMapping {
this.id = id; this.id = id;
} }
@ManyToOne
@JoinColumn(name = "META_TARGET_TYPE_CATEGORY_ID", nullable = false)
public MetaTargetTypeCategory getMetaTargetTypeCategory() { public MetaTargetTypeCategory getMetaTargetTypeCategory() {
return metaTargetTypeCategory; return metaTargetTypeCategory;
} }
@ -36,8 +43,6 @@ public class MetaTargetTypeCategoryMapping {
this.metaTargetTypeCategory = metaTargetTypeCategory; this.metaTargetTypeCategory = metaTargetTypeCategory;
} }
@ManyToOne
@JoinColumn(name = "META_TARGET_TYPE_ID", nullable = false)
public MetaTargetType getMetaTargetType() { public MetaTargetType getMetaTargetType() {
return metaTargetType; return metaTargetType;
} }
@ -46,8 +51,6 @@ public class MetaTargetTypeCategoryMapping {
this.metaTargetType = metaTargetType; this.metaTargetType = metaTargetType;
} }
@Temporal(TemporalType.TIMESTAMP)
@Column(name = "CREATE_DATE", nullable = false, columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP", insertable = false, updatable = false)
public Date getCreateDate() { public Date getCreateDate() {
return createDate; return createDate;
} }

View File

@ -13,19 +13,43 @@ import java.util.Date;
@Entity @Entity
@Table(name = "NOAUTH_PROBE", schema = "public") @Table(name = "NOAUTH_PROBE", schema = "public")
public class NoAuthProbe { public class NoAuthProbe {
private Long id;
private Domain domain;
private Probe probe;
private MetaNoAuthProbeStatus metaNoAuthProbeStatus;
private String infraHostMeta;
private String tempProbeKey;
private String apiKey;
private Date connectDate;
private String connectAddress;
private Date createDate;
@Id @Id
@GeneratedValue(strategy = GenerationType.IDENTITY) @GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id;
@ManyToOne
@JoinColumn(name = "DOMAIN_ID", nullable = false)
private Domain domain;
@ManyToOne
@JoinColumn(name = "PROBE_ID", nullable = true)
private Probe probe;
@ManyToOne
@JoinColumn(name = "META_NOAUTH_PROBE_STATUS_ID", nullable = false)
private MetaNoAuthProbeStatus metaNoAuthProbeStatus;
@Column(name = "INFRA_HOST_META", nullable = true, length = 8000)
private String infraHostMeta;
@Column(name = "TEMP_PROBE_KEY", nullable = false, length = 50, unique = true)
private String tempProbeKey;
@Column(name = "API_KEY", nullable = true, length = 50)
private String apiKey;
@Temporal(TemporalType.TIMESTAMP)
@Column(name = "CONNECT_DATE", nullable = true)
private Date connectDate;
@Column(name = "CONNECT_ADDRESS", nullable = true, length = 50)
private String connectAddress;
@Temporal(TemporalType.TIMESTAMP)
@Column(name = "CREATE_DATE", nullable = false, columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP", insertable = false, updatable = false)
private Date createDate;
public Long getId() { public Long getId() {
return id; return id;
} }
@ -34,7 +58,6 @@ public class NoAuthProbe {
this.id = id; this.id = id;
} }
@Column(name = "INFRA_HOST_META", nullable = true, length = 8000)
public String getInfraHostMeta() { public String getInfraHostMeta() {
return infraHostMeta; return infraHostMeta;
} }
@ -43,8 +66,6 @@ public class NoAuthProbe {
this.infraHostMeta = infraHostMeta; this.infraHostMeta = infraHostMeta;
} }
@ManyToOne
@JoinColumn(name = "META_NOAUTH_PROBE_STATUS_ID", nullable = false)
public MetaNoAuthProbeStatus getMetaNoAuthProbeStatus() { public MetaNoAuthProbeStatus getMetaNoAuthProbeStatus() {
return metaNoAuthProbeStatus; return metaNoAuthProbeStatus;
} }
@ -53,7 +74,6 @@ public class NoAuthProbe {
this.metaNoAuthProbeStatus = metaNoAuthProbeStatus; this.metaNoAuthProbeStatus = metaNoAuthProbeStatus;
} }
@Column(name = "TEMP_PROBE_KEY", nullable = false, length = 50, unique = true)
public String getTempProbeKey() { public String getTempProbeKey() {
return tempProbeKey; return tempProbeKey;
} }
@ -62,8 +82,6 @@ public class NoAuthProbe {
this.tempProbeKey = tempProbeKey; this.tempProbeKey = tempProbeKey;
} }
@Temporal(TemporalType.TIMESTAMP)
@Column(name = "CREATE_DATE", nullable = false, columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP", insertable = false, updatable = false)
public Date getCreateDate() { public Date getCreateDate() {
return createDate; return createDate;
} }
@ -72,7 +90,6 @@ public class NoAuthProbe {
this.createDate = createDate; this.createDate = createDate;
} }
@Column(name = "API_KEY", nullable = true, length = 50)
public String getApiKey() { public String getApiKey() {
return apiKey; return apiKey;
} }
@ -81,8 +98,6 @@ public class NoAuthProbe {
this.apiKey = apiKey; this.apiKey = apiKey;
} }
@ManyToOne
@JoinColumn(name = "DOMAIN_ID", nullable = false)
public Domain getDomain() { public Domain getDomain() {
return domain; return domain;
} }
@ -91,8 +106,6 @@ public class NoAuthProbe {
this.domain = domain; this.domain = domain;
} }
@ManyToOne
@JoinColumn(name = "PROBE_ID", nullable = true)
public Probe getProbe() { public Probe getProbe() {
return probe; return probe;
} }
@ -101,8 +114,6 @@ public class NoAuthProbe {
this.probe = probe; this.probe = probe;
} }
@Temporal(TemporalType.TIMESTAMP)
@Column(name = "CONNECT_DATE", nullable = true)
public Date getConnectDate() { public Date getConnectDate() {
return connectDate; return connectDate;
} }
@ -111,7 +122,6 @@ public class NoAuthProbe {
this.connectDate = connectDate; this.connectDate = connectDate;
} }
@Column(name = "CONNECT_ADDRESS", nullable = true, length = 50)
public String getConnectAddress() { public String getConnectAddress() {
return connectAddress; return connectAddress;
} }

View File

@ -11,16 +11,32 @@ import java.util.Date;
@Entity @Entity
@Table(name = "NOTIFICATION", schema = "public") @Table(name = "NOTIFICATION", schema = "public")
public class Notification { public class Notification {
private Long id;
private Date createDate;
private String title;
private String message;
private Member member;
private Date confirmDate;
private String url;
@Id @Id
@GeneratedValue(strategy = GenerationType.IDENTITY) @GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id;
@Column(name = "TITLE", nullable = false, length = 50)
private String title;
@Column(name = "MESSAGE", nullable = false, length = 255)
private String message;
@ManyToOne
@JoinColumn(name = "MEMBER_ID", nullable = false)
private Member member;
@Temporal(TemporalType.TIMESTAMP)
@Column(name = "CONFIRM_DATE", nullable = true)
private Date confirmDate;
@Column(name = "URL", nullable = false, length = 255)
private String url;
@Temporal(TemporalType.TIMESTAMP)
@Column(name = "CREATE_DATE", nullable = false, columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP", insertable = false, updatable = false)
private Date createDate;
public Long getId() { public Long getId() {
return id; return id;
} }
@ -29,8 +45,6 @@ public class Notification {
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() { public Date getCreateDate() {
return createDate; return createDate;
} }
@ -39,7 +53,6 @@ public class Notification {
this.createDate = createDate; this.createDate = createDate;
} }
@Column(name = "TITLE", nullable = false, length = 50)
public String getTitle() { public String getTitle() {
return title; return title;
} }
@ -48,7 +61,6 @@ public class Notification {
this.title = title; this.title = title;
} }
@Column(name = "MESSAGE", nullable = false, length = 255)
public String getMessage() { public String getMessage() {
return message; return message;
} }
@ -57,8 +69,6 @@ public class Notification {
this.message = message; this.message = message;
} }
@ManyToOne
@JoinColumn(name = "MEMBER_ID", nullable = false)
public Member getMember() { public Member getMember() {
return member; return member;
} }
@ -67,8 +77,6 @@ public class Notification {
this.member = member; this.member = member;
} }
@Temporal(TemporalType.TIMESTAMP)
@Column(name = "CONFIRM_DATE", nullable = true)
public Date getConfirmDate() { public Date getConfirmDate() {
return confirmDate; return confirmDate;
} }
@ -77,7 +85,6 @@ public class Notification {
this.confirmDate = confirmDate; this.confirmDate = confirmDate;
} }
@Column(name = "URL", nullable = false, length = 255)
public String getUrl() { public String getUrl() {
return url; return url;
} }

View File

@ -14,19 +14,53 @@ import java.util.Date;
@Table(name = "PROBE", schema = "public") @Table(name = "PROBE", schema = "public")
public class Probe { public class Probe {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id; private Long id;
@ManyToOne
@JoinColumn(name = "META_PROBE_STATUS_ID", nullable = false)
private MetaProbeStatus metaProbeStatus; private MetaProbeStatus metaProbeStatus;
@Column(name = "DESCRIPTION", nullable = true, length = 50)
private String description; private String description;
@ManyToOne
@JoinColumn(name = "DOMAIN_ID", nullable = false)
private Domain domain; private Domain domain;
@Column(name = "PROBE_KEY", nullable = false, unique = true)
private String probeKey; private String probeKey;
@Column(name = "ENCRYPTION_KEY", nullable = false, length = 100, unique = true)
private String encryptionKey; private String encryptionKey;
@Column(name = "NAME", nullable = false, length = 50)
private String name; private String name;
@Column(name = "CIDR")
private String cidr; private String cidr;
@Temporal(TemporalType.TIMESTAMP)
@Column(name = "AUTHORIZE_DATE", nullable = false, columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP", insertable = false, updatable = false)
private Date authorizeDate; private Date authorizeDate;
@ManyToOne
@JoinColumn(name = "AUTHORIZE_MEMBER_ID", nullable = false)
private Member authorizeMember; private Member authorizeMember;
@Column(name = "TARGET_COUNT", nullable = false)
private Integer targetCount; private Integer targetCount;
@Temporal(TemporalType.TIMESTAMP)
@Column(name = "CONNECT_DATE", nullable = true)
private Date connectDate; private Date connectDate;
@Column(name = "CONNECT_ADDRESS", nullable = true, length = 50)
private String connectAddress; private String connectAddress;
@Temporal(TemporalType.TIMESTAMP)
@Column(name = "CREATE_DATE", nullable = false, columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP", insertable = false, updatable = false)
private Date createDate; private Date createDate;
public Probe() { public Probe() {
@ -37,8 +71,6 @@ public class Probe {
this.id = id; this.id = id;
} }
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
public Long getId() { public Long getId() {
return id; return id;
} }
@ -47,8 +79,6 @@ public class Probe {
this.id = id; this.id = id;
} }
@ManyToOne
@JoinColumn(name = "META_PROBE_STATUS_ID", nullable = false)
public MetaProbeStatus getMetaProbeStatus() { public MetaProbeStatus getMetaProbeStatus() {
return metaProbeStatus; return metaProbeStatus;
} }
@ -57,7 +87,6 @@ public class Probe {
this.metaProbeStatus = metaProbeStatus; this.metaProbeStatus = metaProbeStatus;
} }
@Column(name = "DESCRIPTION", nullable = true, length = 50)
public String getDescription() { public String getDescription() {
return description; return description;
} }
@ -66,8 +95,6 @@ public class Probe {
this.description = 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() { public Date getCreateDate() {
return createDate; return createDate;
} }
@ -76,8 +103,6 @@ public class Probe {
this.createDate = createDate; this.createDate = createDate;
} }
@ManyToOne
@JoinColumn(name = "DOMAIN_ID", nullable = false)
public Domain getDomain() { public Domain getDomain() {
return domain; return domain;
} }
@ -86,7 +111,6 @@ public class Probe {
this.domain = domain; this.domain = domain;
} }
@Column(name = "PROBE_KEY", nullable = false, unique = true)
public String getProbeKey() { public String getProbeKey() {
return probeKey; return probeKey;
} }
@ -95,7 +119,6 @@ public class Probe {
this.probeKey = probeKey; this.probeKey = probeKey;
} }
@Column(name = "ENCRYPTION_KEY", nullable = false, length = 100, unique = true)
public String getEncryptionKey() { public String getEncryptionKey() {
return encryptionKey; return encryptionKey;
} }
@ -104,7 +127,6 @@ public class Probe {
this.encryptionKey = encryptionKey; this.encryptionKey = encryptionKey;
} }
@Column(name = "NAME", nullable = false, length = 50)
public String getName() { public String getName() {
return name; return name;
} }
@ -113,7 +135,6 @@ public class Probe {
this.name = name; this.name = name;
} }
@Column(name = "CIDR")
public String getCidr() { public String getCidr() {
return cidr; return cidr;
} }
@ -122,8 +143,6 @@ public class Probe {
this.cidr = cidr; this.cidr = cidr;
} }
@Temporal(TemporalType.TIMESTAMP)
@Column(name = "AUTHORIZE_DATE", nullable = false, columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP", insertable = false, updatable = false)
public Date getAuthorizeDate() { public Date getAuthorizeDate() {
return authorizeDate; return authorizeDate;
} }
@ -132,8 +151,6 @@ public class Probe {
this.authorizeDate = authorizeDate; this.authorizeDate = authorizeDate;
} }
@ManyToOne
@JoinColumn(name = "AUTHORIZE_MEMBER_ID", nullable = false)
public Member getAuthorizeMember() { public Member getAuthorizeMember() {
return authorizeMember; return authorizeMember;
} }
@ -142,7 +159,6 @@ public class Probe {
this.authorizeMember = authorizeMember; this.authorizeMember = authorizeMember;
} }
@Column(name = "TARGET_COUNT", nullable = false)
public Integer getTargetCount() { public Integer getTargetCount() {
return targetCount; return targetCount;
} }
@ -151,8 +167,6 @@ public class Probe {
this.targetCount = targetCount; this.targetCount = targetCount;
} }
@Temporal(TemporalType.TIMESTAMP)
@Column(name = "CONNECT_DATE", nullable = true)
public Date getConnectDate() { public Date getConnectDate() {
return connectDate; return connectDate;
} }
@ -161,7 +175,6 @@ public class Probe {
this.connectDate = connectDate; this.connectDate = connectDate;
} }
@Column(name = "CONNECT_ADDRESS", nullable = true, length = 50)
public String getConnectAddress() { public String getConnectAddress() {
return connectAddress; return connectAddress;
} }

View File

@ -12,12 +12,18 @@ import javax.persistence.*;
@Table(name = "PROBE_HOST", schema = "public") @Table(name = "PROBE_HOST", schema = "public")
public class ProbeHost { public class ProbeHost {
private Long id;
private Probe probe;
private InfraHost infraHost;
@Id @Id
@GeneratedValue(strategy = GenerationType.IDENTITY) @GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id;
@OneToOne
@JoinColumn(name = "PROBE_ID", nullable = false)
private Probe probe;
@OneToOne
@JoinColumn(name = "INFRA_HOST_ID", nullable = false)
private InfraHost infraHost;
public Long getId() { public Long getId() {
return id; return id;
} }
@ -26,8 +32,6 @@ public class ProbeHost {
this.id = id; this.id = id;
} }
@OneToOne
@JoinColumn(name = "PROBE_ID", nullable = false)
public Probe getProbe() { public Probe getProbe() {
return probe; return probe;
} }
@ -36,8 +40,6 @@ public class ProbeHost {
this.probe = probe; this.probe = probe;
} }
@OneToOne
@JoinColumn(name = "INFRA_HOST_ID", nullable = false)
public InfraHost getInfraHost() { public InfraHost getInfraHost() {
return infraHost; return infraHost;
} }

View File

@ -17,21 +17,43 @@ import java.util.List;
@Entity @Entity
@Table(name = "SENSOR", schema = "public") @Table(name = "SENSOR", schema = "public")
public class Sensor { public class Sensor {
private Long id;
private Target target;
private String name;
private String description;
private MetaSensorStatus metaSensorStatus;
private MetaCrawler metaCrawler;
private String crawlerInputItems;
private Integer itemCount = 0;
private Date createDate;
// Transient property
private List<MetaSensorDisplayItem> sensorItems;
@Id @Id
@GeneratedValue(strategy = GenerationType.IDENTITY) @GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id;
@ManyToOne
@OnDelete(action = OnDeleteAction.CASCADE)
@JoinColumn(name = "TARGET_ID", nullable = false)
private Target target;
@Column(name = "NAME", nullable = false, length = 50)
private String name;
@Column(name = "DESCRIPTION", nullable = true, length = 50)
private String description;
@ManyToOne
@JoinColumn(name = "META_SENSOR_STATUS_ID")
private MetaSensorStatus metaSensorStatus;
@ManyToOne
@JoinColumn(name = "META_CRAWLER_ID", nullable = false)
private MetaCrawler metaCrawler;
@Column(name = "CRAWLER_INPUT_ITEMS", nullable = true, length = 50)
private String crawlerInputItems;
@Column(name = "ITEM_COUNT", nullable = false)
private Integer itemCount = 0;
@Temporal(TemporalType.TIMESTAMP)
@Column(name = "CREATE_DATE", nullable = false, columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP", insertable = false, updatable = false)
private Date createDate;
@Transient
private List<MetaSensorDisplayItem> sensorItems;
public Long getId() { public Long getId() {
return id; return id;
} }
@ -40,7 +62,6 @@ public class Sensor {
this.id = id; this.id = id;
} }
@Column(name = "DESCRIPTION", nullable = true, length = 50)
public String getDescription() { public String getDescription() {
return description; return description;
} }
@ -49,8 +70,6 @@ public class Sensor {
this.description = description; this.description = description;
} }
@ManyToOne
@JoinColumn(name = "META_SENSOR_STATUS_ID")
public MetaSensorStatus getMetaSensorStatus() { public MetaSensorStatus getMetaSensorStatus() {
return metaSensorStatus; return metaSensorStatus;
} }
@ -59,9 +78,6 @@ public class Sensor {
this.metaSensorStatus = metaSensorStatus; this.metaSensorStatus = metaSensorStatus;
} }
@ManyToOne
@OnDelete(action = OnDeleteAction.CASCADE)
@JoinColumn(name = "TARGET_ID", nullable = false)
public Target getTarget() { public Target getTarget() {
return target; return target;
} }
@ -70,8 +86,6 @@ public class Sensor {
this.target = target; this.target = target;
} }
@ManyToOne
@JoinColumn(name = "META_CRAWLER_ID", nullable = false)
public MetaCrawler getMetaCrawler() { public MetaCrawler getMetaCrawler() {
return metaCrawler; return metaCrawler;
} }
@ -80,7 +94,6 @@ public class Sensor {
this.metaCrawler = metaCrawler; this.metaCrawler = metaCrawler;
} }
@Column(name = "CRAWLER_INPUT_ITEMS", nullable = true, length = 50)
public String getCrawlerInputItems() { public String getCrawlerInputItems() {
return crawlerInputItems; return crawlerInputItems;
} }
@ -89,7 +102,6 @@ public class Sensor {
this.crawlerInputItems = crawlerInputItems; this.crawlerInputItems = crawlerInputItems;
} }
@Column(name = "ITEM_COUNT", nullable = false)
public Integer getItemCount() { public Integer getItemCount() {
return itemCount; return itemCount;
} }
@ -98,7 +110,6 @@ public class Sensor {
this.itemCount = itemCount; this.itemCount = itemCount;
} }
@Column(name = "NAME", nullable = false, length = 50)
public String getName() { public String getName() {
return name; return name;
} }
@ -107,8 +118,6 @@ public class Sensor {
this.name = name; this.name = name;
} }
@Temporal(TemporalType.TIMESTAMP)
@Column(name = "CREATE_DATE", nullable = false, columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP", insertable = false, updatable = false)
public Date getCreateDate() { public Date getCreateDate() {
return createDate; return createDate;
} }
@ -117,13 +126,6 @@ public class Sensor {
this.createDate = createDate; this.createDate = createDate;
} }
@PrePersist
void preInsert() {
this.itemCount = 0;
}
@Transient
public List<MetaSensorDisplayItem> getSensorItems() { public List<MetaSensorDisplayItem> getSensorItems() {
return sensorItems; return sensorItems;
} }
@ -132,4 +134,9 @@ public class Sensor {
this.sensorItems = sensorItems; this.sensorItems = sensorItems;
} }
@PrePersist
void preInsert() {
this.itemCount = 0;
}
} }

View File

@ -13,13 +13,24 @@ import java.util.Date;
@Entity @Entity
@Table(name = "SENSOR_ITEM", schema = "public") @Table(name = "SENSOR_ITEM", schema = "public")
public class SensorItem { public class SensorItem {
private Long id;
private Sensor sensor;
private MetaSensorDisplayItem metaSensorDisplayItem;
private Date createDate;
@Id @Id
@GeneratedValue(strategy = GenerationType.IDENTITY) @GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id;
@ManyToOne
@JoinColumn(name = "SENSOR_ID", nullable = false)
@OnDelete(action = OnDeleteAction.CASCADE)
private Sensor sensor;
@ManyToOne
@JoinColumn(name = "META_SENSOR_DISPLAY_ITEM_ID", nullable = false)
private MetaSensorDisplayItem metaSensorDisplayItem;
@Temporal(TemporalType.TIMESTAMP)
@Column(name = "CREATE_DATE", nullable = false, columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP", insertable = false, updatable = false)
private Date createDate;
public Long getId() { public Long getId() {
return id; return id;
} }
@ -28,9 +39,6 @@ public class SensorItem {
this.id = id; this.id = id;
} }
@ManyToOne
@JoinColumn(name = "SENSOR_ID", nullable = false)
@OnDelete(action = OnDeleteAction.CASCADE)
public Sensor getSensor() { public Sensor getSensor() {
return this.sensor; return this.sensor;
} }
@ -39,8 +47,6 @@ public class SensorItem {
this.sensor = sensor; this.sensor = sensor;
} }
@ManyToOne
@JoinColumn(name = "META_SENSOR_DISPLAY_ITEM_ID", nullable = false)
public MetaSensorDisplayItem getMetaSensorDisplayItem() { public MetaSensorDisplayItem getMetaSensorDisplayItem() {
return metaSensorDisplayItem; return metaSensorDisplayItem;
} }
@ -49,8 +55,6 @@ public class SensorItem {
this.metaSensorDisplayItem = metaSensorDisplayItem; this.metaSensorDisplayItem = metaSensorDisplayItem;
} }
@Temporal(TemporalType.TIMESTAMP)
@Column(name = "CREATE_DATE", nullable = false, columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP", insertable = false, updatable = false)
public Date getCreateDate() { public Date getCreateDate() {
return createDate; return createDate;
} }

View File

@ -11,12 +11,19 @@ import javax.persistence.*;
@Entity @Entity
@Table(name = "SENSOR_ITEM_DEPENDENCY", schema = "public") @Table(name = "SENSOR_ITEM_DEPENDENCY", schema = "public")
public class SensorItemDependency { public class SensorItemDependency {
private Long id;
private MetaSensorDisplayItem metaSensorDisplayItem;
private MetaSensorItemKey metaSensorItemKey;
@Id @Id
@GeneratedValue(strategy = GenerationType.IDENTITY) @GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id;
@ManyToOne
@JoinColumn(name = "META_SENSOR_DISPLAY_ITEM_ID", nullable = false)
private MetaSensorDisplayItem metaSensorDisplayItem;
@ManyToOne
@JoinColumn(name = "META_SENSOR_ITEM_KEY_ID", nullable = false)
private MetaSensorItemKey metaSensorItemKey;
public Long getId() { public Long getId() {
return id; return id;
} }
@ -25,8 +32,6 @@ public class SensorItemDependency {
this.id = id; this.id = id;
} }
@ManyToOne
@JoinColumn(name = "META_SENSOR_DISPLAY_ITEM_ID", nullable = false)
public MetaSensorDisplayItem getMetaSensorDisplayItem() { public MetaSensorDisplayItem getMetaSensorDisplayItem() {
return metaSensorDisplayItem; return metaSensorDisplayItem;
} }
@ -35,8 +40,6 @@ public class SensorItemDependency {
this.metaSensorDisplayItem = metaSensorDisplayItem; this.metaSensorDisplayItem = metaSensorDisplayItem;
} }
@ManyToOne
@JoinColumn(name = "META_SENSOR_ITEM_KEY_ID", nullable = false)
public MetaSensorItemKey getMetaSensorItemKey() { public MetaSensorItemKey getMetaSensorItemKey() {
return metaSensorItemKey; return metaSensorItemKey;
} }

View File

@ -3,6 +3,7 @@ package com.loafle.overflow.model.target;
import javax.persistence.*; import javax.persistence.*;
import com.loafle.overflow.model.infra.Infra; import com.loafle.overflow.model.infra.Infra;
import com.loafle.overflow.model.meta.MetaTargetStatus;
import com.loafle.overflow.model.meta.MetaTargetType; import com.loafle.overflow.model.meta.MetaTargetType;
import com.loafle.overflow.model.sensor.Sensor; import com.loafle.overflow.model.sensor.Sensor;
@ -16,28 +17,54 @@ import java.util.List;
@Table(name = "TARGET", schema = "public") @Table(name = "TARGET", schema = "public")
public class Target { public class Target {
private Long id;
private Infra infra;
private MetaTargetType metaTargetType;
private String name;
private String description;
private Integer sensorCount;
private Date createDate;
// Transient property
private List<Sensor> sensors;
@Id @Id
@GeneratedValue(strategy = GenerationType.IDENTITY) @GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id;
@OneToOne
@JoinColumn(name = "INFRA_ID", nullable = false)
private Infra infra;
@ManyToOne
@JoinColumn(name = "META_TARGET_TYPE_ID", nullable = false)
private MetaTargetType metaTargetType;
@Column(name = "NAME")
private String name;
@Column(name = "DESCRIPTION")
private String description;
@Column(name = "SENSOR_COUNT", nullable = false)
private Integer sensorCount;
// @ManyToOne
// @JoinColumn(name = "META_TARGET_STATUS_ID", nullable = false)
// private MetaTargetStatus metaTargetStatus;
@Temporal(TemporalType.TIMESTAMP)
@Column(name = "CREATE_DATE", nullable = false, columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP", insertable = false, updatable = false)
private Date createDate;
@Transient
private List<Sensor> sensors;
public Long getId() { public Long getId() {
return id; return id;
} }
// public MetaTargetStatus getMetaTargetStatus() {
// return metaTargetStatus;
// }
// public void setMetaTargetStatus(MetaTargetStatus metaTargetStatus) {
// this.metaTargetStatus = metaTargetStatus;
// }
public void setId(Long id) { public void setId(Long id) {
this.id = id; this.id = id;
} }
@Column(name = "NAME")
public String getName() { public String getName() {
return name; return name;
} }
@ -46,7 +73,6 @@ public class Target {
this.name = name; this.name = name;
} }
@Column(name = "DESCRIPTION")
public String getDescription() { public String getDescription() {
return description; return description;
} }
@ -55,7 +81,6 @@ public class Target {
this.description = description; this.description = description;
} }
@Column(name = "SENSOR_COUNT", nullable = false)
public Integer getSensorCount() { public Integer getSensorCount() {
return sensorCount; return sensorCount;
} }
@ -64,7 +89,6 @@ public class Target {
this.sensorCount = sensorCount; this.sensorCount = sensorCount;
} }
@Transient
public List<Sensor> getSensors() { public List<Sensor> getSensors() {
return sensors; return sensors;
} }
@ -78,8 +102,6 @@ public class Target {
this.sensorCount = 0; this.sensorCount = 0;
} }
@OneToOne
@JoinColumn(name = "INFRA_ID", nullable = false)
public Infra getInfra() { public Infra getInfra() {
return infra; return infra;
} }
@ -88,8 +110,6 @@ public class Target {
this.infra = infra; this.infra = infra;
} }
@ManyToOne
@JoinColumn(name = "META_TARGET_TYPE_ID", nullable = false)
public MetaTargetType getMetaTargetType() { public MetaTargetType getMetaTargetType() {
return metaTargetType; return metaTargetType;
} }
@ -98,8 +118,6 @@ public class Target {
this.metaTargetType = metaTargetType; this.metaTargetType = metaTargetType;
} }
@Temporal(TemporalType.TIMESTAMP)
@Column(name = "CREATE_DATE", nullable = false, columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP", insertable = false, updatable = false)
public Date getCreateDate() { public Date getCreateDate() {
return createDate; return createDate;
} }