You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rave.apache.org by mf...@apache.org on 2012/06/04 17:32:41 UTC
svn commit: r1346013 -
/rave/branches/model_interfaces/rave-components/rave-core/src/main/java/org/apache/rave/portal/model/impl/WidgetRatingImpl.java
Author: mfranklin
Date: Mon Jun 4 15:32:41 2012
New Revision: 1346013
URL: http://svn.apache.org/viewvc?rev=1346013&view=rev
Log:
Added WidgetRating Impl (RAVE-625)
Added:
rave/branches/model_interfaces/rave-components/rave-core/src/main/java/org/apache/rave/portal/model/impl/WidgetRatingImpl.java
Added: rave/branches/model_interfaces/rave-components/rave-core/src/main/java/org/apache/rave/portal/model/impl/WidgetRatingImpl.java
URL: http://svn.apache.org/viewvc/rave/branches/model_interfaces/rave-components/rave-core/src/main/java/org/apache/rave/portal/model/impl/WidgetRatingImpl.java?rev=1346013&view=auto
==============================================================================
--- rave/branches/model_interfaces/rave-components/rave-core/src/main/java/org/apache/rave/portal/model/impl/WidgetRatingImpl.java (added)
+++ rave/branches/model_interfaces/rave-components/rave-core/src/main/java/org/apache/rave/portal/model/impl/WidgetRatingImpl.java Mon Jun 4 15:32:41 2012
@@ -0,0 +1,67 @@
+package org.apache.rave.portal.model.impl;
+
+import org.apache.rave.portal.model.WidgetRating;
+
+public class WidgetRatingImpl implements WidgetRating {
+
+ private Long id;
+ private Long widgetId;
+ private Long userId;
+ private Integer score;
+
+ public Long getId() {
+ return id;
+ }
+
+ public void setId(Long id) {
+ this.id = id;
+ }
+
+ public Long getWidgetId() {
+ return widgetId;
+ }
+
+ public void setWidgetId(Long widgetId) {
+ this.widgetId = widgetId;
+ }
+
+ public Long getUserId() {
+ return userId;
+ }
+
+ public void setUserId(Long userId) {
+ this.userId = userId;
+ }
+
+ public Integer getScore() {
+ return score;
+ }
+
+ public void setScore(Integer score) {
+ this.score = score;
+ }
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) return true;
+ if (!(o instanceof WidgetRatingImpl)) return false;
+
+ WidgetRatingImpl that = (WidgetRatingImpl) o;
+
+ if (id != null ? !id.equals(that.id) : that.id != null) return false;
+ if (score != null ? !score.equals(that.score) : that.score != null) return false;
+ if (userId != null ? !userId.equals(that.userId) : that.userId != null) return false;
+ if (widgetId != null ? !widgetId.equals(that.widgetId) : that.widgetId != null) return false;
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ int result = id != null ? id.hashCode() : 0;
+ result = 31 * result + (widgetId != null ? widgetId.hashCode() : 0);
+ result = 31 * result + (userId != null ? userId.hashCode() : 0);
+ result = 31 * result + (score != null ? score.hashCode() : 0);
+ return result;
+ }
+}