@Entity public class Rating extends Object
| Constructor and Description |
|---|
Rating()
Create a new rating with document and user set to null and score set to 0.
|
Rating(String documentId,
float score)
Create a new document average rating for the specified document with the specified score (user id is set to null).
|
Rating(String userId,
String documentId,
float score)
Create a new rating for the specified document and user with the specified score.
|
| Modifier and Type | Method and Description |
|---|---|
String |
getDocumentId()
Get the document id.
|
float |
getScore()
Get the score.
|
String |
getUserId()
Get the user id.
|
void |
setDocumentId(String documentId)
Set the document id.
|
void |
setScore(float score)
Set the score.
|
void |
setUserId(String userId)
Set the user id.
|
public Rating()
public Rating(String userId, String documentId, float score)
userId - the id of the userdocumentId - the id of the documentscore - the rating scorepublic Rating(String documentId, float score)
documentId - the id of the documentscore - the rating scorepublic String getUserId()
public void setUserId(String userId)
userId - the new user idpublic String getDocumentId()
public void setDocumentId(String documentId)
documentId - the new document idpublic float getScore()
public void setScore(float score)
score - the new scoreCopyright © 2017. All rights reserved.