public Long getSingleId() {
        if (!isConstrained()) {
            return null;
        }
        if (getSet().size() != 1) {
            throw new RuntimeException("Single is state invalid");
        }
        return getSet().iterator().next();
    }
@param id update so as not to change JAXB
stroom-legacy/stroom-legacy-model_6_1/src/main/java/stroom/legacy/model_6_1/EntityIdSet.java