Make sure that ContentStoreCleaner doesn't clean up in-use

AVM content. Doh!


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/BRANCHES/WCM-DEV2/root@3612 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Britt Park
2006-08-25 14:00:32 +00:00
parent 0606fa3ab6
commit e2c66899cc
7 changed files with 68 additions and 3 deletions

View File

@@ -22,7 +22,7 @@ import java.util.List;
* DAO for AVMNodes interface.
* @author britt
*/
interface AVMNodeDAO
public interface AVMNodeDAO
{
/**
* Save the given node, having never been saved before.
@@ -76,6 +76,12 @@ interface AVMNodeDAO
*/
public List<AVMNode> getOrphans(int batchSize);
/**
* Get all content urls in he AVM Repository.
* @return A List of URL Strings.
*/
public List<String> getContentUrls();
/**
* Inappropriate hack to get Hibernate to play nice.
*/

View File

@@ -129,6 +129,17 @@ class AVMNodeDAOHibernate extends HibernateDaoSupport implements
return (List<AVMNode>)query.list();
}
/**
* Get all content urls in he AVM Repository.
* @return A List of URL Strings.
*/
@SuppressWarnings("unchecked")
public List<String> getContentUrls()
{
Query query = getSession().getNamedQuery("PlainFileNode.GetContentUrls");
return (List<String>)query.list();
}
/**
* Inappropriate hack to get Hibernate to play nice.
*/

View File

@@ -309,4 +309,14 @@
and an.isRoot = false
]]>
</query>
<query name="PlainFileNode.GetContentUrls">
<![CDATA[
select
pfn.contentURL
from
PlainFileNodeImpl pfn
where pfn.contentURL is not null
]]>
</query>
</hibernate-mapping>