Package com.vst.model

Examples of com.vst.model.User


          if (u.getId().equals(id)){
            return u;
          }
        }

        User user = (User) getObject(userId);

        if (user == null) {
            log.warn("uh oh, user '" + userId + "' not found...");
            throw new ObjectRetrievalFailureException(User.class, userId);
        }
View Full Code Here


    /**
    * @see org.acegisecurity.userdetails.UserDetailsService#loadUserByUsername(java.lang.String)
    */
    public UserDetails loadUserByUsername(String username) throws UsernameNotFoundException {
      User u = null;
      u = userCache.get(username);
      if (u != null) {
        return u;
      }

        List users = getHibernateTemplate().find("from User where username=?", username);
        if (users == null || users.isEmpty()) {
            throw new UsernameNotFoundException("user '" + username + "' not found...");
        } else {
          u = (User) users.get(0);
          userCache.put(u.getUsername(), u);
            return u;
        }
    }
View Full Code Here

  public void refreshUsersCache() {
    userCache.clear();
    List<?> users = getObjects();
    for (Object o  : users){
      User u = (User) o;
      userCache.put(u.getUsername(), u);
    }

  }
View Full Code Here

TOP

Related Classes of com.vst.model.User

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.