@Test void buildFromEmptyBundle_noConnections() { JdbcConnectionEntityBuilder builder = new JdbcConnectionEntityBuilder(ID_GENERATOR); final List<Entity> entities = builder.build(new Bundle(), BundleType.ENVIRONMENT, DocumentTools.INSTANCE.getDocumentBuilder().newDocument()); assertTrue(entities.isEmpty()); }
public List<Entity> build(Bundle bundle, BundleType bundleType, Document document) { Map<String, JdbcConnection> jdbcConnectionMap = Optional.ofNullable(bundle.getJdbcConnections()).orElse(Collections.emptyMap()); return buildEntities(jdbcConnectionMap, bundle, bundleType, document); }
JdbcConnectionEntityBuilder implements EntityBuilder { public List<Entity> build(Bundle bundle, BundleType bundleType, Document document) { Map<String, JdbcConnection> jdbcConnectionMap = Optional.ofNullable(bundle.getJdbcConnections()).orElse(Collections.emptyMap()); return buildEntities(jdbcConnectionMap, bundle, bundleType, document); } }
JdbcConnectionEntityBuilder implements EntityBuilder { public List<Entity> build(Bundle bundle, BundleType bundleType, Document document) { Map<String, JdbcConnection> jdbcConnectionMap = Optional.ofNullable(bundle.getJdbcConnections()).orElse(Collections.emptyMap()); return buildEntities(jdbcConnectionMap, bundle, bundleType, document); } @Inject  JdbcConnectionEntityBuilder(IdGenerator idGenerator); }
JdbcConnectionEntityBuilder implements EntityBuilder { public List<Entity> build(Bundle bundle, BundleType bundleType, Document document) { Map<String, JdbcConnection> jdbcConnectionMap = Optional.ofNullable(bundle.getJdbcConnections()).orElse(Collections.emptyMap()); return buildEntities(jdbcConnectionMap, bundle, bundleType, document); } @Inject  JdbcConnectionEntityBuilder(IdGenerator idGenerator); List<Entity> build(Bundle bundle, BundleType bundleType, Document document); @Override @NotNull Integer getOrder(); }
JdbcConnectionEntityBuilder implements EntityBuilder { public List<Entity> build(Bundle bundle, BundleType bundleType, Document document) { Map<String, JdbcConnection> jdbcConnectionMap = Optional.ofNullable(bundle.getJdbcConnections()).orElse(Collections.emptyMap()); return buildEntities(jdbcConnectionMap, bundle, bundleType, document); } @Inject  JdbcConnectionEntityBuilder(IdGenerator idGenerator); List<Entity> build(Bundle bundle, BundleType bundleType, Document document); @Override @NotNull Integer getOrder();  }