public MappedSchema withTables(Collection<MappedTable> values) { if (values!= null) { getTables().addAll(values); } return this; }
public MappedSchema withTables(MappedTable... values) { if (values!= null) { for (MappedTable value: values) { getTables().add(value); } } return this; }
public MappedSchema withTables(Collection<MappedTable> values) { if (values!= null) { getTables().addAll(values); } return this; }
public MappedSchema withTables(MappedTable... values) { if (values!= null) { for (MappedTable value: values) { getTables().add(value); } } return this; }
@Test(groups = "fast") public void testBuildSettings() throws Exception { final String settingsXML = "<settings xmlns=\"http://www.jooq.org/xsd/jooq-runtime-3.10.2.xsd\">\n" + " <renderMapping>\n" + " <schemata>\n" + " <schema>\n" + " <input>DEV</input>\n" + " <tables>\n" + " <table>\n" + " <input>AUTHOR</input>\n" + " <output>MY_APP__AUTHOR</output>\n" + " </table>\n" + " </tables>\n" + " </schema>\n" + " </schemata>\n" + " </renderMapping>\n" + "</settings>"; final Settings settings = PluginDao.getSettings(new ByteArrayInputStream(settingsXML.getBytes())); Assert.assertNotNull(settings); Assert.assertNotNull(settings.getRenderMapping()); Assert.assertNotNull(settings.getRenderMapping().getSchemata()); Assert.assertEquals(settings.getRenderMapping().getSchemata().size(), 1); Assert.assertEquals(settings.getRenderMapping().getSchemata().get(0).getInput(), "DEV"); Assert.assertEquals(settings.getRenderMapping().getSchemata().get(0).getTables().size(), 1); Assert.assertEquals(settings.getRenderMapping().getSchemata().get(0).getTables().get(0).getInput(), "AUTHOR"); Assert.assertEquals(settings.getRenderMapping().getSchemata().get(0).getTables().get(0).getOutput(), "MY_APP__AUTHOR"); } }
for (MappedSchema s : mapping().getSchemata()) { if (schemaName.equals(s.getInput())) { for (MappedTable t : s.getTables()) {
for (MappedSchema s : mapping().getSchemata()) { if (matches(s, schemaName)) { for (MappedTable t : s.getTables()) {