package devopsdistilled.operp.server.data.entity;

import java.io.Serializable;

public abstract class Entiti implements Serializable, Comparable<Entiti> {

	private static final long serialVersionUID = 1511849548001171832L;

	public abstract Long id();

	@Override
	public int compareTo(Entiti anotherEntity) {
		return (this.id() < anotherEntity.id()) ? -1
				: (this.id() > anotherEntity.id()) ? 1 : 0;
	}

}

@@ -102,17 +102,61 @@
 s Entiti
- 
+%3CID extends Serializable & Comparable%3CID%3E%3E%0A%09%09
 implemen
@@ -189,16 +189,20 @@
 e%3CEntiti
+%3CID%3E
 %3E %7B%0A%0A%09pr
@@ -288,12 +288,10 @@
 act 
-Long
+ID
  id(
@@ -333,24 +333,22 @@
 o(Entiti
- another
+%3CID%3E a
 Entity) 
@@ -358,17 +358,16 @@
 %09return 
-(
 this.id(
@@ -371,62 +371,20 @@
 id()
- %3C anotherEntity.id()) ? -1%0A%09%09%09%09: (this.id() %3E another
+.compareTo(a
 Enti
@@ -395,16 +395,8 @@
 d())
- ? 1 : 0
 ;%0A%09%7D

Define Entiti with Generics for ID