Merged DEV/SWIFT to HEAD

25490: ALF-5260 - MyBatis: AVM (-> MySQL)
          - includes SerializableTypeHandler
          - also, for consistency, remove SqlSessionDaoSupport from Activtities (r25466)
          - TODO: test EliminateDuplicates patch
          - TODO: inserts for non-MySQL dbs
   25504: ALF-5260 - MyBatis: part III
          - AppliedPatch, Content/MimeType/Encoding, Locale, Locks, QName, Usage
          - also minor updates to AVM & Activities (for consistency)
   25517: ALF-5260 - MyBatis: part IV
          - DAOs - Patch, Permissions/ACLs, PropVal, SOLR
          - NOTE: includes fixup for SOLRDAOTest - also return nodeRef
          - TODO: batching (for ContentUrl patch)
   25541: ALF-5260 - MyBatis: add missing file (r25517)
   25556: ALF-5260 - MyBatis: V - PostgreSQL support (for migrated DAOs - does not yet include Audit + Node)
   25576: ALF-5260 - MyBatis: VI - Audit & Control DAOs (MySQL + PostgreSQL)
          - also replaced SqlExecutor.NO_MAXIMUM_RESULTS with RowBounds.NO_ROW_LIMIT
   25589: ALF-5260 - MyBatis: part VII - Node DAO (MySQL + PostgreSQL)
   25612: ALF-5260 - MyBatis: part VIII - Oracle / DB2 / SQL Server
          - sanity checked only (bootstrap -> RepositoryStartupTest, DomainTestSuite, ModelTestSuite)
          - also remove remaining references to iBatis (and jar)
Note:
 - Currently LockDAOTest is failing on an update
 - Fixed up DAo code changes from V3.4 - expect some to have been missed


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@28004 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Derek Hulley
2011-05-24 05:57:44 +00:00
parent e92b931ee9
commit 682d24d191
76 changed files with 2789 additions and 2758 deletions

View File

