()
- {
- public Long execute() throws Throwable
- {
- // Change isolation level
- try
- {
- controlDAO.setTransactionIsolationLevel(1);
- }
- catch (IllegalStateException e)
- {
- // Can't be set. We're done here.
- toDo = 0L;
- running = false;
- return 0L;
- }
-
- if (toDo == null)
- {
- toDo = patchDAO.getDmNodeCount();
- max = patchDAO.getMaxAclId();
- }
- return patchDAO.getDmNodeCountWithNewACLs(ProgressWatcher.this.max);
- }
- };
- try
- {
- Long done = txHelper.doInTransaction(callback, true, true);
- reportProgress(this.toDo, done);
- }
- catch (Throwable e)
- {
- logger.error("Failure in ProgressWatcher", e);
- this.running = false;
- }
- }
-
- try
- {
- Thread.sleep(60000);
- }
- catch (InterruptedException e)
- {
- this.running = false;
- }
- }
- }
- }
-}
diff --git a/source/java/org/alfresco/repo/domain/patch/AbstractPatchDAOImpl.java b/source/java/org/alfresco/repo/domain/patch/AbstractPatchDAOImpl.java
index ebf68cf5a9..31c771e125 100644
--- a/source/java/org/alfresco/repo/domain/patch/AbstractPatchDAOImpl.java
+++ b/source/java/org/alfresco/repo/domain/patch/AbstractPatchDAOImpl.java
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2005-2010 Alfresco Software Limited.
+ * Copyright (C) 2005-2014 Alfresco Software Limited.
*
* This file is part of Alfresco
*
@@ -18,168 +18,20 @@
*/
package org.alfresco.repo.domain.patch;
-import java.util.List;
-import java.util.Map;
-
import org.alfresco.ibatis.BatchingDAO;
-import org.alfresco.repo.domain.contentdata.ContentDataDAO;
-import org.alfresco.service.cmr.repository.ContentData;
-import org.apache.ibatis.session.ResultHandler;
/**
* Abstract implementation for Patch DAO.
*
* This provides additional queries used by patches.
*
+ * @author Derek Hulley
* @author janv
* @since 3.2
*/
public abstract class AbstractPatchDAOImpl implements PatchDAO, BatchingDAO
{
- private ContentDataDAO contentDataDAO;
-
protected AbstractPatchDAOImpl()
{
}
-
- /**
- * Set the DAO that supplies {@link ContentData} IDs
- */
- public void setContentDataDAO(ContentDataDAO contentDataDAO)
- {
- this.contentDataDAO = contentDataDAO;
- }
-
- @Override
- public long getMaxAclId()
- {
- return getMaxAclEntityId();
- }
-
- @Override
- public long getDmNodeCount()
- {
- return getDmNodeEntitiesCount();
- }
-
- @Override
- public long getDmNodeCountWithNewACLs(Long above)
- {
- return getDmNodeEntitiesCountWithNewACLs(above);
- }
-
- /**
- * {@inheritDoc}
- *
- * @see #getAdmOldContentProperties(Long, Long)
- */
- @Override
- public void updateAdmV31ContentProperties(Long minNodeId, Long maxNodeId)
- {
- List