public Resource getFromName(String name) {
        if (Config.LOGD) Log.d(TAG, "getFromName name=" + name);
        PreparedStatement statement = null;
        try {
            statement = mConnection.prepareStatement(SQL_SELECT_FROM_NAME);
            statement.setString(1, name);
            ResultSet resultSet = statement.executeQuery();
            if (!resultSet.next()) return null;
            Resource res = new Resource();
            res.id = resultSet.getLong(1);
            res.name = resultSet.getString(2);
            res._abstract = resultSet.getString(3);
            if (Config.LOGD) Log.d(TAG, "getFromName res=" + res);
            return res;
        } catch (SQLException e) {
            Log.e(TAG, "Could not get resource", e);
        } finally {
            if (statement != null) try {
                statement.close();
            } catch (SQLException e) {
                Log.w(TAG, "isExistingQuote", e);
            }
        }
        return null;
    }