docs: @ShellMethod(key = "generate-ddl", value = "Generate database DDL scripts")
      public void generate(
          @ShellOption(value = {"file"},
              help = "DDL file to contain to generated script",
              defaultValue = "/etc/cas/config/cas-db-schema.sql") final String file,
          @ShellOption(value = {"dialect"},
              help = "Database dialect class",
              defaultValue = "HSQL") final String dialect,
          @ShellOption(value = {"url"},
              help = "JDBC database connection URL",
              defaultValue = "jdbc:hsqldb:mem:cas") final String jdbcUrl,
          @ShellOption(value = {"delimiter"},
              help = "Delimiter to use for separation of statements when generating SQL",
              defaultValue = ";") final String delimiter,
          @ShellOption(value = {"pretty"},
              help = "Format DDL scripts and pretty-print the output",
              defaultValue = "true") final boolean pretty,
          @ShellOption(value = {"dropSchema"},
              help = "Generate DROP SQL statements in the DDL",
              defaultValue = "true") final boolean dropSchema,
          @ShellOption(value = {"createSchema"},
              help = "Generate DROP SQL statements in the DDL",
              defaultValue = "true") final boolean createSchema,
          @ShellOption(value = {"haltOnError"},
              help = "Halt if an error occurs during the generation process",
              defaultValue = "true") final boolean haltOnError) {
  
          val dialectName = DIALECTS_MAP.getOrDefault(dialect.trim().toUpperCase(), dialect);
          LOGGER.info("Using database dialect class [{}]", dialectName);
          if (!dialectName.contains(".")) {
              LOGGER.warn("Dialect name must be a fully qualified class name. Supported dialects by default are [{}] "
                  + "or you may specify the dialect class directly", DIALECTS_MAP.keySet());
              return;
          }
  
          val svcRegistry = new StandardServiceRegistryBuilder();
  
          val settings = new HashMap<String, String>();
          settings.put(AvailableSettings.DIALECT, dialect);
          settings.put(AvailableSettings.URL, jdbcUrl);
          settings.put(AvailableSettings.HBM2DDL_AUTO, "none");
          settings.put(AvailableSettings.SHOW_SQL, "true");
          svcRegistry.applySettings(settings);
  
          LOGGER.info("Collecting entity metadata sources...");
          val metadata = new MetadataSources(svcRegistry.build());
          REFLECTIONS.getTypesAnnotatedWith(MappedSuperclass.class).forEach(metadata::addAnnotatedClass);
          REFLECTIONS.getTypesAnnotatedWith(Entity.class).forEach(metadata::addAnnotatedClass);
          val metadataSources = metadata.buildMetadata();
  
          val export = new SchemaExport();
          export.setDelimiter(delimiter);
          export.setOutputFile(file);
          export.setFormat(pretty);
          export.setHaltOnError(haltOnError);
          export.setManageNamespaces(true);
  
          final SchemaExport.Action action;
          if (createSchema && dropSchema) {
              action = SchemaExport.Action.BOTH;
          } else if (createSchema) {
              action = SchemaExport.Action.CREATE;
          } else if (dropSchema) {
              action = SchemaExport.Action.DROP;
          } else {
              action = SchemaExport.Action.NONE;
          }
          LOGGER.info("Exporting Database DDL to [{}] using dialect [{}] with export type set to [{}]", file, dialect, action);
          export.execute(EnumSet.of(TargetType.SCRIPT, TargetType.STDOUT), SchemaExport.Action.BOTH, metadataSources);
          LOGGER.info("Database DDL is exported to [{}]", file);
      }