Class SpeedyUpdateRequestBuilder<T>

java.lang.Object
com.github.silent.samurai.speedy.api.client.builder.SpeedyUpdateRequestBuilder<T>

public class SpeedyUpdateRequestBuilder<T> extends Object
  • Constructor Details

    • SpeedyUpdateRequestBuilder

      public SpeedyUpdateRequestBuilder(String entityName, SpeedyApi<T> speedyApi)
  • Method Details

    • key

      public SpeedyUpdateRequestBuilder<T> key(String field, Object value)
      Add a key field (typically for identifying the record to update).
      Parameters:
      field - the field name
      value - the field value
      Returns:
      this builder instance
    • field

      public SpeedyUpdateRequestBuilder<T> field(String field, Object value)
      Add a field to be updated.
      Parameters:
      field - the field name
      value - the field value
      Returns:
      this builder instance
    • build

      public SpeedyUpdateRequest build()
      Build the SpeedyUpdateRequest without executing it.
      Returns:
      the constructed SpeedyUpdateRequest
    • execute

      public T execute() throws Exception
      Build and execute the update request using the configured SpeedyApi.
      Returns:
      the response from the API
      Throws:
      Exception