docs: private void addTableFor(ClassDescriptorDef classDef)
      {
          String                  name     = classDef.getProperty(PropertyHelper.OJB_PROPERTY_TABLE);
          TableDef                tableDef = getTable(name);
          FieldDescriptorDef      fieldDef;
          ReferenceDescriptorDef  refDef;
          CollectionDescriptorDef collDef;
          ColumnDef               columnDef;
          IndexDef                indexDef;
  
          if (tableDef == null)
          {
              tableDef = new TableDef(name);
              addTable(tableDef);
          }
          if (classDef.hasProperty(PropertyHelper.OJB_PROPERTY_DOCUMENTATION))
          {
              tableDef.setProperty(PropertyHelper.OJB_PROPERTY_DOCUMENTATION,
                                   classDef.getProperty(PropertyHelper.OJB_PROPERTY_DOCUMENTATION));
          }
          if (classDef.hasProperty(PropertyHelper.OJB_PROPERTY_TABLE_DOCUMENTATION))
          {
              tableDef.setProperty(PropertyHelper.OJB_PROPERTY_TABLE_DOCUMENTATION,
                                   classDef.getProperty(PropertyHelper.OJB_PROPERTY_TABLE_DOCUMENTATION));
          }
          for (Iterator fieldIt = classDef.getFields(); fieldIt.hasNext();)
          {
              fieldDef = (FieldDescriptorDef)fieldIt.next();
              if (fieldDef.getBooleanProperty(PropertyHelper.OJB_PROPERTY_IGNORE, false) ||
                  fieldDef.getBooleanProperty(PropertyHelper.OJB_PROPERTY_VIRTUAL_FIELD, false))
              {
                  continue;
              }
              columnDef = addColumnFor(fieldDef, tableDef);
              if (fieldDef.getBooleanProperty(PropertyHelper.OJB_PROPERTY_INDEXED, false))
              {
                  // add the field to the default index
                  indexDef = tableDef.getIndex(null);
                  if (indexDef == null)
                  {
                      indexDef = new IndexDef(null, false);
                      tableDef.addIndex(indexDef);
                  }
                  indexDef.addColumn(columnDef.getName());
              }
          }
          for (Iterator refIt = classDef.getReferences(); refIt.hasNext();)
          {
              refDef = (ReferenceDescriptorDef)refIt.next();
              if (!refDef.getBooleanProperty(PropertyHelper.OJB_PROPERTY_IGNORE, false))
              {
                  addForeignkeys(refDef, tableDef);
              }
          }
          for (Iterator collIt = classDef.getCollections(); collIt.hasNext();)
          {
              collDef = (CollectionDescriptorDef)collIt.next();
              if (!collDef.getBooleanProperty(PropertyHelper.OJB_PROPERTY_IGNORE, false))
              {
                  if (collDef.hasProperty(PropertyHelper.OJB_PROPERTY_INDIRECTION_TABLE))
                  {
                      addIndirectionTable(collDef);
                  }
                  else
                  {
                      addForeignkeys(collDef, tableDef);
                  }
              }
          }
          for (Iterator indexIt = classDef.getIndexDescriptors(); indexIt.hasNext();)
          {
              addIndex((IndexDescriptorDef)indexIt.next(), tableDef);
          }
      }