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:
Neil McErlean
2010-07-13 13:31:07 +00:00
parent ed8497e2b7
commit eece9fef5e
9 changed files with 68 additions and 68 deletions

View File

@@ -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;
}