package be.shoktan.BeeBreedingManager.model;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;

import org.hibernate.annotations.GenericGenerator;

/**
 * Basic class to hold common methods for all the Entity
 * @author Wisthy
 *
 */
@Entity @Inheritance(strategy=InheritanceType.TABLE_PER_CLASS)
public abstract class ABaseEntity {
	@Id
	@GeneratedValue(generator="increment")
	@GenericGenerator(name="increment", strategy = "increment")
	private Long id;

	/**
	 * @return the id
	 */
	public Long getId() {
		return id;
	}
	
	
}

@@ -147,16 +147,157 @@
 ce.Id;%0D%0A
+import javax.persistence.Inheritance;%0D%0Aimport javax.persistence.InheritanceType;%0D%0A%0D%0Aimport org.apache.commons.lang3.builder.CompareToBuilder;
 %0D%0Aimport
@@ -740,16 +740,141 @@
 d;%0D%0A%09%7D%0D%0A
+%0D%0A%0D%0A%09public int compareTo(ABaseEntity o) %7B%0D%0A%09%09return new CompareToBuilder().append(this.id, o.id)%0D%0A%09%09%09%09.toComparison();%0D%0A%09%7D%0D%0A
 %09%0D%0A%09%0D%0A%7D%0D

Update ABaseEntity.java