private <T> T applySetter(final T currentValue, final T newValue) {
        if (!checkImmutable) {
            return newValue;
        }
        // Loaded off the database ... make sure no change happens
        if (currentValue == null && newValue == null) {
            return null;
        }
        if (currentValue == null || newValue == null) {
            // Changing
            throw new RuntimeException("You can not change attributes of Stream once it has been persisted");
        }
        // Different Values
        if (!currentValue.equals(newValue)) {
            // Changing
            throw new RuntimeException("You can not change attributes of Stream once it has been persisted");
        }
        return newValue;

    }
The stream we are related to.
stroom-legacy/stroom-legacy-model_6_1/src/main/java/stroom/legacy/model_6_1/Stream.java