code: public void check(ModelDef modelDef, String checkLevel) throws ConstraintException
      {
          ensureReferencedKeys(modelDef, checkLevel);
          checkReferenceForeignkeys(modelDef, checkLevel);
          checkCollectionForeignkeys(modelDef, checkLevel);
          checkKeyModifications(modelDef, checkLevel);
      }
docs: Checks the given model.
  
  @param modelDef   The model
  @param checkLevel The amount of checks to perform
  @exception ConstraintException If a constraint has been violated