Merged V2.2 to HEAD

11016: Query performance improvements
   11018: Build fixes after .... Query performance improvements
   11043: Updated Lucene config and test fixes
   11047: Fixed test's expected results
   11049: Build fix
   11051: Tighten up on Auditable tests and checks for null


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@11221 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Derek Hulley
2008-10-06 23:06:54 +00:00
parent 17e9f1d7ac
commit ad23a594f5
11 changed files with 777 additions and 1076 deletions

View File

@@ -1020,8 +1020,16 @@ public class HibernateNodeDaoServiceImpl extends HibernateDaoSupport implements
// Handle cm:auditable
if (AuditableProperties.isAuditableProperty(propertyQName))
{
AuditableProperties auditableProperties = node.getAuditableProperties();
return auditableProperties.getAuditableProperty(propertyQName);
// Only bother if the aspect is present
if (hasNodeAspect(node, ContentModel.ASPECT_AUDITABLE))
{
AuditableProperties auditableProperties = node.getAuditableProperties();
return auditableProperties.getAuditableProperty(propertyQName);
}
else
{
return null;
}
}
QNameEntity propertyQNameEntity = qnameDAO.getQNameEntity(propertyQName);
@@ -1051,8 +1059,11 @@ public class HibernateNodeDaoServiceImpl extends HibernateDaoSupport implements
dictionaryService);
// Handle cm:auditable
AuditableProperties auditableProperties = node.getAuditableProperties();
converted.putAll(auditableProperties.getAuditableProperties());
if (hasNodeAspect(node, ContentModel.ASPECT_AUDITABLE))
{
AuditableProperties auditableProperties = node.getAuditableProperties();
converted.putAll(auditableProperties.getAuditableProperties());
}
// Done
return converted;