Dictionary optimisation: improve performance when getting sub classes and property defs

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@6825 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Jan Vonka
2007-09-19 11:47:29 +00:00
parent 2127d7c56a
commit 7547b695ac
7 changed files with 189 additions and 56 deletions

View File

@@ -970,6 +970,8 @@ public class DbNodeServiceImpl extends AbstractNodeServiceImpl
private Map<QName, Serializable> getPropertiesImpl(Node node) throws InvalidNodeRefException
{
Map<QName,PropertyDefinition> propDefs = dictionaryService.getPropertyDefs(node.getTypeQName());
Map<QName, PropertyValue> nodeProperties = node.getProperties();
Map<QName, Serializable> ret = new HashMap<QName, Serializable>(nodeProperties.size());
// copy values
@@ -978,7 +980,7 @@ public class DbNodeServiceImpl extends AbstractNodeServiceImpl
QName propertyQName = entry.getKey();
PropertyValue propertyValue = entry.getValue();
// get the property definition
PropertyDefinition propertyDef = dictionaryService.getProperty(propertyQName);
PropertyDefinition propertyDef = propDefs.get(propertyQName);
if ((propertyDef != null) && (propertyDef.getDataType().getName().equals(DataTypeDefinition.NODE_REF)) &&
(propertyValue != null) && (propertyValue.getStringValue() != null))