Package org.lexev.bestwisethoughts.client.data

Examples of org.lexev.bestwisethoughts.client.data.ListLong


            @Override
            public ThoughtList doInBackground() throws NotRegisteredException, IOException{
              ThoughtList thoughtList = new ThoughtList();
              if (webServiceREST.isUserRegistered()){
              // get list of favorite thought IDs for current registered user
              ListLong favoriteIDs = webServiceREST.getUserFavoriteIDs();
                // compare cached thoughts with received thought ids
                Set<Long> notFavoriteThoughtsLeft = new HashSet<Long>(cachedFavoriteThought.getMap().keySet());
                List<Long> favoriteThoughtsLeft = new ArrayList<Long>();
                for(Long id : favoriteIDs.getList()){
                  if(!cachedFavoriteThought.getMap().containsKey(id)){
                    favoriteThoughtsLeft.add(id);
                  }
                  notFavoriteThoughtsLeft.remove(id);
                }
View Full Code Here


   *
   * @return user favorite thought ids
   * @throws UniformInterfaceException
   */
  public ListLong getUserFavoriteIDs() throws UniformInterfaceException{
    ListLong favoriteIDs = getWebService()
      .path("user/favorite/thoughtids")
      .accept(MediaType.APPLICATION_XML)
      .get(ListLong.class);
      return favoriteIDs;
  }
View Full Code Here

   */
  public ThoughtList getThoughtsByIDs(List<Long> thoughtIDs) throws UniformInterfaceException{
    ThoughtList fetchedThoughts = getWebService()
      .path("thought/get/byids")
      .type(MediaType.APPLICATION_XML).accept(MediaType.APPLICATION_XML)
      .post(ThoughtList.class, new ListLong(thoughtIDs));
    return fetchedThoughts;
  }
View Full Code Here

TOP

Related Classes of org.lexev.bestwisethoughts.client.data.ListLong

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.