code: protected void updateSequence() throws RepositoryException
     {
        checkIfOpened();
        try
        {
           ResultSet count = updateNextOrderNumber(localMaxOrderNumber);
           try
           {
              if (!count.next())
              {
                 throw new RepositoryException("Could not update the sequence: "
                    + "the returned value cannot be found");
              }
           }
           finally
           {
              try
              {
                 count.close();
              }
              catch (SQLException e)
              {
                 LOG.error("Can't close the ResultSet: " + e.getMessage());
              }
           }
        }
        catch (SQLException e)
        {
           throw new RepositoryException(e);
        }
     }
docs: Updates the value of the sequence in order to avoid any gap
  @throws RepositoryException if the sequence could not be updated