Coverage Report - org.directdemocracyportal.democracy.model.application.UserRole
 
Classes in this File Line Coverage Branch Coverage Complexity
UserRole
50%
3/6
N/A
1
 
 1  
 /*
 2  
 Copyright 2010 James Pether Sörling Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. 
 3  
         $Id
 4  
 */
 5  
 package org.directdemocracyportal.democracy.model.application;
 6  
 
 7  
 import java.util.HashSet;
 8  
 import java.util.Set;
 9  
 
 10  
 import javax.persistence.Entity;
 11  
 import javax.persistence.FetchType;
 12  
 import javax.persistence.ManyToMany;
 13  
 
 14  
 import org.directdemocracyportal.democracy.model.core.Role;
 15  
 import org.hibernate.annotations.Cache;
 16  
 import org.hibernate.annotations.CacheConcurrencyStrategy;
 17  
 
 18  
 /**
 19  
  * The Class UserRole.
 20  
  */
 21  
 @Entity
 22  
 @Cache(usage = CacheConcurrencyStrategy.NONSTRICT_READ_WRITE)
 23  
 public class UserRole extends Role
 24  
 {
 25  
 
 26  
     /** The Constant serialVersionUID. */
 27  
     private static final long serialVersionUID = -1561947450119542687L;
 28  
 
 29  
     /** The role actions. */
 30  1
     private Set<RoleAction> roleActions = new HashSet<RoleAction>();
 31  
 
 32  
     /**
 33  
      * Instantiates a new user role.
 34  
      */
 35  1
     public UserRole() {
 36  1
     }
 37  
 
 38  
     /**
 39  
      * Gets the role actions.
 40  
      *
 41  
      * @return the role actions
 42  
      */
 43  
     @ManyToMany(fetch = FetchType.LAZY)
 44  
     public Set<RoleAction> getRoleActions() {
 45  0
         return this.roleActions;
 46  
     }
 47  
 
 48  
     /**
 49  
      * Sets the role actions.
 50  
      *
 51  
      * @param roleActions the new role actions
 52  
      */
 53  
     public void setRoleActions(Set<RoleAction> roleActions) {
 54  0
         this.roleActions = roleActions;
 55  0
     }
 56  
 }