public static <R extends UpdatableRecord<R>, T1, T2, T3> R tryCreate(final DataSource dataSource,
                                                                         final R record,
                                                                         final TableField<R, T1> keyField1,
                                                                         final TableField<R, T2> keyField2,
                                                                         final TableField<R, T3> keyField3,
                                                                         final Consumer<R> onCreateAction) {
        return contextResult(dataSource, context ->
                tryCreate(context, record, keyField1, keyField2, keyField3, onCreateAction));
    }
Tries to insert record into the database. If it doesn't already exist it will insert the
record and return the record updated with any auto-generated columns (e.g. ID).
If it already exists then the unique key violation will be swallowed and the keyField arguments
will be used to retrieve the existing record for return.
<p>
If you don't need the persisted state from the database then use
{@link JooqUtil#tryCreate(DSLContext, UpdatableRecord)} instead.
</p>

@param onCreateAction Called if the record does not already exist and is actually inserted.
@return The record containing the latest state in the database.
stroom-db-util/src/main/java/stroom/db/util/JooqUtil.java