package it.unisa.sesa.repominer.db.entities;
import net.sf.jeasyorm.annotation.Column;
import net.sf.jeasyorm.annotation.Table;
@Table(name = "method_comments")
public class MethodComment {
public MethodComment() {
}
public MethodComment(Integer methodId, Integer commentId) {
this.methodId = methodId;
this.commentId = commentId;
}
@Column(name = "method")
private Integer methodId;
@Column(name = "comment")
private Integer commentId;
public Integer getMethodId() {
return methodId;
}
public void setMethodId(Integer methodId) {
this.methodId = methodId;
}
public Integer getCommentId() {
return commentId;
}
public void setCommentId(Integer commentId) {
this.commentId = commentId;
}
@Override
public String toString() {
return "Method_comment [methodId=" + methodId + ", commentId="
+ commentId + "]";
}
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result
+ ((commentId == null) ? 0 : commentId.hashCode());
result = prime * result
+ ((methodId == null) ? 0 : methodId.hashCode());
return result;
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (getClass() != obj.getClass())
return false;
MethodComment other = (MethodComment) obj;
if (commentId == null) {
if (other.commentId != null)
return false;
} else if (!commentId.equals(other.commentId))
return false;
if (methodId == null) {
if (other.methodId != null)
return false;
} else if (!methodId.equals(other.methodId))
return false;
return true;
}
}