code: public static DBCleanerTool getRepositoryDBCleaner(Connection jdbcConn, RepositoryEntry rEntry)
        throws DBCleanException
     {
        SecurityHelper.validateSecurityPermission(JCRRuntimePermissions.MANAGE_REPOSITORY_PERMISSION);
  
        WorkspaceEntry wsEntry = rEntry.getWorkspaceEntries().get(0);
  
        boolean multiDb = getMultiDbParameter(wsEntry);
        if (multiDb)
        {
           throw new DBCleanException(
              "It is not possible to create cleaner with common connection for multi database repository configuration");
        }
  
        String dialect = resolveDialect(jdbcConn, wsEntry);
        boolean autoCommit = dialect.startsWith(DialectConstants.DB_DIALECT_SYBASE);
  
        DBCleaningScripts scripts = DBCleaningScriptsFactory.prepareScripts(dialect, rEntry);
  
        return new DBCleanerTool(jdbcConn, autoCommit, scripts.getCleaningScripts(), scripts.getCommittingScripts(),
           scripts.getRollbackingScripts());
     }
docs: Returns database cleaner for repository.
  
  @param jdbcConn
  database connection which need to use
  @param rEntry
  repository configuration
  @return DBCleanerTool
  @throws DBCleanException