MT - fix node service so that policies are triggered with base refs

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@8312 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Jan Vonka
2008-02-18 16:14:05 +00:00
parent 3d1d97523e
commit 2237d2f748
9 changed files with 41 additions and 79 deletions

View File

@@ -450,7 +450,7 @@ public class HibernateNodeDaoServiceImpl extends HibernateDaoSupport implements
public Store getStore(String protocol, String identifier)
{
StoreKey storeKey = new StoreKey(protocol, identifier);
StoreKey storeKey = new StoreKey(protocol, tenantService.getName(identifier));
Store store = (Store) getHibernateTemplate().get(StoreImpl.class, storeKey);
// done
return store;
@@ -461,7 +461,7 @@ public class HibernateNodeDaoServiceImpl extends HibernateDaoSupport implements
*/
public NodeStatus getNodeStatus(NodeRef nodeRef, boolean update)
{
NodeKey nodeKey = new NodeKey(nodeRef);
NodeKey nodeKey = new NodeKey(tenantService.getName(nodeRef));
NodeStatus status = null;
try
{
@@ -495,7 +495,7 @@ public class HibernateNodeDaoServiceImpl extends HibernateDaoSupport implements
public void recordChangeId(NodeRef nodeRef)
{
NodeKey key = new NodeKey(nodeRef);
NodeKey key = new NodeKey(tenantService.getName(nodeRef));
NodeStatus status = (NodeStatus) getHibernateTemplate().get(NodeStatusImpl.class, key);
if (status == null)
@@ -1434,7 +1434,7 @@ public class HibernateNodeDaoServiceImpl extends HibernateDaoSupport implements
{
Query query = session.getNamedQuery(QUERY_GET_NODE_COUNT_FOR_STORE);
query.setString("protocol", storeRef.getProtocol())
.setString("identifier", storeRef.getIdentifier())
.setString("identifier", tenantService.getName(storeRef.getIdentifier()))
.setMaxResults(1)
.setReadOnly(true);
return query.uniqueResult();
@@ -1455,7 +1455,7 @@ public class HibernateNodeDaoServiceImpl extends HibernateDaoSupport implements
{
Query query = session.getNamedQuery(QUERY_NODES_WITH_PROPERTY_STRING_VALUE_FOR_STORE);
query.setString("protocol", storeRef.getProtocol())
.setString("identifier", storeRef.getIdentifier())
.setString("identifier", tenantService.getName(storeRef.getIdentifier()))
.setParameter("propQName", propQName)
.setString("propStringValue", propStringValue)
.setReadOnly(true);