mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Rating Service. Allow fractional ratings.
I've changed the ratings 'score' from an integer to a float as fractional ratings seems like a reasonable idea to me. This had impact all through the Java layer, the REST layer, the model and the test code. git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@21128 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -29,12 +29,12 @@ import java.util.Date;
|
||||
*/
|
||||
public class Rating
|
||||
{
|
||||
private final int ratingScore;
|
||||
private final float ratingScore;
|
||||
private final String ratingAppliedBy;
|
||||
private final Date ratingAppliedAt;
|
||||
private final RatingScheme ratingScheme;
|
||||
|
||||
public Rating(RatingScheme scheme, int score, String appliedBy, Date appliedAt)
|
||||
public Rating(RatingScheme scheme, float score, String appliedBy, Date appliedAt)
|
||||
{
|
||||
this.ratingScheme = scheme;
|
||||
this.ratingScore = score;
|
||||
@@ -48,7 +48,7 @@ public class Rating
|
||||
*
|
||||
* @return the score.
|
||||
*/
|
||||
public int getScore()
|
||||
public float getScore()
|
||||
{
|
||||
return ratingScore;
|
||||
}
|
||||
|
Reference in New Issue
Block a user