Merged V3.2 to HEAD

19246: ALF-1940 - case-insensitive AVM path lookups fail on a DB that is (configured by default to be) case-sensitive
    19280: AVM - preserve case on child lookup, add unit tests
    19316: AVM - fix rename (change in 'case') & add unit tests (ALF-1725 & ALF-1767)


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@19337 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Jan Vonka
2010-03-17 11:26:46 +00:00
parent 733cd6e02d
commit 0f0d7a2fe0
18 changed files with 680 additions and 180 deletions

View File

@@ -191,6 +191,24 @@ public abstract class AbstractAVMNodeLinksDAOImpl implements AVMNodeLinksDAO
return result;
}
/**
* {@inheritDoc}
*/
public void updateChildEntry(AVMChildEntryEntity childEntryEntity)
{
ParameterCheck.mandatory("childEntryEntity", childEntryEntity);
ParameterCheck.mandatory("childEntryEntity.getParentNodeId()", childEntryEntity.getParentNodeId());
ParameterCheck.mandatory("childEntryEntity.getChildId()", childEntryEntity.getChildId());
ParameterCheck.mandatory("childEntryEntity.getName()", childEntryEntity.getName());
ChildKey key = new ChildKey(childEntryEntity.getParentNodeId(), childEntryEntity.getName());
int updated = avmChildEntryCache.updateValue(key, childEntryEntity);
if (updated < 1)
{
throw new ConcurrencyFailureException("AVMChildEntry for parent/name (" + key.getParentNodeId() + ", " + key.getName() + ") no longer exists");
}
}
/**
* {@inheritDoc}
*/
@@ -344,7 +362,7 @@ public abstract class AbstractAVMNodeLinksDAOImpl implements AVMNodeLinksDAO
public int updateValue(ChildKey key, AVMChildEntryEntity value)
{
throw new UnsupportedOperationException("updateValue(Long, AVMChildEntryEntity");
return updateChildEntryEntity(value);
}
public int deleteByKey(ChildKey key)
@@ -367,6 +385,9 @@ public abstract class AbstractAVMNodeLinksDAOImpl implements AVMNodeLinksDAO
protected abstract AVMChildEntryEntity getChildEntryEntity(AVMChildEntryEntity childEntryEntity);
protected abstract void createChildEntryEntity(AVMChildEntryEntity childEntryEntity);
protected abstract int updateChildEntryEntity(AVMChildEntryEntity childEntryEntity); // specific rename 'case' only
protected abstract int deleteChildEntryEntity(long parentNodeId, String name);
protected abstract int deleteChildEntryEntity(long parentNodeId, long childNodeId);
protected abstract int deleteChildEntryEntities(long parentNodeId);