class DhisResourceComparator implements Comparator<DhisResource> {

    @Override
    public int compare( DhisResource o1, DhisResource o2 )
    {
        return ObjectUtils.compare( o1 == null ? null : o1.getId(), o2 == null ? null : o2.getId() );
    }

}