Package com.google.appengine.api.datastore

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


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


      entity.setProperty("Double", new Double(RandomUtils.nextDouble()));
      entity.setProperty("Date", new Date(RandomUtils.nextLong()));
      entity.setProperty("User", new User("test@example", "google.com"));
      entity.setProperty("Key", KeyFactory.createKey("test", RandomStringUtils
        .randomAlphabetic(5)));
      entity.setProperty("Category", new Category(RandomStringUtils.randomAlphabetic(3)));
      entity.setProperty("Email", new Email("test@example"));
      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
View Full Code Here

    descriptionFr.setLang(ApplicationConstants.LANG_FR_FR);
    descriptionFr.setText(toolModelForDao.getDescription().get(ApplicationConstants.LANG_FR_FR));

    for(String tag : toolModelForDao.getTags()){
      tags.add(new Category(tag));
    }

    tool.setId(toolModelForDao.getId());
    tool.setTitle(toolModelForDao.getTitle());
    tool.setTags(tags);
View Full Code Here

    for(String tagModel : articleModel.getTags()){
      if(null==tagModel || tagModel.isEmpty()){
        continue;
      }
      tags.add(new Category(tagModel));
    }

    article.setId(articleModel.getId());
    article.setTitle(articleModel.getTitle());
    article.setTags(tags);
View Full Code Here

      entity.setProperty("Double", new Double(RandomUtils.nextDouble()));
      entity.setProperty("Date", new Date(RandomUtils.nextLong()));
      entity.setProperty("User", new User("test@example", "google.com"));
      entity.setProperty("Key", KeyFactory.createKey("test", RandomStringUtils
        .randomAlphabetic(5)));
      entity.setProperty("Category", new Category(RandomStringUtils.randomAlphabetic(3)));
      entity.setProperty("Email", new Email("test@example"));
      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
View Full Code Here

    entity.setProperty(
      GbProperty.GEO_PT,
      new GeoPt(new Float(new Integer(RandomStringUtils.randomNumeric(2)) - 9), new Float(
        new Integer(RandomStringUtils.randomNumeric(2)) - 9)));
    entity
      .setProperty(GbProperty.CATEGORY, new Category(RandomStringUtils.randomAlphabetic(3)));
    entity.setProperty(GbProperty.RATING, new Rating(Integer.parseInt(RandomStringUtils
      .randomNumeric(2))));
    entity.setProperty(GbProperty.PHONE_NUMBER, new PhoneNumber(RandomStringUtils
      .randomNumeric(11)));
    entity.setProperty(GbProperty.POSTAL_ADDRESS, new PostalAddress(RandomStringUtils
View Full Code Here

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

            this.clear();

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

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

                if (null != v){

                    this.add(v);
View Full Code Here

        if (property instanceof Email) {
          Email m = (Email) property;
          return m.getEmail();
        }
        if (property instanceof Category) {
          Category m = (Category) property;
          return m.getCategory();
        }
        if (property instanceof Link) {
          Link m = (Link) property;
          return m.getText();
        }
        if (property instanceof PhoneNumber) {
          PhoneNumber m = (PhoneNumber) property;
          return m.getNumber();
        }
        if (property instanceof PostalAddress) {
          PostalAddress m = (PostalAddress) property;
          return m.getAddress();
        }
        if (property instanceof Rating) {
          Rating m = (Rating) property;
          return m.getRating() + "";
        }
        if (property instanceof Date) {
          return dt.format(property);
        }
        NumberFormat instance = getNumberFormat();
View Full Code Here

      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;
      return mail.getEmail();
    } else if (obj instanceof PostalAddress) {
      PostalAddress pa = (PostalAddress) obj;
View Full Code Here

TOP

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

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.