}
@Override
public UserBean getUserAsBean(User user, UserBean bean) {
UserPropertiesV2 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());
List<String> stopIds = _lastSelectedStopService.getLastSelectedStopsForUser(user.getId());
bean.setLastSelectedStopIds(stopIds);
for (Bookmark bookmark : properties.getBookmarks()) {
BookmarkBean bookmarkBean = new BookmarkBean();
bookmarkBean.setId(bookmark.getId());
bookmarkBean.setName(bookmark.getName());
bookmarkBean.setStopIds(bookmark.getStopIds());
bookmarkBean.setRouteFilter(getRouteFilterAsBean(bookmark.getRouteFilter()));
bean.addBookmark(bookmarkBean);
}
bean.setMinApiRequestInterval(properties.getMinApiRequestInterval());
Map<String, Long> readServiceAlerts = properties.getReadSituationIdsWithReadTime();
if( readServiceAlerts == null)
readServiceAlerts = Collections.emptyMap();
bean.setReadServiceAlerts(readServiceAlerts);
return bean;