private Condition createUpdateStatusCondition(final ExpressionOperator expression,
                                                  final Status currentStatus,
                                                  final Status newStatus) {

        Objects.requireNonNull(newStatus, "New status is null");
        if (Objects.equals(newStatus, currentStatus)) {
            // The status is not being updated.
            throw new RuntimeException("New and current status are equal");
        }

        final Condition criteriaCondition = expressionMapper.apply(expression);
        final Condition statusCondition = getStatusCondition(currentStatus, newStatus);
        return JooqUtil.andConditions(criteriaCondition, statusCondition);
    }
Method currently only here for test purposes as a means of bulk loading data.
stroom-meta/stroom-meta-impl-db/src/main/java/stroom/meta/impl/db/MetaDaoImpl.java