Class TableWriteUtils

java.lang.Object
com.kingsrook.qqq.middleware.javalin.executors.utils.TableWriteUtils

public class TableWriteUtils extends Object
Shared behavior of the v1 table insert and update executors, matching the legacy data routes.
  • Constructor Details

    • TableWriteUtils

      public TableWriteUtils()
  • Method Details

    • recordToWrite

      public static QRecord recordToWrite(String tableName, QRecord record, Map<String,Serializable> recordValues)
      The record to write: the one the spec read from the request, or one built from plain field values.
    • throwIfRecordErrors

      public static void throwIfRecordErrors(String verb, String tableName, QRecord outputRecord) throws QUserFacingException
      Refuse a write whose record came back with errors: a bad request when every error is bad input (for example a missing required value), otherwise a user-facing error - with the legacy message ("Error inserting Person: ...").
      Throws:
      QUserFacingException