TablePartial(final Table table) { this(requireNonNull(table, "No table provided").getSchema(), table.getName()); addAttributes(table.getAttributes()); }
TablePartial(final Table table) { this(requireNonNull(table, "No table provided").getSchema(), table.getName()); addAttributes(table.getAttributes()); }
private void mapTableNameMatches(final List<Table> tables, final Collection<String> prefixes) { for (final Table table: tables) { for (final String prefix: prefixes) { String matchTableName = table.getName().toLowerCase(); if (matchTableName.startsWith(prefix)) { matchTableName = matchTableName.substring(prefix.length()); matchTableName = Inflection.singularize(matchTableName); if (!isBlank(matchTableName)) { tableKeys.add(table, matchTableName); } } } } }
private void assertReferencedColumnExists(final Catalog catalog, final Column column) { assertThat(column, notNullValue()); final Table table = column.getParent(); assertThat("Table references do not match - " + table.getName(), table == catalog.lookupTable(table.getSchema(), table.getName()) .get()); assertThat("Column references do not match", column == table.lookupColumn(column.getName()).get()); }
/** * {@inheritDoc} */ @Override public void handleData(final Table table, final ResultSet rows) throws SchemaCrawlerException { final String tableName; if (table != null) { if (options.isShowUnqualifiedNames()) { tableName = table.getName(); } else { tableName = table.getFullName(); } } else { tableName = ""; } handleData(tableName, rows); }
tableProperties.put("tablename", table.getName()); tableProperties.put("columns", getColumnsListAsString(columns, false, identifiers));
tableProperties.put("tablename", table.getName()); tableProperties.put("columns", getColumnsListAsString(columns, false, identifiers));
if (table.getName().equals(tableName))
for (final Table table: tables) if (table.getName().equals(tableName))
for (final Table table: tables) if (table.getName().equals(tableName))
assertThat("Table name does not match in iteration " + i, tableNames[tableIdx], is(table.getName()));
.format(" %s [%s]", table.getName(), table.getTableType())); final Column[] columns = table.getColumns().toArray(new Column[0]); Arrays.sort(columns);
protected String generateClassName(Table table) { String ccName = toCamelCase(table.getName()); ccName = Character.toUpperCase( ccName.charAt(0) ) + ccName.substring(1, ccName.length()); return namespace + ".model." + removePrefixes( ccName ); }
protected String generateDtoClassName(Table table) { String ccName = toCamelCase(table.getName()); ccName = Character.toUpperCase( ccName.charAt(0) ) + ccName.substring(1, ccName.length()); return namespace + ".dto." + removePrefixes( ccName )+ "Dto"; }
jsonTable.put("name", table.getName()); if (!options.isShowUnqualifiedNames())
TablePartial(final Table table) { this(requireNonNull(table, "No table provided").getSchema(), table.getName()); addAttributes(table.getAttributes()); }
TablePartial(final Table table) { this(requireNonNull(table, "No table provided").getSchema(), table.getName()); addAttributes(table.getAttributes()); }
@Override public DaTable valueOf(Table object) { if (object instanceof View) { return new DaViewImpl((View) object, schemaStrategy, extraViewInfoMap.get(object.getName())); } else { return new DaTableImpl(object, schemaStrategy, extraIndexes); } } })