Package net.baguajie.domains

Examples of net.baguajie.domains.UserPreference


  public boolean preHandle(HttpServletRequest request,
      HttpServletResponse response, Object handler) throws Exception {
    HttpSession session = request.getSession(true);
    User signInUser = sessionUtil.getSignInUser(session);
    UserPreference up = sessionUtil.getSignInUserPrefer(session);
    if (signInUser != null && signInUser.getStatus() == UserStatus.INVALID) {
      session.removeAttribute(ApplicationConstants.SESSION_SIGNIN_USER);
    } else {
      if (signInUser != null && up == null) {
        up = userPreferenceRepository.getByUser(signInUser);
View Full Code Here


          .from(result));
    }else{
      if (existed != null) {
        session.setAttribute(ApplicationConstants.SESSION_SIGNIN_USER,
            existed);
        UserPreference up = userPreferenceRepository.getByUser(existed);
        if (up != null) {
          sessionUtil.setSignInUserPrefer(up, session);
        }
      }
      return new ValidationEngineError[]{};
View Full Code Here

    }

    if (existed != null) {
      session.setAttribute(ApplicationConstants.SESSION_SIGNIN_USER,
          existed);
      UserPreference up = userPreferenceRepository.getByUser(existed);
      if (up != null) {
        sessionUtil.setSignInUserPrefer(up, session);
      }
    }
View Full Code Here

        Arrays.asList(ApplicationConfig.defaultCategories));
    }
  }
 
  public UserPreference getDefaultPrefer(){
    UserPreference up = new UserPreference();
    up.setId(ApplicationConfig.defaultPreferenceId);
    List<String> categories = new ArrayList<String>();
    Collections.addAll(categories, ApplicationConfig.defaultCategories);
    up.setCategories(categories);
    return up;
  }
View Full Code Here

TOP

Related Classes of net.baguajie.domains.UserPreference

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.