public BaseClientDetails(ClientDetails prototype) {
   this();
   setAccessTokenValiditySeconds(prototype.getAccessTokenValiditySeconds());
   setRefreshTokenValiditySeconds(prototype.getRefreshTokenValiditySeconds());
   setAuthorities(prototype.getAuthorities());
   setAuthorizedGrantTypes(prototype.getAuthorizedGrantTypes());
   setClientId(prototype.getClientId());
   setClientSecret(prototype.getClientSecret());
   setRegisteredRedirectUri(prototype.getRegisteredRedirectUri());
   setScope(prototype.getScope());
   setResourceIds(prototype.getResourceIds());
 }
 public ClientDetails mapRow(ResultSet rs, int rowNum) throws SQLException {
   BaseClientDetails details =
       new BaseClientDetails(
           rs.getString(1),
           rs.getString(3),
           rs.getString(4),
           rs.getString(5),
           rs.getString(7),
           rs.getString(6));
   details.setClientSecret(rs.getString(2));
   details.setAccessTokenValiditySeconds(rs.getInt(8));
   details.setRefreshTokenValiditySeconds(rs.getInt(9));
   String json = rs.getString(10);
   if (json != null) {
     try {
       @SuppressWarnings("unchecked")
       Map<String, Object> additionalInformation = mapper.readValue(json, Map.class);
       details.setAdditionalInformation(additionalInformation);
     } catch (Exception e) {
       logger.warn("Could not decode JSON for additional information: " + details, e);
     }
   }
   return details;
 }