2 * To change this template, choose Tools | Templates
3 * and open the template in the editor.
5 package org.ufcspa.simdecs.bn.entity;
7 import java.io.Serializable;
8 import javax.persistence.*;
15 public class Answer implements Serializable {
16 private static final long serialVersionUID = 1L;
18 @GeneratedValue(strategy = GenerationType.AUTO)
23 private float likelihood;
26 private Question question;
32 public void setId(Long id) {
36 public String getText() {
40 public void setText(String text) {
44 public float getLikelihood() {
48 public void setLikelihood(float likelihood) {
49 this.likelihood = likelihood;
52 public Question getQuestion() {
56 public void setQuestion(Question question) {
57 this.question = question;
61 public int hashCode() {
63 hash += (id != null ? id.hashCode() : 0);
68 public boolean equals(Object object) {
69 // TODO: Warning - this method won't work in the case the id fields are not set
70 if (!(object instanceof Answer)) {
73 Answer other = (Answer) object;
74 if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {
81 public String toString() {
82 return "org.ufcspa.simdecs.entity.Answer[ id=" + id + " ]";