Examples of Rating


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

            new PhoneNumber("000-0000-0000"),
            new PhoneNumber("111-1111-1111")));
        m.setPostalAddressListAttr(Arrays.asList(
            new PostalAddress("111-1111"),
            new PostalAddress("222-2222")));
        m.setRatingListAttr(Arrays.asList(new Rating(80), new Rating(90)));
        m.setShortBlobListAttr(Arrays.asList(
            new ShortBlob("hello".getBytes()),
            new ShortBlob("world".getBytes())));
        m.setTextListAttr(Arrays.asList(new Text("hello"), new Text("world")));
        m.setUserListAttr(Arrays.asList(
View Full Code Here

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

            Arrays.asList(
                new PostalAddress("111-1111"),
                new PostalAddress("222-2222")).toArray(),
            m.getPostalAddressListAttr().toArray());
        Assert.assertArrayEquals(Arrays
            .asList(new Rating(80), new Rating(90))
            .toArray(), m.getRatingListAttr().toArray());
        Assert.assertArrayEquals(
            Arrays.asList(
                new ShortBlob("hello".getBytes()),
                new ShortBlob("world".getBytes())).toArray(),
View Full Code Here

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

        entity.setProperty("email", new Email("3@3.com"));
        entity.setProperty("geopt", new GeoPt(23.0f, 54.3f));
        entity.setProperty("link", new Link("http://www.3.com"));
        entity.setProperty("phoneNumber", new PhoneNumber("333-333-3333"));
        entity.setProperty("postalAddress", new PostalAddress("333 three 3¬∫"));
        entity.setProperty("rating", new Rating(33));
        return entity;
    }
View Full Code Here

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

{
 
  public static Rating instantiate(SerializationStreamReader reader) throws SerializationException
  {
    int rating = reader.readInt();
    return new Rating(rating);
  }
View Full Code Here

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

      String[] split = ((String) value).split(VALUE_SEPARATER);
      val = new GeoPt(Float.parseFloat(split[0]), Float.parseFloat(split[1]));
    } else if (valueType.equals(CATEGORY)) {
      val = new Category((String) value);
    } else if (valueType.equals(RATING)) {
      val = new Rating(Integer.parseInt((String) value));
    } else if (valueType.equals(PHONE_NUMBER)) {
      val = new PhoneNumber((String) value);
    } else if (valueType.equals(POSTAL_ADDRESS)) {
      val = new PostalAddress((String) value);
    } else if (valueType.equals(EMAIL)) {
View Full Code Here

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

        if (clazz == PhoneNumber.class)
            return clazz.cast(new PhoneNumber(self));
        if (clazz == PostalAddress.class)
            return clazz.cast(new PostalAddress(self));
        if (clazz == Rating.class)
            return clazz.cast(new Rating(Integer.valueOf(self)));
        if (clazz == JID.class)
            return clazz.cast(new JID(self));
        if (clazz == Key.class)
            return clazz.cast(KeyFactory.stringToKey(self));
        if (clazz == String[].class)
View Full Code Here

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

     32 as Rating
     * </code></pre>
     */
    public static <T> T asType(Integer self, Class <T> ratingClass) {
        if (ratingClass == Rating.class)
            return ratingClass.cast(new Rating(self));
        return DefaultGroovyMethods.asType(self, ratingClass);
    }
View Full Code Here

Examples of com.google.gdata.data.extensions.Rating

        String eventType = event.getUserEventType().toString();
        String author = event.getAuthors().get(0).getName();
        String videoId = event.getVideoId();
        String username = event.getUsername();
        String title = event.getTitle().getPlainText();
        Rating rating = event.getRating();
        Date updated = new Date(event.getUpdated().getValue());
       
        JSONObject json = new JSONObject();
        try {
          json.put("event", eventType);
          json.put("title", title);
          if(username != null) {
            json.put("username", username);
          }
          if(rating != null) {
            json.put("rating", rating.getValue());
          }
          if(videoId != null) {
            json.put("videoid", videoId);
          }
        } catch (JSONException e) {
View Full Code Here

Examples of com.google.gdata.data.extensions.Rating

  private static void addRating(BooksService service,
                                String volumeId, int value)
      throws IOException, ServiceException {
    VolumeEntry newEntry = new VolumeEntry();
    newEntry.setId(volumeId);
    Rating rating = new Rating();
    rating.setMin(1);
    rating.setMax(5);
    rating.setValue(value);
    newEntry.setRating(rating);
    try {
      service.insert(new URL(USER_ANNOTATION_FEED), newEntry);
    } catch (ServiceException se) {
      System.out.println("There was an error adding your rating.\n");
View Full Code Here

Examples of com.gwtplatform.carstore.server.dao.domain.Rating

        return Rating.createDto(ratingDao.get(id));
    }

    @Override
    public RatingDto saveOrCreate(RatingDto ratingDto) {
        Rating rating = ratingDao.put(Rating.create(ratingDto));

        return Rating.createDto(rating);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.