Package es.udc.tfg.journals.model.util

Examples of es.udc.tfg.journals.model.util.ReviewRatingDto


    User user1 = userService.registerUser("userPassword", new UserDetails(
        "name", "lastName", "user1@udc.es", "user1"));

    reviewService.createReviewType("global");
    reviewService.createReviewType("quality");
    ReviewRatingDto rvdto1 = new ReviewRatingDto("global", 2);
    ReviewRatingDto rvdto2 = new ReviewRatingDto("quality", 5);
    List<ReviewRatingDto> reviewRatingsDto = new ArrayList<ReviewRatingDto>();
    reviewRatingsDto.add(rvdto1);
    reviewRatingsDto.add(rvdto2);
    Review r1 = reviewService.createReview("review 1", user.getUserId(),
        journal.getJournalId(), reviewRatingsDto);
View Full Code Here


    // ****************** Reviews ******************

    reviewService.createReviewType("global");
    List<ReviewRatingDto> rrDtos = new ArrayList<ReviewRatingDto>();
    rrDtos.add(new ReviewRatingDto("global", 5));

    // User 1
    reviewService.createReview("", user1.getUserId(),
        journal1.getJournalId(), rrDtos);
    reviewService.createReview("", user1.getUserId(),
        journal3.getJournalId(), rrDtos);

    // User 2
    reviewService.createReview("", user2.getUserId(),
        journal1.getJournalId(), rrDtos);
    reviewService.createReview("", user2.getUserId(),
        journal3.getJournalId(), rrDtos);
    reviewService.createReview("", user2.getUserId(),
        journal4.getJournalId(), rrDtos);

    // User 3
    // TODO: User3 da 2 punto a la revista 1, que tiene 5 puntos de User1,
    // pero obtienen similitud 1 igual ¿?¿
    rrDtos.clear();
    rrDtos.add(new ReviewRatingDto("global", 2));
    reviewService.createReview("", user3.getUserId(),
        journal1.getJournalId(), rrDtos);
    reviewService.createReview("", user3.getUserId(),
        journal3.getJournalId(), rrDtos);

View Full Code Here

  }

  public List<ReviewRatingDto> createReviewRatingDtos() {
    List<ReviewRatingDto> result = new ArrayList<ReviewRatingDto>();
    for (String type : findAllReviewTypeNames()) {
      result.add(new ReviewRatingDto(type, null));
    }
    return result;
  }
View Full Code Here

TOP

Related Classes of es.udc.tfg.journals.model.util.ReviewRatingDto

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.