Examples of Rating


Examples of com.agiletec.plugins.jpcontentfeedback.aps.system.services.contentfeedback.rating.model.Rating

  @Override
  public synchronized void addRatingToContent(String contentId, int vote) throws ApsSystemException{
    try {
      RatingSearchBean searchBean = new RatingSearchBean();
      searchBean.setContentId(contentId);
      Rating rating = this.getRatingDAO().getRating(searchBean);
      if (rating == null){
        rating = new Rating();
        int key = this.getKeyGeneratorManager().getUniqueKeyCurrentValue();
        rating.setId(key);
        rating.setContentId(contentId);
        rating.setVote(1, vote);
        this.getRatingDAO().addRating(rating);
      } else {
        rating.setVote(rating.getVoters()+1, rating.getSumvote()+vote);
        this.getRatingDAO().updateRating(rating);
      }
            this.notifyEvent(contentId, -1, ContentFeedbackChangedEvent.CONTENT_RATING, ContentFeedbackChangedEvent.INSERT_OPERATION_CODE);
    } catch (Throwable t) {
      ApsSystemUtils.logThrowable(t, this, "addRatingToContent");
View Full Code Here

Examples of com.camunda.fox.example.domain.Rating

          @ReadyToRate
          LoanApplicationEvent loanApplicationEvent) {
       
    int score = creditRatingLogic.rateApplication(loanApplicationEvent.getLoanApplication());
   
    Rating rating = new Rating();   
    rating.setScore(score);
   
    entityManager.persist(rating);
    entityManager.flush();
   
    Execution execution = runtimeService.createExecutionQuery()
      .processInstanceId(loanApplicationEvent.getCorrelationId())
      .activityId("receiveRating")
      .singleResult();
       
    businessProcess.associateExecutionById(execution.getId());   
    businessProcess.setVariable("ratingId", rating.getId());
    businessProcess.signalExecution();   
  }
View Full Code Here

Examples of com.camunda.fox.example.domain.Rating

   
    businessProcess.startProcessByKey("creditRating");
   
    Thread.sleep(2000);
       
    Rating rating = findRating();
    Assert.assertTrue(rating.getScore()>0); // positive rating
       
  }
View Full Code Here

Examples of com.camunda.fox.example.domain.Rating

   
    businessProcess.startProcessByKey("creditRating");
   
    Thread.sleep(2000);
   
    Rating rating = findRating();
    Assert.assertTrue(rating.getScore()<0); // negative rating
   
  }
View Full Code Here

Examples of com.camunda.fox.example.domain.Rating

  @After
  public void cleanup() throws Exception {
    utx.begin();
    try {
      Rating rating = findRating();
      entityManager.remove(rating);
      utx.commit();
    } catch (Exception e) {
      utx.rollback();
    }
View Full Code Here

Examples of com.camunda.fox.example.domain.Rating

               
        LoanApplication application = (LoanApplication) objectMessage.getObject();
       
        int score = creditRatingLogic.rateApplication(application);
       
        Rating rating = new Rating();
        rating.setScore(score);
       
        entityManager.persist(rating);
        entityManager.flush();

        Execution execution = runtimeService.createExecutionQuery()
          .processInstanceId(message.getStringProperty("correlationId"))
          .activityId("receiveRating")
          .singleResult();
           
        businessProcess.associateExecutionById(execution.getId());   
        businessProcess.setVariable("ratingId", rating.getId());
        businessProcess.signalExecution();   
       
      } catch (JMSException e) {
        throw new EJBException("Could not unwrap object message" + e.getMessage(), e);
      }     
View Full Code Here

Examples of com.dotmarketing.beans.Rating

      }
    } catch (Exception e) {
      Logger.error(this, "Error trying to obtain the current liferay user from the request.", e);
    }

    Rating rt = RatingAPI.getRating(llCookie, identifier, userId);

    rt.setUserId(userId);
    rt.setRating(rating);
    rt.setIdentifier(identifier);
    rt.setLongLiveCookiesId(llCookie);
    rt.setSessionId(session.getId());
    rt.setUserIP(req.getRemoteAddr());

    RatingAPI.saveRating(rt);

  }
View Full Code Here

Examples of com.explodingpixels.data.Rating

            int row, int column) {

        super.getTableCellRendererComponent(table, value, isSelected, hasFocus,
                row, column);

        Rating rating = (Rating) value;

        // grab the cached rating component for the corresponding rating.
        RatingComponent renderer = fRatingsToRatingComponents.get(rating);
        renderer.setFocused(table.hasFocus());
        renderer.setSelected(table.isRowSelected(row));
View Full Code Here

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

  public void testDate() {
    validateSplits(createQuery(ENTITY_KIND_NAME, PROPERTY_NAME, new Date(0), new Date(100)),
        longRanges(0, 20, 40, 60, 80, 100));
  }
  public void testRating() {
    validateSplits(createQuery(ENTITY_KIND_NAME, PROPERTY_NAME, new Rating(0), new Rating(100)),
        longRanges(0, 20, 40, 60, 80, 100));
  }
View Full Code Here

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

        .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))));

      List<String> coll = new ArrayList<String>();
      coll.add(RandomStringUtils.randomAlphabetic(3));
      coll.add(RandomStringUtils.randomAlphabetic(3));
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.