Exemple #1
0
 public static void readUserProperties(
     TodorooCursor<UserActivity> joinCursor, User user, User self, boolean isSelf) {
   if (isSelf) {
     user.mergeWith(self.getSetValues());
   } else {
     user.setValue(USER_FIRST_NAME, joinCursor.get(USER_FIRST_NAME));
     user.setValue(USER_LAST_NAME, joinCursor.get(USER_LAST_NAME));
     user.setValue(USER_NAME, joinCursor.get(USER_NAME));
     user.setValue(USER_PICTURE, joinCursor.get(USER_PICTURE));
   }
 }
Exemple #2
0
 private static void readPreferenceToUser(User u, StringProperty prop, String prefKey) {
   String val = Preferences.getStringValue(prefKey);
   if (val == null) val = ""; // $NON-NLS-1$
   u.setValue(prop, val);
 }