diff options
Diffstat (limited to 'vid-ext-services-simulator/src/main/java/org/onap/simulator/db/entities')
6 files changed, 620 insertions, 0 deletions
diff --git a/vid-ext-services-simulator/src/main/java/org/onap/simulator/db/entities/App.java b/vid-ext-services-simulator/src/main/java/org/onap/simulator/db/entities/App.java new file mode 100644 index 000000000..222e753c4 --- /dev/null +++ b/vid-ext-services-simulator/src/main/java/org/onap/simulator/db/entities/App.java @@ -0,0 +1,204 @@ +package org.onap.simulator.db.entities; + +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.Id; +import org.hibernate.annotations.Type; + +@Entity(name = "fn_app") +public class App { + @Id + @Column(name = "app_id") + protected Integer id; + @Column(name = "app_name") + private String name; // app_name + @Column(name = "app_image_url") + private String imageUrl; // app_image_url + @Column(name = "app_description") + private String description; // app_description + @Column(name = "app_notes") + private String notes; // app_notes + @Column(name = "app_url") + private String url; // app_url + @Column(name = "app_alternate_url") + private String alternateUrl; // app_alternate_url + @Column(name = "app_rest_endpoint") + private String restEndpoint; // app_rest_endpoint + @Column(name = "ml_app_name") + private String mlAppName; // ml_app_name + @Column(name = "ml_app_admin_id") + private String mlAppAdminId; // ml_app_admin_id + @Column(name = "mots_id") + private Integer motsId; // mots_id + @Column(name = "app_password") + private String appPassword; // app_password + @Column(columnDefinition = "varchar") + @Type(type="yes_no") + private Boolean open; + @Column(columnDefinition = "varchar") + @Type(type="yes_no") + private Boolean enabled; + @Column(columnDefinition="mediumblob") + private byte[] thumbnail; + @Column(name = "app_username") + private String username; // app_username + @Column(name = "ueb_key") + private String uebKey; // ueb_key + @Column(name = "ueb_secret") + private String uebSecret; // ueb_secret + @Column(name = "ueb_topic_name") + private String uebTopicName; // ueb_topic_name + + + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getImageUrl() { + return imageUrl; + } + + public void setImageUrl(String imageUrl) { + this.imageUrl = imageUrl; + } + + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + public String getNotes() { + return notes; + } + + public void setNotes(String notes) { + this.notes = notes; + } + + public String getUrl() { + return url; + } + + public void setUrl(String url) { + this.url = url; + } + + public String getAlternateUrl() { + return alternateUrl; + } + + public void setAlternateUrl(String alternateUrl) { + this.alternateUrl = alternateUrl; + } + + public String getRestEndpoint() { + return restEndpoint; + } + + public void setRestEndpoint(String restEndpoint) { + this.restEndpoint = restEndpoint; + } + + public String getMlAppName() { + return mlAppName; + } + + public void setMlAppName(String mlAppName) { + this.mlAppName = mlAppName; + } + + public String getMlAppAdminId() { + return mlAppAdminId; + } + + public void setMlAppAdminId(String mlAppAdminId) { + this.mlAppAdminId = mlAppAdminId; + } + + public Integer getMotsId() { + return motsId; + } + + public void setMotsId(Integer motsId) { + this.motsId = motsId; + } + + public String getAppPassword() { + return appPassword; + } + + public void setAppPassword(String appPassword) { + this.appPassword = appPassword; + } + + public Boolean getOpen() { + return open; + } + + public void setOpen(Boolean open) { + this.open = open; + } + + public Boolean getEnabled() { + return enabled; + } + + public void setEnabled(Boolean enabled) { + this.enabled = enabled; + } + + public byte[] getThumbnail() { + return thumbnail; + } + + public void setThumbnail(byte[] thumbnail) { + this.thumbnail = thumbnail; + } + + public String getUsername() { + return username; + } + + public void setUsername(String username) { + this.username = username; + } + + public String getUebKey() { + return uebKey; + } + + public void setUebKey(String uebKey) { + this.uebKey = uebKey; + } + + public String getUebSecret() { + return uebSecret; + } + + public void setUebSecret(String uebSecret) { + this.uebSecret = uebSecret; + } + + public String getUebTopicName() { + return uebTopicName; + } + + public void setUebTopicName(String uebTopicName) { + this.uebTopicName = uebTopicName; + } +} diff --git a/vid-ext-services-simulator/src/main/java/org/onap/simulator/db/entities/Function.java b/vid-ext-services-simulator/src/main/java/org/onap/simulator/db/entities/Function.java new file mode 100644 index 000000000..0f37ec9e2 --- /dev/null +++ b/vid-ext-services-simulator/src/main/java/org/onap/simulator/db/entities/Function.java @@ -0,0 +1,56 @@ +package org.onap.simulator.db.entities; + +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.Id; + +@Entity(name = "fn_function") +public class Function { + + @Id + @Column(name = "function_cd") + private String code; + @Column(name = "function_name") + private String name; + private String type; + private String action; + + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public String getAction() { + return action; + } + + public void setAction(String action) { + this.action = action; + } + + public String getName() { + return name; + } + + public String getCode() { + return code; + } + + public void setName(String name) { + this.name = name; + } + + public void setCode(String code) { + this.code = code; + } + + @Override + public String toString() { + return "RoleFunction [code=" + code + ", name=" + name + ", type=" + type + ", action=" + action + "]"; + } + + +} diff --git a/vid-ext-services-simulator/src/main/java/org/onap/simulator/db/entities/Role.java b/vid-ext-services-simulator/src/main/java/org/onap/simulator/db/entities/Role.java new file mode 100644 index 000000000..8b09d1f57 --- /dev/null +++ b/vid-ext-services-simulator/src/main/java/org/onap/simulator/db/entities/Role.java @@ -0,0 +1,57 @@ +package org.onap.simulator.db.entities; + +import java.util.Set; +import javax.persistence.CascadeType; +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.Id; +import javax.persistence.OneToMany; +import org.hibernate.annotations.Type; + +@Entity(name = "fn_role") +public class Role { + @Id + @Column(name = "role_id") + private Integer id; + @Column(name = "role_name") + private String name; + @Column(name = "active_yn", columnDefinition = "varchar") + @Type(type="yes_no") + private boolean active; + + @OneToMany(cascade = CascadeType.ALL, targetEntity=RoleFunction.class, mappedBy="id") + private Set<RoleFunction> roleFunctions; + + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public boolean isActive() { + return active; + } + + public void setActive(boolean active) { + this.active = active; + } + + + public Set<RoleFunction> getRoleFunctions() { + return roleFunctions; + } + + public void setRoleFunctions(Set<RoleFunction> roleFunctions) { + this.roleFunctions = roleFunctions; + } +} diff --git a/vid-ext-services-simulator/src/main/java/org/onap/simulator/db/entities/RoleFunction.java b/vid-ext-services-simulator/src/main/java/org/onap/simulator/db/entities/RoleFunction.java new file mode 100644 index 000000000..addda5363 --- /dev/null +++ b/vid-ext-services-simulator/src/main/java/org/onap/simulator/db/entities/RoleFunction.java @@ -0,0 +1,33 @@ +package org.onap.simulator.db.entities; + +import java.io.Serializable; +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.Id; + +@Entity(name = "fn_role_function") +public class RoleFunction implements Serializable { + + @Id + @Column(name = "role_id") + private Integer id; + @Id + @Column(name = "function_cd") + private String code; + + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + public String getCode() { + return code; + } + + public void setCode(String code) { + this.code = code; + } +} diff --git a/vid-ext-services-simulator/src/main/java/org/onap/simulator/db/entities/User.java b/vid-ext-services-simulator/src/main/java/org/onap/simulator/db/entities/User.java new file mode 100644 index 000000000..349845f36 --- /dev/null +++ b/vid-ext-services-simulator/src/main/java/org/onap/simulator/db/entities/User.java @@ -0,0 +1,221 @@ +package org.onap.simulator.db.entities; + +import java.math.BigDecimal; +import java.util.Set; +import javax.persistence.CascadeType; +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.Id; +import javax.persistence.OneToMany; +import org.hibernate.annotations.Type; + +@Entity(name = "fn_user") +public class User { + + @Id @Column(name = "user_id") + private Integer id; + @Column(name = "created_id") + private Integer createdId; + @Column(name = "modified_id") + private Integer modifiedId; + @Column(name = "org_id") + private Integer orgId; + @Column(name = "org_manager_userid") + private String managerId; + @Column(name = "first_name") + private String firstName; + @Column(name = "middle_name") + private String middleInitial; + @Column(name = "last_name") + private String lastName; + + @Column(name = "address_id") + private BigDecimal addressId; + @Column(name = "alert_method_cd") + private String alertMethodCd; + private String hrid; + @Column(name = "org_user_id") + private String orgUserId; + @Column(name = "ADDRESS_LINE_1") + private String address1; + @Column(name = "ADDRESS_LINE_2") + private String address2; + @Column(name = "login_id") + private String loginId; + @Column(name = "login_pwd") + private String loginPwd; + @Column(name = "active_yn", columnDefinition = "varchar") + @Type(type="yes_no") + private Boolean active; + @Column(name = "is_internal_yn", columnDefinition = "varchar") + @Type(type="yes_no") + private Boolean internal; + @Column(name = "timezone") + private Integer timeZoneId; + + @OneToMany(cascade = CascadeType.ALL, targetEntity=UserApp.class, mappedBy="userId") + private Set<UserApp> userApps; + + public User() { + } + + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + public Integer getCreatedId() { + return createdId; + } + + public void setCreatedId(Integer createdId) { + this.createdId = createdId; + } + + public Integer getModifiedId() { + return modifiedId; + } + + public void setModifiedId(Integer modifiedId) { + this.modifiedId = modifiedId; + } + + public Integer getOrgId() { + return orgId; + } + + public void setOrgId(Integer orgId) { + this.orgId = orgId; + } + + public String getManagerId() { + return managerId; + } + + public void setManagerId(String managerId) { + this.managerId = managerId; + } + + public String getFirstName() { + return firstName; + } + + public void setFirstName(String firstName) { + this.firstName = firstName; + } + + public String getMiddleInitial() { + return middleInitial; + } + + public void setMiddleInitial(String middleInitial) { + this.middleInitial = middleInitial; + } + + public String getLastName() { + return lastName; + } + + public void setLastName(String lastName) { + this.lastName = lastName; + } + + public BigDecimal getAddressId() { + return addressId; + } + + public void setAddressId(BigDecimal addressId) { + this.addressId = addressId; + } + + public String getAlertMethodCd() { + return alertMethodCd; + } + + public void setAlertMethodCd(String alertMethodCd) { + this.alertMethodCd = alertMethodCd; + } + + public String getHrid() { + return hrid; + } + + public void setHrid(String hrid) { + this.hrid = hrid; + } + + public String getOrgUserId() { + return orgUserId; + } + + public void setOrgUserId(String orgUserId) { + this.orgUserId = orgUserId; + } + + public String getAddress1() { + return address1; + } + + public void setAddress1(String address1) { + this.address1 = address1; + } + + public String getAddress2() { + return address2; + } + + public void setAddress2(String address2) { + this.address2 = address2; + } + + public String getLoginId() { + return loginId; + } + + public void setLoginId(String loginId) { + this.loginId = loginId; + } + + public String getLoginPwd() { + return loginPwd; + } + + public void setLoginPwd(String loginPwd) { + this.loginPwd = loginPwd; + } + + public Boolean getActive() { + return active; + } + + public void setActive(Boolean active) { + this.active = active; + } + + public Boolean getInternal() { + return internal; + } + + public void setInternal(Boolean internal) { + this.internal = internal; + } + + public Integer getTimeZoneId() { + return timeZoneId; + } + + public void setTimeZoneId(Integer timeZoneId) { + this.timeZoneId = timeZoneId; + } + + public Set<UserApp> getUserApps() { + return userApps; + } + + public void setUserApps(Set<UserApp> userApps) { + this.userApps = userApps; + } +} diff --git a/vid-ext-services-simulator/src/main/java/org/onap/simulator/db/entities/UserApp.java b/vid-ext-services-simulator/src/main/java/org/onap/simulator/db/entities/UserApp.java new file mode 100644 index 000000000..e4eba7940 --- /dev/null +++ b/vid-ext-services-simulator/src/main/java/org/onap/simulator/db/entities/UserApp.java @@ -0,0 +1,49 @@ +package org.onap.simulator.db.entities; + +import java.io.Serializable; +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.Id; +import javax.persistence.JoinColumn; +import javax.persistence.ManyToOne; + +@Entity(name = "fn_user_role") +public class UserApp implements Serializable { + + @Id + @Column(name = "user_id") + private Integer userId; + @Id + @ManyToOne + @JoinColumn(name = "app_id") + private App app; + @Id + @ManyToOne + @JoinColumn(name = "role_id") + private Role role; + + public Integer getUserId() { + return userId; + } + + public void setUserId(Integer userId) { + this.userId = userId; + } + + public App getApp() { + return app; + } + + public void setApp(App app) { + this.app = app; + } + + public Role getRole() { + return role; + } + + public void setRole(Role role) { + this.role = role; + } + +} |