private static List<String> doGetTableNames(SAPFunctionUnit functionUnit) { List<String> result = new ArrayList<String>(15); for (Object table : functionUnit.getTables()) { result.add(((MetadataTable) table).getLabel()); } return result; }
public static MetadataTable findByLabel(SAPFunctionUnit functionUnit, String label) { if (functionUnit == null) { throw new IllegalArgumentException("null connection"); // $NON-NLS-1$ } if (label == null || "".equals(label)) { throw new IllegalArgumentException("null/empty label"); // $NON-NLS-1$ } EList tables = functionUnit.getTables(); for (int i = 0; i < tables.size(); i++) { MetadataTable table = (MetadataTable) tables.get(i); if (label.equals(table.getLabel())) { return table; } } return null; }