@Override public Object getParent(Object itemId) { return getTreeTableSource().getParent(itemId); }
protected Map<Object, Object> getParentsMapping(TreeTableItems<E> tableSource, Object nullParentItemId) { Map<Object, Object> parentsMapping = new LinkedHashMap<>(); Collection<?> itemIds = tableSource.getItemIds(); for (Object itemId : itemIds) { Object parentId = tableSource.getParent(itemId); if (itemIds.contains(parentId)) { parentsMapping.put(itemId, parentId); } else { parentsMapping.put(itemId, nullParentItemId); } } return parentsMapping; }