|
||||||||||
| 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,
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. |
String[] |
getRatedUserNames(ResourceImpl resourceImpl)
Method to get users who rated the given resource. |
int |
getRateID(ResourceImpl resourceImpl,
String userID)
Method to get a id of a rating added to a given resource. |
int |
getRating(ResourceImpl resourceImpl,
String userID)
Method to get a rating added to a given resource. |
RatingDO |
getRatingDO(ResourceImpl resourceImpl,
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(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 |
removeRating(ResourceImpl resourceImpl,
int rateID)
Method to remove rating added to a resource. |
void |
removeRatings(ResourceImpl resourceImpl)
Method to remove all ratings added to a resource. |
void |
removeVersionRatings(long version)
Removes all ratings added to the given resource of a given version. |
void |
updateRating(ResourceImpl resourceImpl,
int rateID,
int rating)
Method to update a rating added to a resource. |
| Method Detail |
|---|
void addRating(ResourceImpl resourceImpl,
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 rating
void copyRatings(ResourceImpl fromResource,
ResourceImpl toResource)
throws RegistryException
fromResource - the source resource.toResource - the target resource.
RegistryException - if some error occurs while copying ratings
void addRatings(ResourceImpl resource,
RatingDO[] ratingDOs)
throws RegistryException
resource - the resourceratingDOs - the ratings to be persisted.
RegistryException - if some error occurs while adding ratings
void 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,
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,
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,
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.
void removeRating(ResourceImpl resourceImpl,
int rateID)
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.
String[] getRatedUserNames(ResourceImpl resourceImpl)
throws RegistryException
resourceImpl - the resource.
RegistryException - if an error occurs while getting the rating.
ResourceImpl getResourceWithMinimumData(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 ratings
void moveRatingPaths(ResourceIDImpl source,
ResourceIDImpl target)
throws RegistryException
source - the source resource.target - the target resource.
RegistryException - if some error occurs while moving rating paths
void removeVersionRatings(long version)
throws RegistryException
version - the version
RegistryException - if an error occurred while removing tags.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||