Guest User

szrrizvi-object

a guest
May 30th, 2012
51
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.38 KB | None | 0 0
  1. package org.openmrs;
  2.  
  3. import java.util.Set;
  4.  
  5. public class AuthorizationPrincipal extends BaseOpenmrsMetadata implements java.io.Serializable {
  6.  
  7. public static final long serialVersionUID = 1L;
  8.  
  9. private Set<Privilege> privileges;
  10.  
  11. private Integer authorizationPrincipalId;
  12.  
  13. private String policy;
  14.  
  15. /**
  16. * Default constructor
  17. */
  18. public AuthorizationPrincipal() {
  19. }
  20.  
  21. /**
  22. * Constructor with name
  23. */
  24. public AuthorizationPrincipal(String name) {
  25. setName(name);
  26. }
  27.  
  28. /**
  29. * @return the privileges
  30. */
  31. public Set<Privilege> getPrivileges() {
  32. return privileges;
  33. }
  34.  
  35. /**
  36. * @param privileges the privileges to set
  37. */
  38. public void setPrivileges(Set<Privilege> privileges) {
  39. this.privileges = privileges;
  40. }
  41.  
  42. /**
  43. * @return the policy
  44. */
  45. public String getPolicy() {
  46. return policy;
  47. }
  48.  
  49. /**
  50. * @param policy the policy to set
  51. */
  52. public void setPolicy(String policy) {
  53. this.policy = policy;
  54. }
  55.  
  56. public Integer getAuthorizationPrincipalId() {
  57. return this.authorizationPrincipalId;
  58. }
  59.  
  60. public void setAuthorizationPrincipalId(Integer authorizationPrincipalId) {
  61. this.authorizationPrincipalId = authorizationPrincipalId;
  62. }
  63.  
  64. @Override
  65. public Integer getId() {
  66. return getAuthorizationPrincipalId();
  67. }
  68.  
  69. @Override
  70. public void setId(Integer id) {
  71. setAuthorizationPrincipalId(id);
  72. }
  73. }
Advertisement
Add Comment
Please, Sign In to add comment