Package com.google.appengine.api.datastore

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


      // TODO
      return null;
    case KEY:
      return DatastoreUtil.convert((KeyInfo)info);
    case LINK:
      return new Link(((LinkPropertyInfo) info).getPayload());
    case LIST:
      ListPropertyInfo listInfo = (ListPropertyInfo) info;
      List list = newLinkedList();
      for (PropertyInfo i : listInfo.getPayload()) {
        list.add(convert(i, e));
View Full Code Here


   *
   * @throws Exception
   */
  @Test
  public void testLink() throws Exception {
    assertEquals(new Link("abcde"),
        parser("link('abcde')").bool_exp().e.evaluate(null).getPayload());
  }
View Full Code Here

      val = new Text((String) value);
      // throw new RuntimeException("Text is not supported.");
    } else if (valueType.equals(DATE)) {
      val = new Date(Long.parseLong((String) value));
    } else if (valueType.equals(LINK)) {
      val = new Link((String) value);
    } else if (valueType.equals(SHORT_BLOB)) {
      throw new RuntimeException("ShortBlob is not supported.");
    } else if (valueType.equals(GEO_PT)) {
      String[] split = ((String) value).split(VALUE_SEPARATER);
      val = new GeoPt(Float.parseFloat(split[0]), Float.parseFloat(split[1]));
View Full Code Here

      String value = getValue() != null ? ((Link)getValue()).getValue() : "";
      return value;
    }
   
    public void  setAsText(String text) {
      setValue(new Link(text));
    }
View Full Code Here

            Nicolive nicolive = new Nicolive();
            nicolive.setKey(Datastore.allocateId(NicoliveMeta.get()));
            nicolive.setTitle("テスト" + i);
            nicolive.setDescription(new Text("テスト説明文" + i));
            nicolive.setOpenTime(datetime.minusWeeks(i).toDate());
            nicolive.setLink(new Link("http://ryu22e.org/" + i));
            nicolives.add(nicolive);

            NicoliveIndex index1 = new NicoliveIndex();
            index1.setKeyword("テスト");
            index1.setNicoliveKey(nicolive.getKey());
View Full Code Here

        nicolinve.setTitle("テスト");
        nicolinve.setDescription(new Text("テスト説明文"));
        DateTime datetime = new DateTime(2012, 5, 12, 0, 0, 0, 0);
        datetime = datetime.minusDays(0);
        nicolinve.setOpenTime(datetime.toDate());
        nicolinve.setLink(new Link("http://ryu22e.org/0"));
        Key key = Datastore.put(nicolinve);
        testDataKeys.add(key);
    }
View Full Code Here

        testData.setDescription(new Text("これはテストデータです。"));
        DateTime openTime = new DateTime();
        testData.setOpenTime(openTime.toDate());
        DateTime startTime = openTime.minusMinutes(10);
        testData.setStartTime(startTime.toDate());
        testData.setLink(new Link("http://ryu22e.org/"));
        testData.setType("official");

        Key key = Datastore.put(testData);
        testDataKeys.add(key);
View Full Code Here

            nicolinve.setTitle("テスト" + i);
            nicolinve.setDescription(new Text("テスト説明文" + i));
            DateTime datetime = new DateTime(2011, 1, 1, 0, 0, 0, 0);
            datetime = datetime.minusDays(i);
            nicolinve.setOpenTime(datetime.toDate());
            nicolinve.setLink(new Link("http://ryu22e.org/" + i));
            Key key = Datastore.put(nicolinve);
            testDataKeys.add(key);
        }

        NicoliveCondition condition = new NicoliveCondition();
View Full Code Here

            nicolinve.setTitle("テスト" + i);
            nicolinve.setDescription(new Text("テスト説明文" + i));
            DateTime datetime = new DateTime(2011, 1, 1, 0, 0, 0, 0);
            datetime = datetime.minusDays(i);
            nicolinve.setOpenTime(datetime.toDate());
            nicolinve.setLink(new Link("http://ryu22e.org/" + i));
            Key key = Datastore.put(nicolinve);
            testDataKeys.add(key);
        }

        NicoliveCondition condition = new NicoliveCondition();
View Full Code Here

        NicoliveMeta n = NicoliveMeta.get();
        assertThat(
            Datastore
                .query(n)
                .filter(n.link.equal(new Link("http://ryu22e.org/0")))
                .count(),
            is(1));
        for (int i = 1; i < 9; i++) {
            int count =
                    Datastore
                        .query(n)
                        .filter(
                            n.link.equal(new Link("http://ryu22e.org/" + i)))
                        .count();
            assertThat(count, is(1));

            Nicolive nicolive =
                    Datastore
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.