示例#1
0
 /**
  * Transient getter for the associated Role
  *
  * @return returns primaryKey.getRole()
  */
 @Transient
 public Role getRole() {
   return primaryKey.getRole();
 }
示例#2
0
 /** @return Shortcut to primaryKey.getUser() */
 @Transient
 public User getUser() {
   return primaryKey.getUser();
 }
示例#3
0
 /**
  * @param user The User
  * @param role The Role
  */
 public UserRole(User user, Role role) {
   Preconditions.checkNotNull(user, "user is required");
   Preconditions.checkNotNull(role, "role is required");
   primaryKey.setUser(user);
   primaryKey.setRole(role);
 }