private User update(final DSLContext context, final User user) {
        LOGGER.debug("update - user: {}", user);
        final int count = context
                .update(STROOM_USER)
                .set(STROOM_USER.VERSION, STROOM_USER.VERSION.plus(1))
                .set(STROOM_USER.UPDATE_TIME_MS, user.getUpdateTimeMs())
                .set(STROOM_USER.UPDATE_USER, user.getUpdateUser())
                .set(STROOM_USER.NAME, user.getSubjectId())
                .set(STROOM_USER.UUID, user.getUuid())
                .set(STROOM_USER.IS_GROUP, user.isGroup())
                .set(STROOM_USER.ENABLED, user.isEnabled())
                .set(STROOM_USER.DISPLAY_NAME, getDisplayNameOrSubjectId(user))
                .set(STROOM_USER.FULL_NAME, user.getFullName())
                .where(STROOM_USER.ID.eq(user.getId()))
                .and(STROOM_USER.VERSION.eq(user.getVersion()))
                .execute();

        if (count == 0) {
            throw new DataChangedException("Failed to update user, " +
                                           "it may have been updated by another user or deleted");
        }

        insertOrUpdateStroomUserArchiveRecord(context, user.getUuid());

        return getByUuid(context, user.getUuid()).orElseThrow(() ->
                new RuntimeException("Error fetching updated user"));
    }
Get user or group by their UUID.
stroom-security/stroom-security-impl-db/src/main/java/stroom/security/impl/db/UserDaoImpl.java