Class StarRating
- java.lang.Object
-
- fr.paris.lutece.plugins.extend.business.extender.history.ResourceExtenderHistory
-
- fr.paris.lutece.plugins.extend.modules.rating.business.Rating
-
- fr.paris.lutece.plugins.extend.modules.rating.business.StarRating
-
- All Implemented Interfaces:
fr.paris.lutece.plugins.extend.service.extender.facade.IExtendableResourceResult
public class StarRating extends Rating
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringRATING_TITLE
-
Constructor Summary
Constructors Constructor Description StarRating()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description doublegetAverageScore()Calculate the score (min : 1 - max : 4).doublegetAverageScoreRoundToHalf()doublegetScoreValue()java.lang.StringgetTitle()Get tilte of the rating type-
Methods inherited from class fr.paris.lutece.plugins.extend.modules.rating.business.Rating
getIdRating, getRatingCount, getRatingType, getRatingValue, getUser, setHistory, setIdRating, setRatingCount, setRatingType, setRatingValue, setScoreValue, setScoreValue, setUser
-
Methods inherited from class fr.paris.lutece.plugins.extend.business.extender.history.ResourceExtenderHistory
getDateCreation, getExtendableResourceType, getExtenderType, getIdExtendableResource, getIdHistory, getIpAddress, getUserGuid, setDateCreation, setExtendableResourceType, setExtenderType, setIdExtendableResource, setIdHistory, setIpAddress, setUserGuid
-
-
-
-
Field Detail
-
RATING_TITLE
public static final java.lang.String RATING_TITLE
- See Also:
- Constant Field Values
-
-
Method Detail
-
getScoreValue
public double getScoreValue()
- Overrides:
getScoreValuein classRating- Returns:
- the dScoreValue
-
getAverageScore
public double getAverageScore()
Calculate the score (min : 1 - max : 4).- Returns:
- the average score
-
getAverageScoreRoundToHalf
public double getAverageScoreRoundToHalf()
- Returns:
- the average score calculated with 0.5 precision
-
-