Part of Slepp's ProjectsPastebinTURLImagebinFilebin
Feedback -- English French German Japanese
Create Upload Newest Tools Donate


Wednesday, October 2nd, 2013 at 2:57:34pm UTC 

  1. String queryString = "SELECT boardList FROM BoardPrivileges AS boardPrivs " +
  2.                          "WHERE boardPrivs.userList = :user";
  4. public class Users {
  5.     @Id
  6.     @GeneratedValue
  7.     private Long id;
  8.     private String type; // admin / teamlead / normal
  9.     private String name;
  10.     private boolean isAdmin;
  12.     @ManyToOne
  13.     private Companies company;
  14.     @ManyToMany
  15.     private Collection<BoardPrivileges> boardPrivilegsList =  new ArrayList<BoardPrivileges>();
  20. public class BoardPrivileges {
  21.     @Id
  22.     @GeneratedValue
  23.     private Long id;
  24.     @ManyToMany  (mappedBy = "boardPrivilegsList")
  25.     private Collection<Users> userList = new ArrayList<Users>();
  26.     @ManyToMany  (mappedBy = "boardPrivilegesList")
  27.     private Collection<Boards> boardList = new ArrayList<Boards>();
  28.     //This Board
  29.     private boolean isCreater; //is creater of this board
  30.     private boolean canRead;
  31.     private boolean canUpdate;
  32.     private boolean canDelete;
  37. public class Boards {
  38.     @Id
  39.     @GeneratedValue
  40.     private Long id;
  41.     private String title;
  42.     private String description;
  43.     @ManyToOne
  44.     private Companies company;
  45.     @ManyToMany
  46.     private Collection<BoardPrivileges> boardPrivilegesList = new ArrayList<BoardPrivileges>();


Update the Post

Either update this post and resubmit it with changes, or make a new post.

You may also comment on this post.

update paste below
details of the post (optional)

Note: Only the paste content is required, though the following information can be useful to others.

Save name / title?

(space separated, optional)

Please note that information posted here will not expire by default. If you do not want it to expire, please set the expiry time above. If it is set to expire, web search engines will not be allowed to index it prior to it expiring. Items that are not marked to expire will be indexable by search engines. Be careful with your passwords. All illegal activities will be reported and any information will be handed over to the authorities, so be good.

comments powered by Disqus
worth-right worth-right