Package com.googlecode.objectify

Examples of com.googlecode.objectify.Key


    public Object convertValue(Map map, Object o, Class toType) {
        if (toType == Key.class) {
            String s = ((String[]) o)[0];
            return Key.create(s);
        } else if (toType == String.class) {
            Key k = (Key) o;
            return k.getString();
        }

        return null;
    }
View Full Code Here


        if (!StringUtils.isEmpty(id) && !BY_KEY.equals(id)) {
            menuItem = getObjectify().query(MenuItem.class).filter("urlString", id).get();
        } else {
            menuItem = (MenuItem)getObjectify().get(key);
        }
        PageContent pageContent = (PageContent)getObjectify().get(new Key(PageContent.class, menuItem.getContentId())); //TODO
        menuItem.setContent(pageContent.getContent());
        return menuItem;
    }
View Full Code Here

            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);
View Full Code Here

        }

        // TODO
        // load the Profile Entity
        String userId = user.getUserId();
        Key key = Key.create(Profile.class, userId);

        Profile profile = (Profile) ofy().load().key(key).now();
        return profile;
    }
View Full Code Here

        }

        // TODO
        // load the Profile Entity
        String userId = user.getUserId();
        Key key = Key.create(Profile.class, userId);

        Profile profile = (Profile) ofy().load().key(key).now();
        return profile;
    }
View Full Code Here

        }

        // TODO
        // load the Profile Entity
        String userId = user.getUserId();
        Key key = Key.create(Profile.class, userId);

        Profile profile = (Profile) ofy().load().key(key).now();
        return profile;
    }
View Full Code Here

        }

        // TODO
        // load the Profile Entity
        String userId = ""; // TODO
        Key key = null; // TODO
        Profile profile = null; // TODO load the Profile entity
        return profile;
    }
View Full Code Here

    }

    // TODO
    // load the Profile Entity
    String userId = ""; // TODO
    Key key = null; // TODO
    Profile profile = null; // TODO load the Profile entity
    return profile;
  }
View Full Code Here

TOP

Related Classes of com.googlecode.objectify.Key

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.