/*
	cursus - Race series management program
	Copyright 2011  Simon Arlott

	This program is free software: you can redistribute it and/or modify
	it under the terms of the GNU General Public License as published by
	the Free Software Foundation, either version 3 of the License, or
	(at your option) any later version.

	This program is distributed in the hope that it will be useful,
	but WITHOUT ANY WARRANTY; without even the implied warranty of
	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
	GNU General Public License for more details.

	You should have received a copy of the GNU General Public License
	along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
package eu.lp0.cursus.db.data;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Inheritance;
import javax.persistence.InheritanceType;

@Entity
@Inheritance(strategy = InheritanceType.TABLE_PER_CLASS)
public abstract class AbstractEntity {
	private Long id;

	@Id
	@GeneratedValue
	@Column(nullable = false)
	public Long getId() {
		return id;
	}

	@SuppressWarnings("unused")
	private void setId(long id) {
		this.id = id;
	}

	@Override
	public boolean equals(Object o) {
		if (o == null) {
			return false;
		}

		if (!getClass().equals(o.getClass())) {
			return false;
		}

		return getId().equals(((AbstractEntity)o).getId());
	}
}
@@ -1056,17 +1056,17 @@
 private 
-L
+l
 ong id;%0A
@@ -1123,17 +1123,17 @@
 %09public 
-L
+l
 ong getI
@@ -1395,23 +1395,33 @@
 %09return 
+new Long(
 getId()
+)
 .equals(
@@ -1452,10 +1452,84 @@
 d());%0A%09%7D
+%0A%0A%09@Override%0A%09public int hashCode() %7B%0A%09%09return (int)(id %5E (id %3E%3E%3E 32));%0A%09%7D
 %0A%7D

add hashCode() consistent with equals()