Objectify ofy = ObjectifyService.begin();
try {
ofy.get(MenuItem.class, MenuService.TOP_MENU_ITEM).getKey();
} catch (NotFoundException e) {
MenuItem topMenuItem = new MenuItem();
topMenuItem.setId(MenuService.TOP_MENU_ITEM);
topMenuItem.setName("Top");
Key key = ofy.put(topMenuItem);
PageContent pageContent = new PageContent();
pageContent.setId(MenuService.TOP_PAGE_ITEM);
topMenuItem.setKey(key);
topMenuItem.setContentId(pageContent.getId());
ofy.put(topMenuItem, pageContent);
LOG.warn("No TOP menu item -- new one has been created");
}