/** * DOC tguiu Comment method "doGetTableNames". * * @param connection * @return */ private static List<String> doGetTableNames(Connection connection) { List<String> result = new ArrayList<String>(15); for (MetadataTable table : ConnectionHelper.getTables(connection)) { if (table == null) { continue; } result.add(table.getLabel()); } return result; }
/** * DOC tguiu Comment method "findByLabel". * * @deprecated it would be better to use find with some unique identifier * @param connection * @param label * @return */ @Deprecated public static MetadataTable findByLabel(Connection connection, String label) { if (connection == null) { throw new IllegalArgumentException("null connection"); // $NON-NLS-1$ } if (label == null || "".equals(label)) { throw new IllegalArgumentException("null/empty label"); // $NON-NLS-1$ } Set<MetadataTable> tables = ConnectionHelper.getTables(connection); for (MetadataTable table : tables) { if (label.equals(table.getLabel())) { return table; } } return null; }