}
@Override
public UserBean getUserAsBean(User user, UserBean bean) {
UserPropertiesV1 properties = getProperties(user);
bean.setRememberPreferencesEnabled(properties.isRememberPreferencesEnabled());
bean.setHasDefaultLocation(properties.hasDefaultLocationLat()
&& properties.hasDefaultLocationLon());
bean.setDefaultLocationName(properties.getDefaultLocationName());
bean.setDefaultLocationLat(properties.getDefaultLocationLat());
bean.setDefaultLocationLon(properties.getDefaultLocationLon());
if (properties.getLastSelectedStopId() != null)
bean.setLastSelectedStopIds(Arrays.asList(properties.getLastSelectedStopId()));
int bookmarkIndex = 0;
for (String stopId : properties.getBookmarkedStopIds()) {
BookmarkBean bookmark = new BookmarkBean();
bookmark.setId(bookmarkIndex++);
bookmark.setStopIds(Arrays.asList(stopId));
bean.addBookmark(bookmark);
}