Clover Coverage Report - itracker
Coverage timestamp: Tue May 1 2012 16:42:12 CEST
21   154   21   1
0   88   1   21
21     1  
1    
 
 
  UserPreferences       Line # 33 21 21 0% 0.0
 
No Tests
 
1    /*
2    * This software was designed and created by Jason Carroll.
3    * Copyright (c) 2002, 2003, 2004 Jason Carroll.
4    * The author can be reached at jcarroll@cowsultants.com
5    * ITracker website: http://www.cowsultants.com
6    * ITracker forums: http://www.cowsultants.com/phpBB/index.php
7    *
8    * This program is free software; you can redistribute it and/or modify
9    * it only under the terms of the GNU General Public License as published by
10    * the Free Software Foundation; either version 2 of the License, or
11    * (at your option) any later version.
12    *
13    * This program is distributed in the hope that it will be useful,
14    * but WITHOUT ANY WARRANTY; without even the implied warranty of
15    * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16    * GNU General Public License for more details.
17    */
18   
19    package org.itracker.model;
20   
21    import org.apache.commons.lang.builder.ToStringBuilder;
22    import org.itracker.core.resources.ITrackerResources;
23   
24    /**
25    * The system configuration of a User.
26    *
27    * <p>
28    * User - UserPreferences is a 1-1 relationship.
29    * </p>
30    *
31    * @author ready
32    */
 
33    public class UserPreferences extends AbstractEntity {
34   
35    /**
36    *
37    */
38    private static final long serialVersionUID = 1L;
39   
40    /** The User to whom these preferences belong. */
41    private User user;
42   
43    private boolean saveLogin = false;
44   
45    private String userLocale = ITrackerResources.getDefaultLocale();
46   
47    private int numItemsOnIndex = 0; // all
48   
49    private int numItemsOnIssueList = 0; // all
50   
51    private boolean showClosedOnIssueList = false;
52   
53    private String sortColumnOnIssueList = "id";
54   
55    private int hiddenIndexSections = 0;
56   
57    private boolean rememberLastSearch = false;
58   
59    private boolean useTextActions = false;
60   
 
61  0 toggle public int getHiddenIndexSections() {
62  0 return hiddenIndexSections;
63    }
64   
 
65  0 toggle public void setHiddenIndexSections(int hiddenIndexSections) {
66  0 this.hiddenIndexSections = hiddenIndexSections;
67    }
68   
 
69  0 toggle public int getNumItemsOnIndex() {
70  0 return numItemsOnIndex;
71    }
72   
 
73  0 toggle public void setNumItemsOnIndex(int numItemsOnIndex) {
74  0 this.numItemsOnIndex = numItemsOnIndex;
75    }
76   
 
77  0 toggle public int getNumItemsOnIssueList() {
78  0 return numItemsOnIssueList;
79    }
80   
 
81  0 toggle public void setNumItemsOnIssueList(int numItemsOnIssueList) {
82  0 this.numItemsOnIssueList = numItemsOnIssueList;
83    }
84   
 
85  0 toggle public boolean getRememberLastSearch() {
86  0 return rememberLastSearch;
87    }
88   
 
89  0 toggle public void setRememberLastSearch(boolean rememberLastSearch) {
90  0 this.rememberLastSearch = rememberLastSearch;
91    }
92   
 
93  0 toggle public boolean getSaveLogin() {
94  0 return saveLogin;
95    }
96   
 
97  0 toggle public void setSaveLogin(boolean saveLogin) {
98  0 this.saveLogin = saveLogin;
99    }
100   
 
101  0 toggle public boolean getShowClosedOnIssueList() {
102  0 return showClosedOnIssueList;
103    }
104   
 
105  0 toggle public void setShowClosedOnIssueList(boolean showClosedOnIssueList) {
106  0 this.showClosedOnIssueList = showClosedOnIssueList;
107    }
108   
 
109  0 toggle public String getSortColumnOnIssueList() {
110  0 return sortColumnOnIssueList;
111    }
112   
 
113  0 toggle public void setSortColumnOnIssueList(String sortColumnOnIssueList) {
114  0 this.sortColumnOnIssueList = sortColumnOnIssueList;
115    }
116   
 
117  0 toggle public User getUser() {
118  0 return user;
119    }
120   
 
121  0 toggle public void setUser(User user) {
122  0 this.user = user;
123    }
124   
 
125  0 toggle public String getUserLocale() {
126  0 return userLocale;
127    }
128   
 
129  0 toggle public void setUserLocale(String userLocale) {
130  0 this.userLocale = userLocale;
131    }
132   
 
133  0 toggle public boolean getUseTextActions() {
134  0 return useTextActions;
135    }
136   
 
137  0 toggle public void setUseTextActions(boolean useTextActions) {
138  0 this.useTextActions = useTextActions;
139    }
140   
 
141  0 toggle @Override
142    public String toString() {
143  0 return new ToStringBuilder(this).append("id", getId()).append("user", getUser())
144    .append("userLocale", getUserLocale()).append("useTextActions",
145    getUseTextActions()).append("saveLogin", getSaveLogin()).append(
146    "rememberLastSearch", getRememberLastSearch()).append(
147    "hiddenIndexSections", getHiddenIndexSections()).append(
148    "numItemsOnIndex", getNumItemsOnIndex()).append(
149    "numItemsOnIssueList", getNumItemsOnIssueList()).append(
150    "showClosedOnIssueList", getShowClosedOnIssueList())
151    .toString();
152    }
153   
154    }