View Javadoc
1   package org.itracker.persistence.dao;
2   
3   import org.itracker.model.User;
4   import org.itracker.model.UserPreferences;
5   
6   /**
7    *
8    */
9   public class UserPreferencesDAOImpl extends BaseHibernateDAOImpl<UserPreferences>
10          implements UserPreferencesDAO {
11  
12      private UserDAO userDAO;
13  
14      public UserPreferences findByUserId(Integer userId) {
15  
16          User user = userDAO.findByPrimaryKey(userId);
17  
18          return user.getPreferences();
19  
20      }
21  
22      public UserDAO getUserDAO() {
23          return userDAO;
24      }
25  
26      public void setUserDAO(UserDAO userDAO) {
27          this.userDAO = userDAO;
28      }
29  
30  }