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)); } }
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); }