protected void toString(final StringBuilder sb) {
        sb.append(getType());
        sb.append(" (id=");
        sb.append(id);
        sb.append(", version=");
        sb.append(version);
    }
Compares one base entity with another using the id of each entity. When
used with sorted collections entities will be ordered by ascending id.

@param o The base entity to compare this one with.
@return An integer that is a result of this id - the comparing object id.
stroom-legacy/stroom-legacy-model_6_1/src/main/java/stroom/legacy/model_6_1/BaseEntity.java