Fixed bug on questions syncronization

This commit is contained in:
Juan Miguel Boyero Corral 2011-06-14 21:04:46 +02:00
parent 1969abd70a
commit 7da708fc2e
3 changed files with 29 additions and 4 deletions

View File

@ -202,8 +202,6 @@ public class TestAnswer extends Model {
public boolean equals(Object obj) {
if (this == obj)
return true;
if (!super.equals(obj))
return false;
if (getClass() != obj.getClass())
return false;
TestAnswer other = (TestAnswer) obj;

View File

@ -214,13 +214,26 @@ public class TestQuestion extends Model {
public int hashCode() {
final int prime = 31;
int result = super.hashCode();
result = prime * result + ((answerType == null) ? 0 : answerType.hashCode());
result = prime * result + ((answers == null) ? 0 : answers.hashCode());
result = prime * result
+ ((answerType == null) ? 0 : answerType.hashCode());
result = prime * result + (int) (crsCod ^ (crsCod >>> 32));
result = prime * result + (shuffle ? 1231 : 1237);
result = prime * result + ((stem == null) ? 0 : stem.hashCode());
return result;
}
/* (non-Javadoc)
* @see java.lang.Object#equals(java.lang.Object)
*/
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (!super.equals(obj))
return false;
return true;
}
/* (non-Javadoc)
* @see java.lang.Object#toString()
*/

View File

@ -136,6 +136,20 @@ public class TestTag extends Model {
return result;
}
/* (non-Javadoc)
* @see java.lang.Object#equals(java.lang.Object)
*/
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (!super.equals(obj))
return false;
if (getClass() != obj.getClass())
return false;
return true;
}
/* (non-Javadoc)
* @see java.lang.Object#toString()
*/