Skip to content

Instantly share code, notes, and snippets.

@nesterione
Created January 25, 2017 18:59
Show Gist options
  • Save nesterione/1cb6ffb35d5f1b61be523df19eacdc42 to your computer and use it in GitHub Desktop.
Save nesterione/1cb6ffb35d5f1b61be523df19eacdc42 to your computer and use it in GitHub Desktop.
public static List<KeyValuePair> secretMethodName(Tree tree) {
List<KeyValuePair> metadata = new ArrayList<>();
KeyValuePair treeId = new KeyValuePair();
treeId.setKey(tree.getId());
treeId.setValue(tree.getRootNodeIds().get(0));
metadata.add(treeId);
KeyValuePair description = new KeyValuePair();
treeId.setKey(tree.getId() + "_" + MetadataConstants.DESCRIPTION_KEY);
treeId.setValue(tree.getDescription());
metadata.add(description);
KeyValuePair productDomain = new KeyValuePair();
treeId.setKey(tree.getId() + "_" + MetadataConstants.PRODUCT_DOMAIN_KEY);
treeId.setValue(tree.getProductDomain());
metadata.add(productDomain);
KeyValuePair name = new KeyValuePair();
treeId.setKey(tree.getId() + "_" + MetadataConstants.NAME_KEY);
treeId.setValue(tree.getName());
metadata.add(name);
return metadata;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment