Class FormRepository.Updater

java.lang.Object
org.immutables.mongo.repository.Repositories.Updater<Form>
io.dialob.api.form.FormRepository.Updater
Enclosing class:
FormRepository

@NotThreadSafe public static final class FormRepository.Updater extends org.immutables.mongo.repository.Repositories.Updater<Form>
Given the criteria updater describes how to perform update operations on sets of documents.
  • Field Details

    • criteria

      @Nullable protected org.immutables.mongo.repository.internal.Constraints.ConstraintHost criteria
    • setFields

      protected org.immutables.mongo.repository.internal.Constraints.Constraint setFields
    • setOnInsertFields

      protected org.immutables.mongo.repository.internal.Constraints.Constraint setOnInsertFields
    • incrementFields

      protected org.immutables.mongo.repository.internal.Constraints.Constraint incrementFields
    • addToSetFields

      protected org.immutables.mongo.repository.internal.Constraints.Constraint addToSetFields
    • pushFields

      protected org.immutables.mongo.repository.internal.Constraints.Constraint pushFields
    • pullFields

      protected org.immutables.mongo.repository.internal.Constraints.Constraint pullFields
    • unsetFields

      protected org.immutables.mongo.repository.internal.Constraints.Constraint unsetFields
    • repository

      protected final org.immutables.mongo.repository.Repositories.Repository<Form> repository
  • Method Details

    • setId

      public FormRepository.Updater setId(String value)
      Specify a new value for the id attribute.

      Corresponds to the MongoDB $set operator.

      Parameters:
      value - A new value for the id attribute
      Returns:
      this updater to be used to complete the update operation
    • initId

      public FormRepository.Updater initId(String value)
      Specify an initial value for the id attribute. The value will be used if the document is to be inserted. If one or more documents are found for an update, this value will not be used.

      Corresponds to the MongoDB $setOnInsert operator.

      Parameters:
      value - The id value for an insert.
      Returns:
      this updater to be used to complete the update operation
    • setRev

      public FormRepository.Updater setRev(String value)
      Specify a new value for the rev attribute.

      Corresponds to the MongoDB $set operator.

      Parameters:
      value - A new value for the rev attribute
      Returns:
      this updater to be used to complete the update operation
    • initRev

      public FormRepository.Updater initRev(String value)
      Specify an initial value for the rev attribute. The value will be used if the document is to be inserted. If one or more documents are found for an update, this value will not be used.

      Corresponds to the MongoDB $setOnInsert operator.

      Parameters:
      value - The rev value for an insert.
      Returns:
      this updater to be used to complete the update operation
    • setName

      public FormRepository.Updater setName(String value)
      Specify a new value for the name attribute.

      Corresponds to the MongoDB $set operator.

      Parameters:
      value - A new value for the name attribute
      Returns:
      this updater to be used to complete the update operation
    • initName

      public FormRepository.Updater initName(String value)
      Specify an initial value for the name attribute. The value will be used if the document is to be inserted. If one or more documents are found for an update, this value will not be used.

      Corresponds to the MongoDB $setOnInsert operator.

      Parameters:
      value - The name value for an insert.
      Returns:
      this updater to be used to complete the update operation
    • clearData

      public FormRepository.Updater clearData()
      Clear the data map attribute.

      Corresponds to the MongoDB $set operator, used to reset to empty object

      Returns:
      this updater to be used to complete the update operation
    • putData

      public FormRepository.Updater putData(String key, FormItem value)
      Put the given key and value into the data map attribute.

      Corresponds to the MongoDB $set operator for nested objects

      Parameters:
      key - The key
      value - The value
      Returns:
      this updater to be used to complete the update operation
    • removeData

      public FormRepository.Updater removeData(String key)
      Remove the key to value mapping from the data map attribute.

      Corresponds to MongoDB $unset operator for nested objects

      Parameters:
      key - The key
      Returns:
      this updater to be used to complete the update operation
    • setMetadata

      public FormRepository.Updater setMetadata(Form.Metadata value)
      Specify a new value for the metadata attribute.

      Corresponds to the MongoDB $set operator.

      Parameters:
      value - A new value for the metadata attribute
      Returns:
      this updater to be used to complete the update operation
    • initMetadata

      public FormRepository.Updater initMetadata(Form.Metadata value)
      Specify an initial value for the metadata attribute. The value will be used if the document is to be inserted. If one or more documents are found for an update, this value will not be used.

      Corresponds to the MongoDB $setOnInsert operator.

      Parameters:
      value - The metadata value for an insert.
      Returns:
      this updater to be used to complete the update operation
    • clearVariables

      public FormRepository.Updater clearVariables()
      Clear the variables list attribute.

      Corresponds to the MongoDB $unset operator

      Returns:
      this updater to be used to complete the update operation
    • removeVariables

      public FormRepository.Updater removeVariables(Variable value)
      Remove a value from the variables list attribute.

      Corresponds to the MongoDB $pull operator.

      Parameters:
      value - The value to remove
      Returns:
      this updater to be used to complete the update operation
    • addVariables

      public FormRepository.Updater addVariables(Variable value)
      Add a value to the variables list attribute.

      Corresponds to the MongoDB $push operator.

      Parameters:
      value - The value to add
      Returns:
      this updater to be used to complete the update operation
    • setVariables

      public FormRepository.Updater setVariables(Iterable<? extends Variable> values)
      Override all values of variables list attribute.

      Corresponds to the MongoDB $set operator on the array field.

      Parameters:
      values - The values to set
      Returns:
      this updater to be used to complete the update operation
    • addAllVariables

      public FormRepository.Updater addAllVariables(Iterable<? extends Variable> values)
      Add all of the given values to the variables list attribute.

      Corresponds to the MongoDB $push operator with the $each modifier.

      Parameters:
      values - The values to add
      Returns:
      this updater to be used to complete the update operation
    • clearNamespaces

      public FormRepository.Updater clearNamespaces()
      Clear the namespaces map attribute.

      Corresponds to the MongoDB $set operator, used to reset to empty object

      Returns:
      this updater to be used to complete the update operation
    • putNamespaces

      public FormRepository.Updater putNamespaces(String key, Form value)
      Put the given key and value into the namespaces map attribute.

      Corresponds to the MongoDB $set operator for nested objects

      Parameters:
      key - The key
      value - The value
      Returns:
      this updater to be used to complete the update operation
    • removeNamespaces

      public FormRepository.Updater removeNamespaces(String key)
      Remove the key to value mapping from the namespaces map attribute.

      Corresponds to MongoDB $unset operator for nested objects

      Parameters:
      key - The key
      Returns:
      this updater to be used to complete the update operation
    • clearValueSets

      public FormRepository.Updater clearValueSets()
      Clear the valueSets list attribute.

      Corresponds to the MongoDB $unset operator

      Returns:
      this updater to be used to complete the update operation
    • removeValueSets

      public FormRepository.Updater removeValueSets(FormValueSet value)
      Remove a value from the valueSets list attribute.

      Corresponds to the MongoDB $pull operator.

      Parameters:
      value - The value to remove
      Returns:
      this updater to be used to complete the update operation
    • addValueSets

      public FormRepository.Updater addValueSets(FormValueSet value)
      Add a value to the valueSets list attribute.

      Corresponds to the MongoDB $push operator.

      Parameters:
      value - The value to add
      Returns:
      this updater to be used to complete the update operation
    • setValueSets

      public FormRepository.Updater setValueSets(Iterable<? extends FormValueSet> values)
      Override all values of valueSets list attribute.

      Corresponds to the MongoDB $set operator on the array field.

      Parameters:
      values - The values to set
      Returns:
      this updater to be used to complete the update operation
    • addAllValueSets

      public FormRepository.Updater addAllValueSets(Iterable<? extends FormValueSet> values)
      Add all of the given values to the valueSets list attribute.

      Corresponds to the MongoDB $push operator with the $each modifier.

      Parameters:
      values - The values to add
      Returns:
      this updater to be used to complete the update operation
    • clearRequiredErrorText

      public FormRepository.Updater clearRequiredErrorText()
      Clear the requiredErrorText map attribute.

      Corresponds to the MongoDB $set operator, used to reset to empty object

      Returns:
      this updater to be used to complete the update operation
    • putRequiredErrorText

      public FormRepository.Updater putRequiredErrorText(String key, String value)
      Put the given key and value into the requiredErrorText map attribute.

      Corresponds to the MongoDB $set operator for nested objects

      Parameters:
      key - The key
      value - The value
      Returns:
      this updater to be used to complete the update operation
    • removeRequiredErrorText

      public FormRepository.Updater removeRequiredErrorText(String key)
      Remove the key to value mapping from the requiredErrorText map attribute.

      Corresponds to MongoDB $unset operator for nested objects

      Parameters:
      key - The key
      Returns:
      this updater to be used to complete the update operation
    • collectRequiredUpdate

      protected org.immutables.mongo.repository.internal.Constraints.Constraint collectRequiredUpdate()
    • collectUpdate

      protected org.immutables.mongo.repository.internal.Constraints.Constraint collectUpdate()