Fixed ALF-4512: MLText and NULL storage problems

- Synchronizing the cached values with the low-level DB keys had problems for some use-cases
   - Switching from null ML value in default locale (real null) to null value in a specific locale
   - Switching from d:any empty array to d:any empty array of empty arrays
   - other odd cases
 - Refactored the differencing code to do high-level differences
   - This makes it easier to take care of the switches between properties states
   - Sacrifices on performance when dealing with 100K multivalued properties


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@22059 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Derek Hulley
2010-08-29 20:38:39 +00:00
parent 8651121fce
commit 49e20b142d
4 changed files with 113 additions and 135 deletions

View File

@@ -142,6 +142,10 @@ public class NodePropertyValue implements Cloneable, Serializable
{
return ((ContentDataId)value).getId();
}
else if (value instanceof ContentDataWithId)
{
return ((ContentDataWithId)value).getId();
}
else
{
return DefaultTypeConverter.INSTANCE.convert(Long.class, value);
@@ -592,10 +596,6 @@ public class NodePropertyValue implements Cloneable, Serializable
{
return ValueType.DATE;
}
else if (value instanceof ContentData)
{
return ValueType.CONTENT;
}
else if (value instanceof NodeRef)
{
return ValueType.NODEREF;
@@ -632,6 +632,14 @@ public class NodePropertyValue implements Cloneable, Serializable
{
return ValueType.CONTENT_DATA_ID;
}
else if (value instanceof ContentDataWithId)
{
return ValueType.CONTENT_DATA_ID;
}
else if (value instanceof ContentData)
{
return ValueType.CONTENT;
}
else
{
// type is not recognised as belonging to any particular slot