Advertisement
Guest User

Untitled

a guest
Mar 10th, 2016
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.80 KB | None | 0 0
  1. import java.util.ArrayList;
  2. import java.util.List;
  3.  
  4. /**
  5. * Created by wojni on 10.03.2016.
  6. */
  7. public class users {
  8. long ID;
  9. string name;
  10. string surname;
  11. string email;
  12. string login;
  13. string md5pass;
  14. bool active;
  15. bool type; // 1 - pracownik wewnetrzny, 0 - pracownik zewnetrzny;
  16. List<role> roles = new ArrayList<>();
  17. List<project> projects = new ArrayList<>()
  18. public users(long id, string name, string surname, string email, string login, string md5pass, bool active, bool type)
  19. {
  20. this.ID = id;
  21. this.name = name;
  22. this.surname = surname;
  23. this.email = email;
  24. this.login = login;
  25. this.md5pass = md5pass;
  26. this.active = active;
  27. this.type = type;
  28. }
  29.  
  30. public addRoleToUser(users user, role rola)
  31. {
  32. user.roles.add(rola);
  33. }
  34.  
  35. public addProjectToUser(users user, project project)
  36. {
  37. user.projects.add(project);
  38. }
  39.  
  40. }
  41.  
  42.  
  43. /////////////////////////////////////////////////////////////////////////////
  44.  
  45. /**
  46. * Created by wojni on 10.03.2016.
  47. */
  48. public class project {
  49. long ID;
  50. string name;
  51. string descritpion;
  52. string version;
  53. priority priority;
  54.  
  55.  
  56. public project(long id, string name, string desc, string version, priority priority)
  57. {
  58. this.ID = id;
  59. this.name = name;
  60. this.descritpion = desc;
  61. this.version = version;
  62. this.priority = priority;
  63. }
  64. }
  65.  
  66. ///////////////////////////////////////////////////////////////////////////////////
  67.  
  68. /**
  69. * Created by wojni on 10.03.2016.
  70. */
  71. public class zgloszenie {
  72. long ID;
  73. //typ
  74. string description;
  75. priority priority;
  76. project project;
  77.  
  78.  
  79. public zgloszenie(long id, string description, priority priority, project project)
  80. {
  81. this.ID = id;
  82. this.description = description;
  83. this.priority = priority;
  84. this.project = project;
  85. }
  86. }
  87.  
  88. ////////////////////////////////////////////////////////////////////////////////////////
  89.  
  90. /**
  91. * Created by wojni on 10.03.2016.
  92. */
  93. public class priority {
  94. long ID;
  95. string name;
  96. string responseTime;
  97.  
  98.  
  99. public priority(long id, string name, string responseTime)
  100. {
  101. this.ID = id;
  102. this.name = name;
  103. this.responseTime = responseTime;
  104. }
  105. }
  106.  
  107. ///////////////////////////////////////////////////////////////////////////////////////
  108.  
  109. /**
  110. * Created by wojni on 10.03.2016.
  111. */
  112. public class role {
  113. long ID;
  114. string name;
  115. users user;
  116.  
  117. public role(long id, string Name, users User)
  118. {
  119. this.ID = id;
  120. this.name = Name;
  121. this.user = User;
  122. }
  123. }
  124.  
  125. /////////////////////////////////////////////////////////////////////////////////////////
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement