code: public static DBCleanerTool getWorkspaceDBCleaner(Connection jdbcConn, WorkspaceEntry wsEntry) throws DBCleanException
     {
        SecurityHelper.validateSecurityPermission(JCRRuntimePermissions.MANAGE_REPOSITORY_PERMISSION);
  
        String dialect = resolveDialect(jdbcConn, wsEntry);
        boolean autoCommit = dialect.startsWith(DialectConstants.DB_DIALECT_SYBASE);
        
        DBCleaningScripts scripts = DBCleaningScriptsFactory.prepareScripts(dialect, wsEntry);
  
        return new DBCleanerTool(jdbcConn, autoCommit, scripts.getCleaningScripts(), scripts.getCommittingScripts(),
           scripts.getRollbackingScripts());
     }
docs: Returns database cleaner for workspace.
  
  @param jdbcConn
  database connection which need to use
  @param wsEntry
  workspace configuration
  @return DBCleanerTool
  @throws DBCleanException