Implements Comparable interface for book entity