Coverage Report - org.kuali.mobility.admin.entity.HomeScreen
 
Classes in this File Line Coverage Branch Coverage Complexity
HomeScreen
0%
0/20
N/A
1
 
 1  
 /**
 2  
  * Copyright 2011 The Kuali Foundation Licensed under the
 3  
  * Educational Community License, Version 2.0 (the "License"); you may
 4  
  * not use this file except in compliance with the License. You may
 5  
  * obtain a copy of the License at
 6  
  *
 7  
  * http://www.osedu.org/licenses/ECL-2.0
 8  
  *
 9  
  * Unless required by applicable law or agreed to in writing,
 10  
  * software distributed under the License is distributed on an "AS IS"
 11  
  * BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
 12  
  * or implied. See the License for the specific language governing
 13  
  * permissions and limitations under the License.
 14  
  */
 15  
 
 16  
 package org.kuali.mobility.admin.entity;
 17  
 
 18  
 import java.io.Serializable;
 19  
 import java.util.ArrayList;
 20  
 import java.util.Arrays;
 21  
 import java.util.List;
 22  
 
 23  
 import javax.persistence.CascadeType;
 24  
 import javax.persistence.Column;
 25  
 import javax.persistence.Entity;
 26  
 import javax.persistence.FetchType;
 27  
 import javax.persistence.GeneratedValue;
 28  
 import javax.persistence.GenerationType;
 29  
 import javax.persistence.Id;
 30  
 import javax.persistence.OneToMany;
 31  
 import javax.persistence.Table;
 32  
 import javax.persistence.Version;
 33  
 
 34  
 /**
 35  
  * Defines a home screen with a collection of tools
 36  
  * @author Kuali Mobility Team (moblitiy.collab@kuali.org)
 37  
  */
 38  
 @Entity
 39  
 @Table(name="KME_HM_SCRN_T")
 40  
 public class HomeScreen implements Serializable {
 41  
 
 42  
         private static final long serialVersionUID = 4947101996672004361L;
 43  
 
 44  
         @Id
 45  
         @GeneratedValue(strategy = GenerationType.TABLE)
 46  
     @Column(name="ID")
 47  
     private Long homeScreenId;
 48  
         
 49  
         @Column(name="ALIAS")
 50  
         private String alias;
 51  
 
 52  
         @Column(name="TTL")
 53  
         private String title;
 54  
 
 55  
     @OneToMany(fetch = FetchType.EAGER, cascade = CascadeType.ALL, mappedBy="homeScreen")
 56  
     private List<HomeTool> homeTools;
 57  
         
 58  
         @Version
 59  
     @Column(name="VER_NBR")
 60  
     private Long versionNumber;        
 61  
         
 62  0
         public HomeScreen() {
 63  0
                 homeTools = new ArrayList<HomeTool>();
 64  0
         }
 65  
 
 66  
         /**
 67  
          * @return the HomeTool objects associated with this HomeScreen
 68  
          */
 69  
         public List<HomeTool> getHomeTools() {
 70  0
                 return homeTools;
 71  
         }
 72  
 
 73  
         /**
 74  
          * set the HomeTool objects
 75  
          * @param homeTools
 76  
          */
 77  
         public void setHomeTools(List<HomeTool> homeTools) {
 78  0
                 this.homeTools = homeTools;
 79  0
         }
 80  
         
 81  
         /**
 82  
          * set the HomeTools collection with an array
 83  
          * @param homeTools
 84  
          */
 85  
         public void setHomeTools(HomeTool[] homeTools) {
 86  0
                 this.homeTools = Arrays.asList(homeTools);
 87  0
         }
 88  
 
 89  
         public Long getHomeScreenId() {
 90  0
                 return homeScreenId;
 91  
         }
 92  
 
 93  
         public void setHomeScreenId(Long homeScreenId) {
 94  0
                 this.homeScreenId = homeScreenId;
 95  0
         }
 96  
 
 97  
         public String getAlias() {
 98  0
                 return alias;
 99  
         }
 100  
 
 101  
         public void setAlias(String alias) {
 102  0
                 this.alias = alias;
 103  0
         }
 104  
 
 105  
         public String getTitle() {
 106  0
                 return title;
 107  
         }
 108  
 
 109  
         public void setTitle(String title) {
 110  0
                 this.title = title;
 111  0
         }
 112  
 
 113  
         public Long getVersionNumber() {
 114  0
                 return versionNumber;
 115  
         }
 116  
 
 117  
         public void setVersionNumber(Long versionNumber) {
 118  0
                 this.versionNumber = versionNumber;
 119  0
         }
 120  
 
 121  
 }