Package com.google.appengine.api.datastore

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


  @Override
  public EvaluationResult evaluate(ProcessDataRecord record) {
    EvaluationResult r = ops.get(0).evaluate(record);
   
    if (r.getPayload() instanceof String) {
      Link val = new Link((String) r.getPayload());
      return new EvaluationResult(val, r)
    } else {
      return r.withWarning(ErrorCode.W135);
    }
  }
View Full Code Here


      entity.setProperty("GeoPt", new GeoPt(new Float(new Integer(RandomStringUtils
        .randomNumeric(2)) - 9), new Float(
        new Integer(RandomStringUtils.randomNumeric(2)) - 9)));
      entity.setProperty("IMHandle", new IMHandle(Scheme.valueOf("sip"), RandomStringUtils
        .randomAlphabetic(2)));
      entity.setProperty("Link", new Link("test"));
      entity.setProperty("PhoneNumber", new PhoneNumber(RandomStringUtils.randomNumeric(11)));
      entity.setProperty("PostalAddress", new PostalAddress(RandomStringUtils
        .randomNumeric(7)));
      entity.setProperty("Rating", new Rating(Integer.parseInt(RandomStringUtils
        .randomNumeric(2))));
View Full Code Here

      entity.setProperty("GeoPt", new GeoPt(new Float(new Integer(RandomStringUtils
        .randomNumeric(2)) - 9), new Float(
        new Integer(RandomStringUtils.randomNumeric(2)) - 9)));
      entity.setProperty("IMHandle", new IMHandle(Scheme.valueOf("sip"), RandomStringUtils
        .randomAlphabetic(2)));
      entity.setProperty("Link", new Link("test"));
      entity.setProperty("PhoneNumber", new PhoneNumber(RandomStringUtils.randomNumeric(11)));
      entity.setProperty("PostalAddress", new PostalAddress(RandomStringUtils
        .randomNumeric(7)));
      entity.setProperty("Rating", new Rating(Integer.parseInt(RandomStringUtils
        .randomNumeric(2))));
View Full Code Here

    entity.setProperty(GbProperty.BLOB, new Blob(RandomStringUtils
      .randomAlphanumeric(1000)
      .getBytes()));
    entity.setProperty(GbProperty.TEXT, new Text(RandomStringUtils.randomAlphanumeric(1000)));
    entity.setProperty(GbProperty.DATE, new Date(RandomUtils.nextLong()));
    entity.setProperty(GbProperty.LINK, new Link(RandomStringUtils.randomAlphanumeric(30)));
    entity.setProperty(GbProperty.SHORT_BLOB, new ShortBlob(RandomStringUtils
      .randomAlphanumeric(500)
      .getBytes()));
    entity.setProperty(
      GbProperty.GEO_PT,
View Full Code Here

        childEntities.get(22).getKey());
    Entity p4 = newParentEntity(
        "p4",
        childEntities.get(38).getKey(),
        childEntities.get(89).getKey(),
        new Link("blar"),
        childEntities.get(60).getKey(),
        childEntities.get(80).getKey());
    Entity p5 = newParentEntity(
        "p5",
        childEntities.get(49).getKey(),
View Full Code Here

    assertNull(pojo.getStr4());
  }

  public void testFetchGroupOverridesCanBeManuallyUndone() {   
    HasFetchGroupsJDO pojo = new HasFetchGroupsJDO();
    pojo.setLink(new Link("blarg"));
    makePersistentInTxn(pojo, TXN_START_END);
    beginTxn();
    pojo = pm.detachCopy(pm.getObjectById(HasFetchGroupsJDO.class, pojo.getId()));
    commitTxn();
    assertNull(pojo.getLink());
View Full Code Here

    @Override
    public Link decode(JsonReader reader, Link defaultValue) {
        String text = reader.read();
        if(text != null){
            return new Link(text);
        }
        return defaultValue;
    }
View Full Code Here

            this.clear();

            final ArrayJson array = (ArrayJson)json;
            for (Json j: array){

                Link v = j.getValue(Link.class);

                if (null != v){

                    this.add(v);
View Full Code Here

      return Base64.encodeBytes(sbl.getBytes());
    } else if (obj instanceof Blob) {
      Blob sbl = (Blob) obj;
      return Base64.encodeBytes(sbl.getBytes());
    } else if (obj instanceof Link) {
      Link lnk = (Link) obj;
      return lnk.getValue();
    } else if (obj instanceof Category) {
      Category cat = (Category) obj;
      return cat.getCategory();
    } else if (obj instanceof Email) {
      Email mail = (Email) obj;
View Full Code Here

      } else if (obj == ShortBlob.class) {
        return new ShortBlob(Base64.decode(args));
      } else if (obj == Blob.class) {
        return new Blob(Base64.decode(args));
      } else if (obj == Link.class) {
        return new Link(args);
      } else if (obj == Category.class) {
        return new Category(args);
      } else if (obj == Email.class) {
        return new Email(args);
      } else if (obj == PostalAddress.class) {
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.