@Test public void testEquals() { Comment c1 = null; Comment c2 = null; assertEquals(c1, c2); c1 = new Comment(); assertNotEquals(c1, c2); c2 = new Comment(); assertEquals(c1, c2); c1.setText("comment1"); assertNotEquals(c1, c2); c2.setText(c1.getText()); assertEquals(c1, c2); c1.setUser("user1"); assertNotEquals(c1, c2); c2.setUser(c1.getUser()); assertEquals(c1, c2); }
@Override public boolean equals(Object obj) { if (!(obj instanceof Comment)) { return false; } Comment other = (Comment)obj; return Utils.objectEquals(this.user, other.user) && Utils.objectEquals(this.text, other.text) && Utils.objectEquals(this.createTime, other.createTime) && Utils.objectEquals(this.updateTime, other.updateTime) && Utils.objectEquals(this.itemKey, other.itemKey); }
Comment implements Serializable { @Override public boolean equals(Object obj) { if (!(obj instanceof Comment)) { return false; } Comment other = (Comment)obj; return Utils.objectEquals(this.user, other.user) && Utils.objectEquals(this.text, other.text) && Utils.objectEquals(this.createTime, other.createTime) && Utils.objectEquals(this.updateTime, other.updateTime) && Utils.objectEquals(this.itemKey, other.itemKey); } }
Comment implements Serializable { @Override public boolean equals(Object obj) { if (!(obj instanceof Comment)) { return false; } Comment other = (Comment)obj; return Utils.objectEquals(this.user, other.user) && Utils.objectEquals(this.text, other.text) && Utils.objectEquals(this.createTime, other.createTime) && Utils.objectEquals(this.updateTime, other.updateTime) && Utils.objectEquals(this.itemKey, other.itemKey); }  }
Comment implements Serializable { @Override public boolean equals(Object obj) { if (!(obj instanceof Comment)) { return false; } Comment other = (Comment)obj; return Utils.objectEquals(this.user, other.user) && Utils.objectEquals(this.text, other.text) && Utils.objectEquals(this.createTime, other.createTime) && Utils.objectEquals(this.updateTime, other.updateTime) && Utils.objectEquals(this.itemKey, other.itemKey); }  String getUser(); void setUser(String user); String getText(); void setText(String text); String getCreateTime(); void setCreateTime(String createTime); String getUpdateTime(); void setUpdateTime(String updateTime); String getItemKey(); void setItemKey(String itemKey); CommentRow toCommentRow(); UserInfo getUserInfo(); void setUserInfo(UserInfo userInfo); @Override boolean equals(Object obj); }
Comment implements Serializable { @Override public boolean equals(Object obj) { if (!(obj instanceof Comment)) { return false; } Comment other = (Comment)obj; return Utils.objectEquals(this.user, other.user) && Utils.objectEquals(this.text, other.text) && Utils.objectEquals(this.createTime, other.createTime) && Utils.objectEquals(this.updateTime, other.updateTime) && Utils.objectEquals(this.itemKey, other.itemKey); }  String getUser(); void setUser(String user); String getText(); void setText(String text); String getCreateTime(); void setCreateTime(String createTime); String getUpdateTime(); void setUpdateTime(String updateTime); String getItemKey(); void setItemKey(String itemKey); CommentRow toCommentRow(); UserInfo getUserInfo(); void setUserInfo(UserInfo userInfo); @Override boolean equals(Object obj);  }