@@ -28,10 +28,10 @@ import org.alfresco.service.cmr.attributes.AttributeService;
import org.alfresco.wcm.util.WCMUtil;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.ibatis.session.ResultContext;
import org.apache.ibatis.session.ResultHandler;
import org.springframework.extensions.surf.util.I18NUtil;
import com.ibatis.sqlmap.client.event.RowHandler;
/**
* Migrate AVM lock attributes (from 'alf_*attribute*' to 'alf_prop_*')
*
@@ -62,7 +62,7 @@ public class MigrateAttrAVMLocksPatch extends AbstractPatch
{
long startTime = System.currentTimeMillis();
AVMLockRowHandler handler = new AVMLockRowHandler();
AVMLockResultHandler handler = new AVMLockResultHandler();
patchDAO.migrateOldAttrAVMLocks(handler);
if (handler.total > 0)
@@ -79,17 +79,17 @@ public class MigrateAttrAVMLocksPatch extends AbstractPatch
/**
* Row handler for migrating AVM Locks
*/
private class AVMLockRowHandler implements RowHandler
private class AVMLockResultHandler implements ResultHandler
{
private int total = 0;
private AVMLockRowHandler()
private AVMLockResultHandler()
{
}
@SuppressWarnings("unchecked")
public void handleRow(Object valueObject)
public void handleResult(ResultContext context)
{
Map<String, Object> result = (Map<String, Object>)valueObject;
Map<String, Object> result = (Map<String, Object>)context.getResultObject();
String wpStoreId = (String)result.get("wpStoreId");
String path = (String)result.get("relPath");

View File

@@ -26,10 +26,10 @@ import org.alfresco.repo.security.sync.ChainingUserRegistrySynchronizer;
import org.alfresco.service.cmr.attributes.AttributeService;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.ibatis.session.ResultContext;
import org.apache.ibatis.session.ResultHandler;
import org.springframework.extensions.surf.util.I18NUtil;
import com.ibatis.sqlmap.client.event.RowHandler;
/**
* Migrate Chaining User Registry Synchronizer attributes (from 'alf_*attribute*' to 'alf_prop_*')
*
@@ -60,7 +60,7 @@ public class MigrateAttrChainingURSPatch extends AbstractPatch
{
long startTime = System.currentTimeMillis();
ChainingURSRowHandler handler = new ChainingURSRowHandler();
ChainingURSResultHandler handler = new ChainingURSResultHandler();
patchDAO.migrateOldAttrChainingURS(handler);
if (handler.total > 0)
@@ -74,17 +74,17 @@ public class MigrateAttrChainingURSPatch extends AbstractPatch
return msg;
}
private class ChainingURSRowHandler implements RowHandler
private class ChainingURSResultHandler implements ResultHandler
{
private int total = 0;
private ChainingURSRowHandler()
private ChainingURSResultHandler()
{
}
@SuppressWarnings("unchecked")
public void handleRow(Object valueObject)
public void handleResult(ResultContext context)
{
Map<String, Object> result = (Map<String, Object>)valueObject;
Map<String, Object> result = (Map<String, Object>)context.getResultObject();
String label = (String)result.get("label");
String zoneId = (String)result.get("zoneId");

View File

@@ -27,10 +27,10 @@ import org.alfresco.repo.domain.patch.PatchDAO;
import org.alfresco.service.cmr.attributes.AttributeService;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.ibatis.session.ResultContext;
import org.apache.ibatis.session.ResultHandler;
import org.springframework.extensions.surf.util.I18NUtil;
import com.ibatis.sqlmap.client.event.RowHandler;
/**
* Migrate Property-Backed Bean attributes (from 'alf_*attribute*' to 'alf_prop_*')
*
@@ -63,7 +63,7 @@ public class MigrateAttrPropBackedBeanPatch extends AbstractPatch
{
long startTime = System.currentTimeMillis();
PBBRowHandler handler = new PBBRowHandler();
PBBesultHandler handler = new PBBesultHandler();
patchDAO.migrateOldAttrPropertyBackedBeans(handler);
handler.setComponent(handler.currentComponentName, handler.attributeMap); // set last component attribute (if any)
@@ -78,7 +78,7 @@ public class MigrateAttrPropBackedBeanPatch extends AbstractPatch
return msg;
}
private class PBBRowHandler implements RowHandler
private class PBBesultHandler implements ResultHandler
{
private int total = 0;
private int totalProps = 0;
@@ -86,13 +86,13 @@ public class MigrateAttrPropBackedBeanPatch extends AbstractPatch
private Map<String, String> attributeMap = new HashMap<String, String>(10);
private String currentComponentName = "";
private PBBRowHandler()
private PBBesultHandler()
{
}
@SuppressWarnings("unchecked")
public void handleRow(Object valueObject)
public void handleResult(ResultContext context)
{
Map<String, Object> result = (Map<String, Object>)valueObject;
Map<String, Object> result = (Map<String, Object>)context.getResultObject();
String componentName = (String)result.get("componentName");
String propName = (String)result.get("propName");

View File

@@ -28,10 +28,10 @@ import org.alfresco.repo.tenant.MultiTAdminServiceImpl;
import org.alfresco.service.cmr.attributes.AttributeService;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.ibatis.session.ResultContext;
import org.apache.ibatis.session.ResultHandler;
import org.springframework.extensions.surf.util.I18NUtil;
import com.ibatis.sqlmap.client.event.RowHandler;
/**
* Migrate Tenant attributes (from 'alf_*attribute*' to 'alf_prop_*')
*
@@ -62,7 +62,7 @@ public class MigrateAttrTenantsPatch extends AbstractPatch
{
long startTime = System.currentTimeMillis();
TenantRowHandler handler = new TenantRowHandler();
TenantResultHandler handler = new TenantResultHandler();
patchDAO.migrateOldAttrTenants(handler);
if (handler.total > 0)
@@ -79,17 +79,17 @@ public class MigrateAttrTenantsPatch extends AbstractPatch
/**
* Row handler for migrating tenants
*/
private class TenantRowHandler implements RowHandler
private class TenantResultHandler implements ResultHandler
{
private int total = 0;
private TenantRowHandler()
private TenantResultHandler()
{
}
@SuppressWarnings("unchecked")
public void handleRow(Object valueObject)
public void handleResult(ResultContext context)
{
Map<String, Object> result = (Map<String, Object>)valueObject;
Map<String, Object> result = (Map<String, Object>)context.getResultObject();
String tenantDomain = (String)result.get("tenantDomain");
Boolean isEnabled = (Boolean)result.get("isEnabled");