events now order properly

This commit is contained in:
Fredrik Norberg 2011-07-19 09:42:37 +02:00
parent 7fb6513e4c
commit bfa5f8ad7c

@ -132,18 +132,19 @@ public abstract class Event extends LazyDeletableDomainObject
return true;
if (obj == null)
return false;
if (this.getClass() != obj.getClass())
return false;
if (obj instanceof Event){
Event other = (Event) obj;
Event other = (Event) obj;
if (id == null) {
if (other.id != null)
if (id == null) {
if (other.id != null)
return false;
} else if (!id.equals(other.id))
return false;
} else if (!id.equals(other.id))
return false;
return true;
return true;
}
return false;
}
@Override
@ -153,7 +154,7 @@ public abstract class Event extends LazyDeletableDomainObject
@Override
public int compareTo(Event other) {
int dcomp = (int) (dueDate.getTime() - other.dueDate.getTime());
int dcomp = dueDate.compareTo(other.dueDate);
if(dcomp == 0)
return id.compareTo(other.id);
else