Package com.google.appengine.api.datastore

Examples of com.google.appengine.api.datastore.Link


    @Test
    public void testLinkType() {
        String propertyName = "linkProp";
        List<Entity> elist = doQuery(kindName, propertyName, Link.class, true);
        Link link = (Link) elist.get(0).getProperty(propertyName);
        Link sameDat = (Link) elist.get(0).getProperty(propertyName);
        Link diffDat = (Link) elist.get(1).getProperty(propertyName);
        assertTrue(link.equals(sameDat));
        assertFalse(link.equals(diffDat));
        assertEquals("http://www.gmail.com", link.getValue());
        assertEquals(0, link.compareTo(sameDat));
        assertTrue(link.compareTo(diffDat) != 0);
View Full Code Here


            newRec.setProperty("shortBlobData", new ShortBlob(("shortBlobData" + i).getBytes()));
            newRec.setProperty("intData", 20 * i);
            newRec.setProperty("textData", new Text("textData" + i));
            newRec.setProperty("floatData", 1234 + 0.1 * i);
            newRec.setProperty("booleanData", true);
            newRec.setProperty("urlData", new Link("http://www.google.com"));
            newRec.setProperty("emailData", new Email("somebody123" + i + "@google.com"));
            newRec.setProperty("phoneData", new PhoneNumber("408-123-000" + i));
            newRec.setProperty("adressData", new PostalAddress("123 st. CA 12345" + i));
            newRec.setProperty("ratingData", new Rating(10 * i));
            newRec.setProperty("geoptData", new GeoPt((float) (i + 0.12), (float) (i + 0.98)));
View Full Code Here

                        newRec.setProperty("shortBlobData", new ShortBlob("shortBlobData".getBytes()));
                        newRec.setProperty("intData", 12345);
                        newRec.setProperty("textData", new Text("textData"));
                        newRec.setProperty("floatData", new Double(12345.12345));
                        newRec.setProperty("booleanData", true);
                        newRec.setProperty("urlData", new Link("http://www.google.com"));
                        newRec.setProperty("emailData", new Email("somebody123@google.com"));
                        newRec.setProperty("phoneData", new PhoneNumber("408-123-4567"));
                        newRec.setProperty("adressData", new PostalAddress("123 st. CA 12345"));
                        newRec.setProperty("ratingData", new Rating(55));
                        newRec.setProperty("geoptData", new GeoPt((float) 12.12, (float) 98.98));
View Full Code Here

  private final Log logger = LogFactory.getLog(getClass());

  public Link convert(String source) {
    if (!StringUtils.isEmpty(source)) {
      try {
        return new Link(source);
      } catch (Exception e) {
        logger.error(e.getMessage(), e);
      }
    }
    return null;
View Full Code Here

TOP

Related Classes of com.google.appengine.api.datastore.Link

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.