Package com.jeck.microblogging.persistence.entities

Examples of com.jeck.microblogging.persistence.entities.User


    Oauth oauth = new Oauth();
    try {
      AccessToken at = oauth.getAccessTokenByCode(req.getParameter("code"));
      para.putParameter(ICallBackParameter.ACCESS_TOKEN, at);
      logger.info("Access Token:"+at);
      User user=storeService.find(User.class,at.getAccessToken());
      if (user == null){
        user = new User();
        user.setAccessToken(at.getAccessToken());
        storeService.store(user);
      }else {
        logger.info("user:"+user);
      }
    } catch (WeiboException e) {
View Full Code Here


    super(opts);
  }
 
  public User getOrCreateUser(String accessToken)
    {
        User found = ofy().find(User.class, accessToken);
        if (found == null)
            return new User(accessToken);
        else
            return found;
    }
View Full Code Here

TOP

Related Classes of com.jeck.microblogging.persistence.entities.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.