tog-pegasus/pegasus-2.5.1-obz5073.patch

145 lines
5.8 KiB
Diff

--- pegasus/src/Pegasus/Repository/AssocClassTable.cpp.obz5073 2006-01-30 11:18:20.000000000 -0500
+++ pegasus/src/Pegasus/Repository/AssocClassTable.cpp 2006-06-12 13:13:18.000000000 -0400
@@ -218,10 +218,6 @@
fields.append(toClassName.getString());
fields.append(toPropertyName.getString());
- for (Uint16 x=0; x<fields.size();x++)
- {
- fields[x].toLower();
- }
_PutRecord(os, fields);
@@ -263,10 +259,6 @@
fields.append(toClassName.getString());
fields.append(toPropertyName.getString());
- for (Uint16 x=0; x<fields.size();x++)
- {
- fields[x].toLower();
- }
_PutRecord(os, fields);
@@ -428,11 +420,6 @@
// For each line in the associations table:
while (_GetRecord(is, fields))
{
- // The cache key is always expected to be in lowercase
- // While new association records are added in lowercase,
- // the following line is required for compatibility
- // with old repositories.
- fields[FROM_CLASS_NAME_INDEX].toLower();
cache->addRecord(fields[FROM_CLASS_NAME_INDEX],
fields);
}
@@ -483,7 +470,6 @@
for (Uint16 idx=0; idx < classList.size(); idx++)
{
String fromClassName = classList[idx].getString();
- fromClassName.toLower();
if (cache->getAssocClassEntry(fromClassName, records))
{
for (Uint16 rx=0; rx <records.size(); rx++)
--- pegasus/src/Pegasus/Repository/AssocClassCache.h.obz5073 2006-01-30 11:18:20.000000000 -0500
+++ pegasus/src/Pegasus/Repository/AssocClassCache.h 2006-06-12 13:13:18.000000000 -0400
@@ -63,24 +63,24 @@
/** Retrieve an entry for an association class through direct
* access via the from class name.
*/
- Boolean getAssocClassEntry(const String& lowerCaseFromClassName,
+ Boolean getAssocClassEntry(const String& fromClassName,
Array< Array<String> >& entryList);
/** Add a new entry to the association cache.
*/
- Boolean addRecord(const String& lowerCaseFromClassName,
+ Boolean addRecord(const String& fromClassName,
Array<String> assocClassEntry);
/** Remove an entry from the association cache specified by the given
* association class name.
*/
- Boolean removeEntry(const String& lowerCaseFromClassName);
+ Boolean removeEntry(const String& fromClassName);
/** Remove an association record from the association cache specified by the given
* from class name and association name.
*/
- Boolean removeRecord(const String& lowerCaseFromClassName,
- const String& lowerCaseAssocClassName);
+ Boolean removeRecord(const String& fromClassName,
+ const String& assocClassName);
/** Check if the cache is loaded with objects already.
*/
--- pegasus/src/Pegasus/Repository/AssocClassCache.cpp.obz5073 2006-01-30 11:18:20.000000000 -0500
+++ pegasus/src/Pegasus/Repository/AssocClassCache.cpp 2006-06-12 13:13:18.000000000 -0400
@@ -86,9 +86,12 @@
/** Retrieve the list of entries for a from class through direct
* access via the from class name.
*/
-Boolean AssocClassCache::getAssocClassEntry(const String& lowerCaseFromClassName,
+Boolean AssocClassCache::getAssocClassEntry(const String& fromClassName,
Array< Array<String> >& entryList)
{
+ String lowerCaseFromClassName = fromClassName;
+ lowerCaseFromClassName.toLower();
+
return _assocClassCache->lookup(lowerCaseFromClassName,entryList);
}
@@ -97,10 +100,12 @@
* the new entry is appended to the old entry. Otherwise a new entry
* is added to the cache.
*/
-Boolean AssocClassCache::addRecord(const String& lowerCaseFromClassName,
+Boolean AssocClassCache::addRecord(const String& fromClassName,
Array<String> assocClassRecord)
{
Array< Array<String> > oldAssocClassEntryList;
+ String lowerCaseFromClassName = fromClassName;
+ lowerCaseFromClassName.toLower();
if (_assocClassCache->lookup(lowerCaseFromClassName, oldAssocClassEntryList))
{
@@ -115,18 +120,24 @@
/** Remove an entry from the association cache specified by the given
* from class name.
*/
-Boolean AssocClassCache::removeEntry(const String& lowerCaseFromClassName)
+Boolean AssocClassCache::removeEntry(const String& fromClassName)
{
+ String lowerCaseFromClassName = fromClassName;
+ lowerCaseFromClassName.toLower();
+
return _assocClassCache->remove(lowerCaseFromClassName);
}
/** Remove an association record from the association cache specified by the given
* from class name and association name.
*/
-Boolean AssocClassCache::removeRecord(const String& lowerCaseFromClassName,
- const String& lowerCaseAssocClassName)
+Boolean AssocClassCache::removeRecord(const String& fromClassName,
+ const String& assocClassName)
{
Array< Array<String> > oldAssocClassEntryList;
+ String lowerCaseFromClassName = fromClassName;
+ lowerCaseFromClassName.toLower();
+
if (_assocClassCache->lookup(lowerCaseFromClassName, oldAssocClassEntryList))
{
for (Uint16 idx=0; idx < oldAssocClassEntryList.size(); idx++ )
@@ -134,7 +145,8 @@
// The first entry in each record is the association class
// name. Find the record for the association class and remove
// it from the cache entry.
- if (oldAssocClassEntryList[idx][ASSOC_CLASS_NAME_INDEX] == lowerCaseAssocClassName)
+ if (String::equalNoCase(oldAssocClassEntryList[idx][ASSOC_CLASS_NAME_INDEX],
+ assocClassName))
{
_assocClassCache->remove(lowerCaseFromClassName);
if (oldAssocClassEntryList.size() > 1)