blob: 8b09d1f574f8896c40954c3012d28d27a9739a3c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
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;
}
}
|