code: public AssetRef retrieveRef(String name) throws IOException, SQLException {
          String select = "select definition_id, name, ref from ASSET_REF where name = ?";
          try (Connection conn = getDbConnection();
                  PreparedStatement stmt = conn.prepareStatement(select)) {
              stmt.setString(1, name);
              try (ResultSet rs = stmt.executeQuery()) {
                  if (rs.next()) {
                      return new AssetRef(name, rs.getLong("definition_id"), rs.getString("ref"));
                  }
              }
          }
          return null;
      }
docs: Finds an asset ref from the database by asset name.