mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Merged V3.0 to HEAD
11410: Activity Service - iBatis mapping files for MS SQL Server (using AlfrescoSQLServerDialect) Can be Enterprised when dual build is set up 11414: Fix for missing servlet reference in repo web.xml 11415: Activity Service - iBatis mapping files for new Oracle dialects (using AlfrescoOracle10gDialect or AlfrescoOracle9iDialect) Can be Entperprised when dual build is up 11424: Remove conflicting java mail libraries. NOTE: Might affect 'CMIS web service implementation' 11426: Activity Service - use lower-case columns 11428: ETHREEOH-300: Site contributor can not delete his own blog posts 11431: Removed tutorial from Guest home 11432: ETHREEOH-198: SiteService is not MT enabled 11440: Close all ScrollableResults in try{} finally{} 11442: Fix for ETHREEOH-268, ETHREEOH-269, ETHREEOH-431, ETHREEOH-438, ETHREEOH-456, ETHREEOH-468, ETHREEOH-532 11443: Update to JSF client Help URL 11444: Build fix 11447: MT - fix ETHREEOH-530 11448: Fix for ETHREEOH-424: Edit Web Content: dojo.data.fromrfc3339 is not a function 11449: Fix for ETHREEOH-218: DM forms should be disabled git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@12427 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -48,18 +48,31 @@ public class HibernateHelper
|
||||
*/
|
||||
public static int deleteDbAccessControlEntries(Session session, Query query)
|
||||
{
|
||||
ScrollableResults entities = query.scroll(ScrollMode.FORWARD_ONLY);
|
||||
ScrollableResults entities = null;
|
||||
int count = 0;
|
||||
while (entities.next())
|
||||
try
|
||||
{
|
||||
DbAccessControlEntry entry = (DbAccessControlEntry) entities.get(0);
|
||||
entry.delete();
|
||||
if (++count % 50 == 0)
|
||||
entities = query.scroll(ScrollMode.FORWARD_ONLY);
|
||||
|
||||
while (entities.next())
|
||||
{
|
||||
session.flush();
|
||||
session.clear();
|
||||
DbAccessControlEntry entry = (DbAccessControlEntry) entities.get(0);
|
||||
entry.delete();
|
||||
if (++count % 50 == 0)
|
||||
{
|
||||
session.flush();
|
||||
session.clear();
|
||||
}
|
||||
}
|
||||
}
|
||||
finally
|
||||
{
|
||||
if(entities != null)
|
||||
{
|
||||
entities.close();
|
||||
}
|
||||
}
|
||||
|
||||
return count;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user