@Override public SchemaRetrievalOptionsBuilder fromOptions(final SchemaRetrievalOptions options) { if (options == null) { return this; } dbServerType = options.getDatabaseServerType(); informationSchemaViewsBuilder = InformationSchemaViewsBuilder .builder(options.getInformationSchemaViews()); overridesSupportSchemas = Optional.empty(); overridesSupportsCatalogs = Optional.empty(); supportsCatalogs = options.isSupportsCatalogs(); supportsSchemas = options.isSupportsSchemas(); identifierQuoteString = options.getIdentifierQuoteString(); identifiers = options.getIdentifiers(); tableRetrievalStrategy = options.getTableRetrievalStrategy(); tableColumnRetrievalStrategy = options.getTableColumnRetrievalStrategy(); pkRetrievalStrategy = options.getPrimaryKeyRetrievalStrategy(); indexRetrievalStrategy = options.getIndexRetrievalStrategy(); fkRetrievalStrategy = options.getForeignKeyRetrievalStrategy(); procedureRetrievalStrategy = options.getProcedureRetrievalStrategy(); procedureColumnRetrievalStrategy = options .getProcedureColumnRetrievalStrategy(); functionRetrievalStrategy = options.getFunctionRetrievalStrategy(); functionColumnRetrievalStrategy = options .getFunctionColumnRetrievalStrategy(); overridesTypeMap = Optional.empty(); return this; }
@Override public SchemaRetrievalOptions toOptions() { return new SchemaRetrievalOptions(this); }
private SchemaCrawlerCommand loadCommand() throws SchemaCrawlerException { // NOTE: The daisy chain command may change the provided output // options for each chained command final SchemaCrawlerCommand scCommand = new CommandDaisyChain(command); scCommand.setSchemaCrawlerOptions(schemaCrawlerOptions); scCommand.setOutputOptions(outputOptions); scCommand.setAdditionalConfiguration(additionalConfiguration); scCommand.setIdentifiers(schemaRetrievalOptions.getIdentifiers()); return scCommand; }
private Catalog loadCatalog() throws Exception { final CatalogLoaderRegistry catalogLoaderRegistry = new CatalogLoaderRegistry(); final CatalogLoader catalogLoader = catalogLoaderRegistry .lookupCatalogLoader(schemaRetrievalOptions.getDatabaseServerType() .getDatabaseSystemIdentifier()); LOGGER .log(Level.CONFIG, new StringFormat("Catalog loader: %s", this.getClass().getName())); catalogLoader.setAdditionalConfiguration(additionalConfiguration); catalogLoader.setConnection(connection); catalogLoader.setSchemaRetrievalOptions(schemaRetrievalOptions); catalogLoader.setSchemaCrawlerOptions(schemaCrawlerOptions); final Catalog catalog = catalogLoader.loadCatalog(); requireNonNull(catalog, "Catalog could not be retrieved"); return catalog; }
/** * Gets the INFORMATION_SCHEMA views select SQL statements. * * @return INFORMATION_SCHEMA views selects */ InformationSchemaViews getInformationSchemaViews() { return schemaRetrievalOptions.getInformationSchemaViews(); }
MetadataRetrievalStrategy getIndexRetrievalStrategy() { return schemaRetrievalOptions.getIndexRetrievalStrategy(); }
MetadataRetrievalStrategy getPrimaryKeyRetrievalStrategy() { return schemaRetrievalOptions.getPrimaryKeyRetrievalStrategy(); }
MetadataRetrievalStrategy getForeignKeyRetrievalStrategy() { return schemaRetrievalOptions.getForeignKeyRetrievalStrategy(); }
MetadataRetrievalStrategy getFunctionColumnRetrievalStrategy() { return schemaRetrievalOptions.getFunctionColumnRetrievalStrategy(); }
MetadataRetrievalStrategy getFunctionRetrievalStrategy() { return schemaRetrievalOptions.getFunctionRetrievalStrategy(); }
private SchemaCrawlerCommand loadCommand() throws SchemaCrawlerException { // NOTE: The daisy chain command may change the provided output // options for each chained command final SchemaCrawlerCommand scCommand = new CommandDaisyChain(command); scCommand.setSchemaCrawlerOptions(schemaCrawlerOptions); scCommand.setOutputOptions(outputOptions); scCommand.setAdditionalConfiguration(additionalConfiguration); scCommand.setIdentifiers(schemaRetrievalOptions.getIdentifiers()); return scCommand; }
private Catalog loadCatalog() throws Exception { final CatalogLoaderRegistry catalogLoaderRegistry = new CatalogLoaderRegistry(); final CatalogLoader catalogLoader = catalogLoaderRegistry .lookupCatalogLoader(schemaRetrievalOptions.getDatabaseServerType() .getDatabaseSystemIdentifier()); LOGGER .log(Level.CONFIG, new StringFormat("Catalog loader: %s", this.getClass().getName())); catalogLoader.setAdditionalConfiguration(additionalConfiguration); catalogLoader.setConnection(connection); catalogLoader.setSchemaRetrievalOptions(schemaRetrievalOptions); catalogLoader.setSchemaCrawlerOptions(schemaCrawlerOptions); final Catalog catalog = catalogLoader.loadCatalog(); requireNonNull(catalog, "Catalog could not be retrieved"); return catalog; }
/** * Gets the INFORMATION_SCHEMA views select SQL statements. * * @return INFORMATION_SCHEMA views selects */ InformationSchemaViews getInformationSchemaViews() { return schemaRetrievalOptions.getInformationSchemaViews(); }
MetadataRetrievalStrategy getIndexRetrievalStrategy() { return schemaRetrievalOptions.getIndexRetrievalStrategy(); }
MetadataRetrievalStrategy getPrimaryKeyRetrievalStrategy() { return schemaRetrievalOptions.getPrimaryKeyRetrievalStrategy(); }
MetadataRetrievalStrategy getForeignKeyRetrievalStrategy() { return schemaRetrievalOptions.getForeignKeyRetrievalStrategy(); }
MetadataRetrievalStrategy getFunctionColumnRetrievalStrategy() { return schemaRetrievalOptions.getFunctionColumnRetrievalStrategy(); }
MetadataRetrievalStrategy getFunctionRetrievalStrategy() { return schemaRetrievalOptions.getFunctionRetrievalStrategy(); }
@Override public SchemaRetrievalOptionsBuilder fromOptions(final SchemaRetrievalOptions options) { if (options == null) { return this; } dbServerType = options.getDatabaseServerType(); informationSchemaViewsBuilder = InformationSchemaViewsBuilder .builder(options.getInformationSchemaViews()); overridesSupportSchemas = Optional.empty(); overridesSupportsCatalogs = Optional.empty(); supportsCatalogs = options.isSupportsCatalogs(); supportsSchemas = options.isSupportsSchemas(); identifierQuoteString = options.getIdentifierQuoteString(); identifiers = options.getIdentifiers(); tableRetrievalStrategy = options.getTableRetrievalStrategy(); tableColumnRetrievalStrategy = options.getTableColumnRetrievalStrategy(); pkRetrievalStrategy = options.getPrimaryKeyRetrievalStrategy(); indexRetrievalStrategy = options.getIndexRetrievalStrategy(); fkRetrievalStrategy = options.getForeignKeyRetrievalStrategy(); procedureRetrievalStrategy = options.getProcedureRetrievalStrategy(); procedureColumnRetrievalStrategy = options .getProcedureColumnRetrievalStrategy(); functionRetrievalStrategy = options.getFunctionRetrievalStrategy(); functionColumnRetrievalStrategy = options .getFunctionColumnRetrievalStrategy(); overridesTypeMap = Optional.empty(); return this; }
private SchemaCrawlerCommand loadCommand() throws SchemaCrawlerException { // NOTE: The daisy chain command may change the provided output // options for each chained command final SchemaCrawlerCommand scCommand = new CommandDaisyChain(command); scCommand.setSchemaCrawlerOptions(schemaCrawlerOptions); scCommand.setOutputOptions(outputOptions); scCommand.setAdditionalConfiguration(additionalConfiguration); scCommand.setIdentifiers(schemaRetrievalOptions.getIdentifiers()); return scCommand; }