public final void execute() throws Exception { requireNonNull(connection, "No connection provided"); if (schemaRetrievalOptions == null) { schemaRetrievalOptions = SchemaCrawlerUtility .matchSchemaRetrievalOptions(connection); } logExecution(); // Load the command to see if it is available // Fail early (before loading the catalog) if the command is not // available final SchemaCrawlerCommand scCommand = loadCommand(); scCommand.initialize(); scCommand.checkAvailibility(); final Catalog catalog = loadCatalog(); // Reduce all once again, since the catalog may have been loaded // from an offline or other source reduceCatalog(catalog); scCommand.setCatalog(catalog); scCommand.setConnection(connection); LOGGER.log(Level.INFO, new StringFormat("Executing command <%s> using <%s>", command, scCommand.getClass().getName())); scCommand.execute(); }
/** * Crawls a database, and returns a catalog. * * @param connection * Live database connection. * @param schemaCrawlerOptions * Options. * @return Database catalog. * @throws SchemaCrawlerException * On an exception. */ public static Catalog getCatalog(final Connection connection, final SchemaCrawlerOptions schemaCrawlerOptions) throws SchemaCrawlerException { checkConnection(connection); if (LOGGER.isLoggable(Level.CONFIG)) { LOGGER.log(Level.CONFIG, ObjectToString.toString(schemaCrawlerOptions)); } final SchemaRetrievalOptions schemaRetrievalOptions = matchSchemaRetrievalOptions(connection); final SchemaCrawler schemaCrawler = new SchemaCrawler(connection, schemaRetrievalOptions, schemaCrawlerOptions); final Catalog catalog = schemaCrawler.crawl(); return catalog; }
public final void execute() throws Exception { requireNonNull(connection, "No connection provided"); if (schemaRetrievalOptions == null) { schemaRetrievalOptions = SchemaCrawlerUtility .matchSchemaRetrievalOptions(connection); } logExecution(); // Load the command to see if it is available // Fail early (before loading the catalog) if the command is not // available final SchemaCrawlerCommand scCommand = loadCommand(); scCommand.initialize(); scCommand.checkAvailibility(); final Catalog catalog = loadCatalog(); // Reduce all once again, since the catalog may have been loaded // from an offline or other source reduceCatalog(catalog); scCommand.setCatalog(catalog); scCommand.setConnection(connection); LOGGER.log(Level.INFO, new StringFormat("Executing command <%s> using <%s>", command, scCommand.getClass().getName())); scCommand.execute(); }
public final void execute() throws Exception { requireNonNull(connection, "No connection provided"); if (schemaRetrievalOptions == null) { schemaRetrievalOptions = SchemaCrawlerUtility .matchSchemaRetrievalOptions(connection); } logExecution(); // Load the command to see if it is available // Fail early (before loading the catalog) if the command is not // available final SchemaCrawlerCommand scCommand = loadCommand(); scCommand.initialize(); scCommand.checkAvailibility(); final Catalog catalog = loadCatalog(); // Reduce all once again, since the catalog may have been loaded // from an offline or other source reduceCatalog(catalog); scCommand.setCatalog(catalog); scCommand.setConnection(connection); LOGGER.log(Level.INFO, new StringFormat("Executing command <%s> using <%s>", command, scCommand.getClass().getName())); scCommand.execute(); }
/** * Crawls a database, and returns a catalog. * * @param connection * Live database connection. * @param schemaCrawlerOptions * Options. * @return Database catalog. * @throws SchemaCrawlerException * On an exception. */ public static Catalog getCatalog(final Connection connection, final SchemaCrawlerOptions schemaCrawlerOptions) throws SchemaCrawlerException { checkConnection(connection); if (LOGGER.isLoggable(Level.CONFIG)) { LOGGER.log(Level.CONFIG, ObjectToString.toString(schemaCrawlerOptions)); } final SchemaRetrievalOptions schemaRetrievalOptions = matchSchemaRetrievalOptions(connection); final SchemaCrawler schemaCrawler = new SchemaCrawler(connection, schemaRetrievalOptions, schemaCrawlerOptions); final Catalog catalog = schemaCrawler.crawl(); return catalog; }
/** * Crawls a database, and returns a catalog. * * @param connection * Live database connection. * @param schemaCrawlerOptions * Options. * @return Database catalog. * @throws SchemaCrawlerException * On an exception. */ public static Catalog getCatalog(final Connection connection, final SchemaCrawlerOptions schemaCrawlerOptions) throws SchemaCrawlerException { checkConnection(connection); if (LOGGER.isLoggable(Level.CONFIG)) { LOGGER.log(Level.CONFIG, ObjectToString.toString(schemaCrawlerOptions)); } final SchemaRetrievalOptions schemaRetrievalOptions = matchSchemaRetrievalOptions(connection); final SchemaCrawler schemaCrawler = new SchemaCrawler(connection, schemaRetrievalOptions, schemaCrawlerOptions); final Catalog catalog = schemaCrawler.crawl(); return catalog; }