Class QuestionnaireRepository.Updater

  • Enclosing class:
    QuestionnaireRepository

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

      • 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<T extends Object> repository
    • Method Detail

      • setId

        public QuestionnaireRepository.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 QuestionnaireRepository.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 QuestionnaireRepository.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 QuestionnaireRepository.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
      • clearAnswers

        public QuestionnaireRepository.Updater clearAnswers()
        Clear the answers list attribute.

        Corresponds to the MongoDB $unset operator

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

        public QuestionnaireRepository.Updater removeAnswers​(Answer value)
        Remove a value from the answers 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
      • addAnswers

        public QuestionnaireRepository.Updater addAnswers​(Answer value)
        Add a value to the answers 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
      • setAnswers

        public QuestionnaireRepository.Updater setAnswers​(Iterable<? extends Answer> values)
        Override all values of answers 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
      • addAllAnswers

        public QuestionnaireRepository.Updater addAllAnswers​(Iterable<? extends Answer> values)
        Add all of the given values to the answers 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
      • clearContext

        public QuestionnaireRepository.Updater clearContext()
        Clear the context list attribute.

        Corresponds to the MongoDB $unset operator

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

        public QuestionnaireRepository.Updater removeContext​(ContextValue value)
        Remove a value from the context 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
      • addContext

        public QuestionnaireRepository.Updater addContext​(ContextValue value)
        Add a value to the context 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
      • setContext

        public QuestionnaireRepository.Updater setContext​(Iterable<? extends ContextValue> values)
        Override all values of context 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
      • addAllContext

        public QuestionnaireRepository.Updater addAllContext​(Iterable<? extends ContextValue> values)
        Add all of the given values to the context 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
      • setActiveItem

        public QuestionnaireRepository.Updater setActiveItem​(String value)
        Specify a new value for the activeItem attribute.

        Corresponds to the MongoDB $set operator.

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

        public QuestionnaireRepository.Updater initActiveItem​(String value)
        Specify an initial value for the activeItem 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 activeItem value for an insert.
        Returns:
        this updater to be used to complete the update operation
      • clearErrors

        public QuestionnaireRepository.Updater clearErrors()
        Clear the errors list attribute.

        Corresponds to the MongoDB $unset operator

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

        public QuestionnaireRepository.Updater removeErrors​(Error value)
        Remove a value from the errors 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
      • addErrors

        public QuestionnaireRepository.Updater addErrors​(Error value)
        Add a value to the errors 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
      • setErrors

        public QuestionnaireRepository.Updater setErrors​(Iterable<? extends Error> values)
        Override all values of errors 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
      • addAllErrors

        public QuestionnaireRepository.Updater addAllErrors​(Iterable<? extends Error> values)
        Add all of the given values to the errors 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
      • clearVariableValues

        public QuestionnaireRepository.Updater clearVariableValues()
        Clear the variableValues list attribute.

        Corresponds to the MongoDB $unset operator

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

        public QuestionnaireRepository.Updater removeVariableValues​(VariableValue value)
        Remove a value from the variableValues 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
      • addVariableValues

        public QuestionnaireRepository.Updater addVariableValues​(VariableValue value)
        Add a value to the variableValues 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
      • setVariableValues

        public QuestionnaireRepository.Updater setVariableValues​(Iterable<? extends VariableValue> values)
        Override all values of variableValues 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
      • addAllVariableValues

        public QuestionnaireRepository.Updater addAllVariableValues​(Iterable<? extends VariableValue> values)
        Add all of the given values to the variableValues 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
      • clearValueSets

        public QuestionnaireRepository.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 QuestionnaireRepository.Updater removeValueSets​(ValueSet 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 QuestionnaireRepository.Updater addValueSets​(ValueSet 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 QuestionnaireRepository.Updater setValueSets​(Iterable<? extends ValueSet> 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 QuestionnaireRepository.Updater addAllValueSets​(Iterable<? extends ValueSet> 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
      • setMetadata

        public QuestionnaireRepository.Updater setMetadata​(Questionnaire.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 QuestionnaireRepository.Updater initMetadata​(Questionnaire.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
      • collectRequiredUpdate

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

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