/** * Set the item ID. * @param iid The item ID. * @return The builder (for chaining). */ @EntityAttributeSetter("item") public RatingBuilder setItemId(long iid) { itemId = iid; hasItemId = true; return this; }
/** * Set the user ID. * @param uid The user ID. * @return The builder (for chaining). */ @EntityAttributeSetter("user") public RatingBuilder setUserId(long uid) { userId = uid; hasUserId = true; return this; }
/** * Set the timestamp. * @param ts The timestamp. * @return The builder (for chaining). */ @EntityAttributeSetter("timestamp") public RatingBuilder setTimestamp(long ts) { timestamp = ts; return this; }
/** * Set the rating value. * * @param r The rating value. * @return The builder (for chaining). */ @EntityAttributeSetter("rating") public RatingBuilder setRating(double r) { if (Double.isNaN(r)) { throw new IllegalArgumentException("rating is not a number"); } rating = r; hasRating = true; return this; }
/** * Set the rating ID. * @param id The rating ID. * @return The builder (for chaining). */ @EntityAttributeSetter("id") public RatingBuilder setId(long id) { return (RatingBuilder) super.setId(id); }
/** * Set the user ID. * @param uid The user ID. * @return The builder (for chaining). */ @EntityAttributeSetter("user") public RatingBuilder setUserId(long uid) { userId = uid; hasUserId = true; return this; }
/** * Set the item ID. * @param iid The item ID. * @return The builder (for chaining). */ @EntityAttributeSetter("item") public RatingBuilder setItemId(long iid) { itemId = iid; hasItemId = true; return this; }
/** * Set the timestamp. * @param ts The timestamp. * @return The builder (for chaining). */ @EntityAttributeSetter("timestamp") public RatingBuilder setTimestamp(long ts) { timestamp = ts; return this; }
/** * Set the rating value. * * @param r The rating value. * @return The builder (for chaining). */ @EntityAttributeSetter("rating") public RatingBuilder setRating(double r) { if (Double.isNaN(r)) { throw new IllegalArgumentException("rating is not a number"); } rating = r; hasRating = true; return this; }
/** * Set the rating ID. * @param id The rating ID. * @return The builder (for chaining). */ @EntityAttributeSetter("id") public RatingBuilder setId(long id) { return (RatingBuilder) super.setId(id); }