data.add(new Pair(fieldName, tempStr.append("'").toString()));
}
else if (value.getClass().equals(TypeData.class))
{
// Tricky business involving recursion.
TypeData tc = (TypeData) value;
ITypeInfo info = DataStorageManager.getInfoForType(type);
if (info instanceof TypeMultiValInfo || !info.canSaveInline())
{
// special stuff for Multivals. this will be a key going to a different table.
data.add(new Pair(fieldName + "_" + MULTI_MARKER, tc.getUniqueKey()));
// this will be removed what all the MultiVal ones are collected.
data.add(new Pair(fieldName + "_" + MULTI_MARKER, tc));
for (String name : info.getFieldList())
{
data.addAll(fieldToValues(fieldName + SEPERATOR + name, info.getTypeOfField(name), tc.getFieldValue(name)));
}
}
else
{
for (Entry<String, Object> f : tc.getAllFields())
{
data.addAll(fieldToValues(fieldName + SEPERATOR + f.getKey(), info.getTypeOfField(f.getKey()), f.getValue()));
}
}
}