public Long getMaxId() {
        Long max = null;
        for (final Long id : getSet()) {
            if (max == null) {
                max = id;
            } else {
                if (id.longValue() > max.longValue()) {
                    max = id;
                }
            }
        }
        return max;
    }
HERE FOR XML JAXB serialisation ..... DO NOT REMOVE
stroom-legacy/stroom-legacy-model_6_1/src/main/java/stroom/legacy/model_6_1/IdSet.java