docs: protected CmsResourceState internalReadResourceState(CmsDbContext dbc, CmsUUID projectId, CmsResource resource)
      throws CmsDbSqlException {
  
          CmsResourceState state = CmsResource.STATE_KEEP;
  
          Connection conn = null;
          PreparedStatement stmt = null;
          ResultSet res = null;
          try {
              conn = m_sqlManager.getConnection(dbc);
              stmt = m_sqlManager.getPreparedStatement(conn, projectId, "C_READ_RESOURCE_STATE");
              stmt.setString(1, resource.getResourceId().toString());
              res = stmt.executeQuery();
              if (res.next()) {
                  state = CmsResourceState.valueOf(res.getInt(m_sqlManager.readQuery("C_RESOURCES_STATE")));
                  while (res.next()) {
                      // do nothing only move through all rows because of mssql odbc driver
                  }
              }
          } catch (SQLException e) {
              throw new CmsDbSqlException(
                  Messages.get().container(Messages.ERR_GENERIC_SQL_1, CmsDbSqlException.getErrorQuery(stmt)),
                  e);
          } finally {
              m_sqlManager.closeAll(dbc, conn, stmt, res);
          }
          return state;
      }