diff options
author | 2019-03-11 15:50:07 +0200 | |
---|---|---|
committer | 2019-03-11 16:05:19 +0200 | |
commit | cb8baa2054a427becd39e4031798375efcc9027c (patch) | |
tree | aad2b6cc0a6afcc2627a84868d74ffb736210e24 /vid-ext-services-simulator/src/main/java/org/onap/simulator/db/entities/Role.java | |
parent | e2617e9d5b82f2605e1660750a0dae96a077d83f (diff) |
Merge simulator from ECOMP's repository
Reference commit in ECOMP: 8e92a8c6
Issue-ID: VID-378
Change-Id: Ifd87e07db55a760fc94c582758a7413103b5fdd8
Signed-off-by: Ittay Stern <ittay.stern@att.com>
Diffstat (limited to 'vid-ext-services-simulator/src/main/java/org/onap/simulator/db/entities/Role.java')
-rw-r--r-- | vid-ext-services-simulator/src/main/java/org/onap/simulator/db/entities/Role.java | 57 |
1 files changed, 57 insertions, 0 deletions
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; + } +} |