@Test public void testFromOptions() { final SchemaInfoLevel options1 = SchemaInfoLevelBuilder.standard(); final SchemaInfoLevel options2 = SchemaInfoLevelBuilder.builder() .fromOptions(options1).toOptions(); assertThat(options1, equalTo(options2)); }
/** * Creates a new SchemaInfoLevel with settings for standard schema * information. * * @return SchemaInfoLevel standard */ public static SchemaInfoLevel standard() { return builder().withTag("standard").withInfoLevel(InfoLevel.standard) .toOptions(); }
public static SchemaInfoLevelBuilder builder() { return new SchemaInfoLevelBuilder(); }
public SchemaCrawlerOptionsBuilder withSchemaInfoLevel(final SchemaInfoLevel schemaInfoLevel) { if (schemaInfoLevel != null) { schemaInfoLevelBuilder = SchemaInfoLevelBuilder.builder() .fromOptions(schemaInfoLevel); } return this; }
public SchemaCrawlerOptionsBuilder withSchemaInfoLevel(final SchemaInfoLevelBuilder schemaInfoLevelBuilder) { if (schemaInfoLevelBuilder == null) { this.schemaInfoLevelBuilder = SchemaInfoLevelBuilder.builder() .withInfoLevel(InfoLevel.standard); } else { this.schemaInfoLevelBuilder = schemaInfoLevelBuilder; } return this; }
.builder().fromConfig(config); if (config.hasValue("infolevel")) schemaInfoLevelBuilder.withInfoLevel(infoLevel); consumeOption("infolevel"); schemaInfoLevelBuilder.withInfoLevel(InfoLevel.standard);
/** * Retrieves schema based on standard options. * * @return Standard schema info level. */ public static SchemaInfoLevel newSchemaInfoLevel() { return standard(); }
schemaInfoLevelBuilder.withoutTables(); schemaInfoLevelBuilder.withoutRoutines(); return new SchemaCrawlerOptions(schemaInfoLevelBuilder.toOptions(), title, schemaInclusionRule,
schemaInfoLevelBuilder = SchemaInfoLevelBuilder.builder() .fromConfig(config);
.newSchemaRetrievalOptions(config); final SchemaInfoLevel schemaInfoLevel = SchemaInfoLevelBuilder.builder() .withInfoLevel(InfoLevel.minimum).setRetrieveSynonymInformation(true) .toOptions();
.newSchemaRetrievalOptions(config); final SchemaInfoLevel schemaInfoLevel = SchemaInfoLevelBuilder.builder() .withInfoLevel(InfoLevel.minimum).setRetrieveSequenceInformation(true) .toOptions();
private void reduceMap() { for (final SchemaInfoRetrieval schemaInfoRetrieval: SchemaInfoRetrieval .values()) { if (!is(schemaInfoRetrieval)) { schemaInfoRetrievals.remove(schemaInfoRetrieval); } } }
@Override public SchemaInfoLevel toOptions() { reduceMap(); return new SchemaInfoLevel(tag, schemaInfoRetrievals); }
.builder().withSchemaInfoLevel(SchemaInfoLevelBuilder.detailed()) .includeAllRoutines(); final SchemaCrawlerOptions schemaCrawlerOptions = schemaCrawlerOptionsBuilder
public SchemaCrawlerOptionsBuilder withSchemaInfoLevel(final SchemaInfoLevelBuilder schemaInfoLevelBuilder) { if (schemaInfoLevelBuilder == null) { this.schemaInfoLevelBuilder = SchemaInfoLevelBuilder.builder() .withInfoLevel(InfoLevel.standard); } else { this.schemaInfoLevelBuilder = schemaInfoLevelBuilder; } return this; }
.builder().fromConfig(config); if (config.hasValue("infolevel")) schemaInfoLevelBuilder.withInfoLevel(infoLevel); consumeOption("infolevel"); schemaInfoLevelBuilder.withInfoLevel(InfoLevel.standard);
public SchemaCrawlerOptionsBuilder withSchemaInfoLevel(final SchemaInfoLevel schemaInfoLevel) { if (schemaInfoLevel != null) { schemaInfoLevelBuilder = SchemaInfoLevelBuilder.builder() .fromOptions(schemaInfoLevel); } return this; }
/** * Retrieves schema based on standard options. * * @return Standard schema info level. */ public static SchemaInfoLevel newSchemaInfoLevel() { return standard(); }
schemaInfoLevelBuilder.withoutTables(); schemaInfoLevelBuilder.withoutRoutines(); return new SchemaCrawlerOptions(schemaInfoLevelBuilder.toOptions(), title, schemaInclusionRule,
schemaInfoLevelBuilder = SchemaInfoLevelBuilder.builder() .fromConfig(config);