private int updateStatusWithId(final ExpressionOperator expression,
                                   final Status currentStatus,
                                   final Status newStatus,
                                   final long statusTime) {
        LOGGER.debug(() ->
                LogUtil.message("updateStatusWithId, expression: {}, currentStatus: {}, " +
                                "newStatus: {}, statusTime: {}",
                        expression, currentStatus, newStatus, LogUtil.instant(statusTime)));

        final byte newStatusId = MetaStatusId.getPrimitiveValue(newStatus);
        final Table<?> metaWithJoins = buildMeteWithOptionalJoins(expression);

        final Condition conditions = createUpdateStatusCondition(expression, currentStatus, newStatus);

        final DurationTimer durationTimer = DurationTimer.start();
        final Integer updateCount = JooqUtil.contextResult(metaDbConnProvider, context -> {
            // If expression is not targeting rows by ID then this is likely to create gap or next key locks
            // which will block ingest/processing.
            final var update = context.update(metaWithJoins)
                    .set(meta.STATUS, newStatusId)
                    .set(meta.STATUS_TIME, statusTime)
                    .where(conditions);

            LOGGER.trace("Update SQL:\n{}", update);

            return update.execute();
        });

        LOGGER.debug("Set the status of {} meta rows to {} in {}. Expression: {}",
                updateCount, newStatus, durationTimer, expression);

        return updateCount;
    }
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