private VOUserDetails get(VOUser user) throws ObjectNotFoundException { if (user.getKey() != 0) { VOUserDetails voUserDetails = byKey.get(Long.valueOf(user.getKey())); if (voUserDetails != null) { return voUserDetails; } } VOUserDetails voUserDetails = byId.get(user.getUserId()); if (voUserDetails != null) { return voUserDetails; } throw new ObjectNotFoundException(); }
@Override public VOUser convert(PlatformUser platformUser) { if (platformUser == null) { return null; } VOUser user = new VOUser(); // Base user data user.setKey(platformUser.getKey()); user.setVersion(platformUser.getVersion()); user.setUserId(platformUser.getUserId()); return user; }