code: private void checkPrimaryKey(ClassDescriptorDef classDef, String checkLevel) throws ConstraintException
      {
          if (CHECKLEVEL_NONE.equals(checkLevel))
          {
              return;
          }
  
          if (classDef.getBooleanProperty(PropertyHelper.OJB_PROPERTY_GENERATE_TABLE_INFO, true) &&
              classDef.getPrimaryKeys().isEmpty())
          {
              LogHelper.warn(true,
                             getClass(),
                             "checkPrimaryKey",
                             "The class "+classDef.getName()+" has no primary key");
          }
      }
docs: Checks whether given class descriptor has a primary key.
  
  @param classDef   The class descriptor
  @param checkLevel The current check level (this constraint is only checked in strict)
  @exception ConstraintException If the constraint has been violated