Constructor and Description |
---|
RatingBuilder()
Create an uninitialized rating builder.
|
Modifier and Type | Method and Description |
---|---|
Rating |
build() |
RatingBuilder |
clearRating()
Clear the rating value (so this builder builds unrate events).
|
static RatingBuilder |
copy(Rating r)
Construct a new rating builder that is a copy of a particular rating.
|
long |
getItemId()
Get the item ID.
|
double |
getRating()
Get the rating.
|
long |
getTimestamp()
Get the timestamp.
|
long |
getUserId()
Get the user ID.
|
boolean |
hasRating()
Query whether this builder has a rating.
|
RatingBuilder |
setItemId(long iid)
Set the item ID.
|
RatingBuilder |
setRating(double r)
Set the rating value.
|
RatingBuilder |
setTimestamp(long ts)
Set the timestamp.
|
RatingBuilder |
setUserId(long uid)
Set the user ID.
|
public static RatingBuilder copy(Rating r)
r
- The rating to copy.public long getUserId()
public RatingBuilder setUserId(long uid)
uid
- The user ID.public long getItemId()
public RatingBuilder setItemId(long iid)
iid
- The item ID.public double getRating()
public RatingBuilder setRating(double r)
r
- The rating value.public RatingBuilder clearRating()
public boolean hasRating()
true
if the builder has a rating, false
if it will produce unrate
events.public long getTimestamp()
public RatingBuilder setTimestamp(long ts)
ts
- The timestamp.