docs: private void prepareModel(DescriptorRepository model)
      {
          TreeMap result = new TreeMap();
  
          for (Iterator it = model.getDescriptorTable().values().iterator(); it.hasNext();)
          {
              ClassDescriptor classDesc = (ClassDescriptor)it.next();
  
              if (classDesc.getFullTableName() == null)
              {
                  // not mapped to a database table
                  continue;
              }
  
              String elementName        = getElementName(classDesc);
              Table  mappedTable        = getTableFor(elementName);
              Map    columnsMap         = getColumnsFor(elementName);
              Map    requiredAttributes = getRequiredAttributes(elementName);
              List   classDescs         = getClassDescriptorsMappingTo(elementName);
  
              if (mappedTable == null)
              {
                  mappedTable = _schema.findTable(classDesc.getFullTableName());
                  if (mappedTable == null)
                  {
                      continue;
                  }
                  columnsMap         = new TreeMap();
                  requiredAttributes = new HashMap();
                  classDescs         = new ArrayList();
                  _elementToTable.put(elementName, mappedTable);
                  _elementToClassDescriptors.put(elementName, classDescs);
                  _elementToColumnMap.put(elementName, columnsMap);
                  _elementToRequiredAttributesMap.put(elementName, requiredAttributes);
              }
              classDescs.add(classDesc);
              extractAttributes(classDesc, mappedTable, columnsMap, requiredAttributes);
          }
          extractIndirectionTables(model, _schema);
      }