package edu.brown.hackathon.fifteenminutes;

import com.google.appengine.api.datastore.Entity;

/**
 *  All the info about a famous user that is sent to the client.
 */
public class UserResource {
 
  private long userId;

  public UserResource(long userId) {
    this.userId = userId;
  }
  
  public static long parseUserIdFromEntity(Entity user) {
    return Long.parseLong((String)user.getProperty("user_id"));
  }
}
@@ -352,67 +352,179 @@
     
-return Long.parseLong((Stri
+Object userId = user.getProperty(%22user_id%22);%0A    if (userId instanceof Long) %7B%0A      return (Lo
 ng)
+ 
 user
-.getProperty(%22user_id%22));
+Id;%0A    %7D else %7B%0A      return Long.parseLong((String) userId);%0A    %7D
 %0A  %7D

Deal with numeric or non-numeric user IDs.