|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface RatingsDAO
Data Access Object for Ratings
Method Summary | |
---|---|
void |
addRating(ResourceImpl resourceImpl,
java.lang.String userID,
int rating)
Method to persist a rating. |
void |
addRatings(ResourceImpl resource,
RatingDO[] ratingDOs)
Method to persist ratings. |
void |
copyRatings(ResourceImpl fromResource,
ResourceImpl toResource)
Method to copy ratings. |
float |
getAverageRating(ResourceImpl resourceImpl)
Method to get the average rating added to a given resource. |
java.lang.String[] |
getRatedUserNames(ResourceImpl resourceImpl)
Method to get users who rated the given resource. |
int |
getRateID(ResourceImpl resourceImpl,
java.lang.String userID)
Method to get a id of a rating added to a given resource. |
int |
getRating(ResourceImpl resourceImpl,
java.lang.String userID)
Method to get a rating added to a given resource. |
RatingDO |
getRatingDO(ResourceImpl resourceImpl,
java.lang.String userID)
Method to get a rating added by the given user to the given resource. |
RatingDO[] |
getResourceRatingDO(ResourceImpl resourceImpl)
Method to get ratings added by all users to the given resource. |
ResourceImpl |
getResourceWithMinimumData(java.lang.String path)
Gets the resource with sufficient data to differentiate it from another resource. |
void |
moveRatingPaths(ResourceIDImpl source,
ResourceIDImpl target)
Method to move rating paths. |
void |
moveRatings(ResourceIDImpl source,
ResourceIDImpl target)
Method to move ratings. |
void |
removeRatings(ResourceImpl resourceImpl)
Method to remove all ratings added to a resource. |
void |
updateRating(ResourceImpl resourceImpl,
int rateID,
int rating)
Method to update a rating added to a resource. |
Method Detail |
---|
void addRating(ResourceImpl resourceImpl, java.lang.String userID, int rating) throws RegistryException
resourceImpl
- the resourceuserID
- the id of the user who added the rating.rating
- the rating to be persisted.
RegistryException
- if some error occurs while adding a ratingvoid copyRatings(ResourceImpl fromResource, ResourceImpl toResource) throws RegistryException
fromResource
- the source resource.toResource
- the target resource.
RegistryException
- if some error occurs while copying ratingsvoid addRatings(ResourceImpl resource, RatingDO[] ratingDOs) throws RegistryException
resource
- the resourceratingDOs
- the ratings to be persisted.
RegistryException
- if some error occurs while adding ratingsvoid updateRating(ResourceImpl resourceImpl, int rateID, int rating) throws RegistryException
resourceImpl
- the resource.rateID
- the rate id.rating
- the rating.
RegistryException
- if some error occurs while updating the rating.int getRateID(ResourceImpl resourceImpl, java.lang.String userID) throws RegistryException
resourceImpl
- the resource.userID
- the id of the user who added the rating.
RegistryException
- if an error occurs while getting the rate id.float getAverageRating(ResourceImpl resourceImpl) throws RegistryException
resourceImpl
- the resource.
RegistryException
- if an error occurs while getting the average rating.RatingDO getRatingDO(ResourceImpl resourceImpl, java.lang.String userID) throws RegistryException
resourceImpl
- the resource.userID
- the id of the user who added the rating.
RegistryException
- if an error occurs while getting the rating.int getRating(ResourceImpl resourceImpl, java.lang.String userID) throws RegistryException
resourceImpl
- the resource.userID
- the id of the user who added the rating.
RegistryException
- if an error occurs while getting the rating.void removeRatings(ResourceImpl resourceImpl) throws RegistryException
resourceImpl
- the resource.
RegistryException
- if some error occurs while removing ratings.RatingDO[] getResourceRatingDO(ResourceImpl resourceImpl) throws RegistryException
resourceImpl
- the resource.
RegistryException
- if an error occurs while getting the rating.java.lang.String[] getRatedUserNames(ResourceImpl resourceImpl) throws RegistryException
resourceImpl
- the resource.
RegistryException
- if an error occurs while getting the rating.ResourceImpl getResourceWithMinimumData(java.lang.String path) throws RegistryException
ResourceImpl
with the path, name and path identifier
of a resource.
path
- the path of the resource.
RegistryException
- if an error occurs while retrieving resource data.void moveRatings(ResourceIDImpl source, ResourceIDImpl target) throws RegistryException
source
- the source resource.target
- the target resource.
RegistryException
- if some error occurs while moving ratingsvoid moveRatingPaths(ResourceIDImpl source, ResourceIDImpl target) throws RegistryException
source
- the source resource.target
- the target resource.
RegistryException
- if some error occurs while moving rating paths
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |