mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-24 17:32:48 +00:00
Moved dangerous helper methods out of AVMService.
Reworked handling of path lookup failures to not throw exceptions internally, to improve performance of certain layered directory operations. Unfortunately there remains at least one scenario, handling of bulk loads, and promotions of deeply nested directories in layered contexts, in which performance is considerably less than ideal. Made AVMService.createBranch() and AVMSyncService.update() perform implicit snapshots of source tree's stores before proceeding. git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/BRANCHES/WCM-DEV2/root@3812 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -141,4 +141,17 @@ class VersionRootDAOHibernate extends HibernateDaoSupport implements
|
||||
"(select max(v.versionID) from VersionRootImpl v)");
|
||||
return (VersionRoot)query.uniqueResult();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the highest numbered id from all the versions in a store.
|
||||
* @param store The store.
|
||||
* @return The highest numbered id.
|
||||
*/
|
||||
public Integer getMaxVersionID(AVMStore store)
|
||||
{
|
||||
Query query = getSession().createQuery("select max(vr.versionID) from VersionRootImpl vr " +
|
||||
"where vr.avmStore = :store");
|
||||
query.setEntity("store", store);
|
||||
return (Integer)query.uniqueResult();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user