code: public static ClientCredentials loadFromMap(Map<String, Object> map) {
          ClientCredentials creds = new ClientCredentials();
          creds.name = (String) map.get("name");
          creds.id = (String) map.get("_id");
          creds.secret = (String) map.get("secret");
          creds.uri = (String) map.get("uri");
          creds.descr = (String) map.get("descr");
          creds.type = ((Integer) map.get("type")).intValue();
          creds.status = ((Integer) map.get("status")).intValue();
          creds.created = (Long) map.get("created");
          creds.scope = (String) map.get("scope");
          if (map.get("applicationDetails") != null) {
              creds.applicationDetails = JsonUtils.convertStringToMap(map.get("applicationDetails").toString());
          }
          return creds;
      }
docs: Used to create an instance when a record from DB is loaded.
  
  @param map Map that contains the record info
  @return instance of ClientCredentials