Class FormRepository.Updater
- Enclosing class:
- FormRepository
Given the criteria updater describes how to perform
update operations on sets of documents.-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected org.immutables.mongo.repository.internal.Constraints.Constraintprotected org.immutables.mongo.repository.internal.Constraints.ConstraintHostprotected org.immutables.mongo.repository.internal.Constraints.Constraintprotected org.immutables.mongo.repository.internal.Constraints.Constraintprotected org.immutables.mongo.repository.internal.Constraints.Constraintprotected final org.immutables.mongo.repository.Repositories.Repository<Form>protected org.immutables.mongo.repository.internal.Constraints.Constraintprotected org.immutables.mongo.repository.internal.Constraints.Constraintprotected org.immutables.mongo.repository.internal.Constraints.Constraint -
Method Summary
Modifier and TypeMethodDescriptionaddAllValueSets(Iterable<? extends FormValueSet> values) Add all of the given values to thevalueSetslist attribute.addAllVariables(Iterable<? extends Variable> values) Add all of the given values to thevariableslist attribute.addValueSets(FormValueSet value) Add a value to thevalueSetslist attribute.addVariables(Variable value) Add a value to thevariableslist attribute.Clear thedatamap attribute.Clear thenamespacesmap attribute.Clear therequiredErrorTextmap attribute.Clear thevalueSetslist attribute.Clear thevariableslist attribute.protected org.immutables.mongo.repository.internal.Constraints.Constraintprotected org.immutables.mongo.repository.internal.Constraints.ConstraintSpecify an initial value for theidattribute.initMetadata(Form.Metadata value) Specify an initial value for themetadataattribute.Specify an initial value for thenameattribute.Specify an initial value for therevattribute.Put the given key and value into thedatamap attribute.putNamespaces(String key, Form value) Put the given key and value into thenamespacesmap attribute.putRequiredErrorText(String key, String value) Put the given key and value into therequiredErrorTextmap attribute.removeData(String key) Remove the key to value mapping from thedatamap attribute.removeNamespaces(String key) Remove the key to value mapping from thenamespacesmap attribute.Remove the key to value mapping from therequiredErrorTextmap attribute.removeValueSets(FormValueSet value) Remove a value from thevalueSetslist attribute.removeVariables(Variable value) Remove a value from thevariableslist attribute.Specify a new value for theidattribute.setMetadata(Form.Metadata value) Specify a new value for themetadataattribute.Specify a new value for thenameattribute.Specify a new value for therevattribute.setValueSets(Iterable<? extends FormValueSet> values) Override all values ofvalueSetslist attribute.setVariables(Iterable<? extends Variable> values) Override all values ofvariableslist attribute.Methods inherited from class org.immutables.mongo.repository.Repositories.Updater
updateAll, updateFirst, upsert
-
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
-
-
Method Details
-
setId
Specify a new value for theidattribute.Corresponds to the MongoDB
$setoperator.- Parameters:
value- A new value for theidattribute- Returns:
thisupdater to be used to complete the update operation
-
initId
Specify an initial value for theidattribute. 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
$setOnInsertoperator.- Parameters:
value- Theidvalue for an insert.- Returns:
thisupdater to be used to complete the update operation
-
setRev
Specify a new value for therevattribute.Corresponds to the MongoDB
$setoperator.- Parameters:
value- A new value for therevattribute- Returns:
thisupdater to be used to complete the update operation
-
initRev
Specify an initial value for therevattribute. 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
$setOnInsertoperator.- Parameters:
value- Therevvalue for an insert.- Returns:
thisupdater to be used to complete the update operation
-
setName
Specify a new value for thenameattribute.Corresponds to the MongoDB
$setoperator.- Parameters:
value- A new value for thenameattribute- Returns:
thisupdater to be used to complete the update operation
-
initName
Specify an initial value for thenameattribute. 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
$setOnInsertoperator.- Parameters:
value- Thenamevalue for an insert.- Returns:
thisupdater to be used to complete the update operation
-
clearData
Clear thedatamap attribute.Corresponds to the MongoDB
$setoperator, used to reset to empty object- Returns:
thisupdater to be used to complete the update operation
-
putData
Put the given key and value into thedatamap attribute.Corresponds to the MongoDB
$setoperator for nested objects- Parameters:
key- The keyvalue- The value- Returns:
thisupdater to be used to complete the update operation
-
removeData
Remove the key to value mapping from thedatamap attribute.Corresponds to MongoDB
$unsetoperator for nested objects- Parameters:
key- The key- Returns:
thisupdater to be used to complete the update operation
-
setMetadata
Specify a new value for themetadataattribute.Corresponds to the MongoDB
$setoperator.- Parameters:
value- A new value for themetadataattribute- Returns:
thisupdater to be used to complete the update operation
-
initMetadata
Specify an initial value for themetadataattribute. 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
$setOnInsertoperator.- Parameters:
value- Themetadatavalue for an insert.- Returns:
thisupdater to be used to complete the update operation
-
clearVariables
Clear thevariableslist attribute.Corresponds to the MongoDB
$unsetoperator- Returns:
thisupdater to be used to complete the update operation
-
removeVariables
Remove a value from thevariableslist attribute.Corresponds to the MongoDB
$pulloperator.- Parameters:
value- The value to remove- Returns:
thisupdater to be used to complete the update operation
-
addVariables
Add a value to thevariableslist attribute.Corresponds to the MongoDB
$pushoperator.- Parameters:
value- The value to add- Returns:
thisupdater to be used to complete the update operation
-
setVariables
Override all values ofvariableslist attribute.Corresponds to the MongoDB
$setoperator on the array field.- Parameters:
values- The values to set- Returns:
thisupdater to be used to complete the update operation
-
addAllVariables
Add all of the given values to thevariableslist attribute.Corresponds to the MongoDB
$pushoperator with the$eachmodifier.- Parameters:
values- The values to add- Returns:
thisupdater to be used to complete the update operation
-
clearNamespaces
Clear thenamespacesmap attribute.Corresponds to the MongoDB
$setoperator, used to reset to empty object- Returns:
thisupdater to be used to complete the update operation
-
putNamespaces
Put the given key and value into thenamespacesmap attribute.Corresponds to the MongoDB
$setoperator for nested objects- Parameters:
key- The keyvalue- The value- Returns:
thisupdater to be used to complete the update operation
-
removeNamespaces
Remove the key to value mapping from thenamespacesmap attribute.Corresponds to MongoDB
$unsetoperator for nested objects- Parameters:
key- The key- Returns:
thisupdater to be used to complete the update operation
-
clearValueSets
Clear thevalueSetslist attribute.Corresponds to the MongoDB
$unsetoperator- Returns:
thisupdater to be used to complete the update operation
-
removeValueSets
Remove a value from thevalueSetslist attribute.Corresponds to the MongoDB
$pulloperator.- Parameters:
value- The value to remove- Returns:
thisupdater to be used to complete the update operation
-
addValueSets
Add a value to thevalueSetslist attribute.Corresponds to the MongoDB
$pushoperator.- Parameters:
value- The value to add- Returns:
thisupdater to be used to complete the update operation
-
setValueSets
Override all values ofvalueSetslist attribute.Corresponds to the MongoDB
$setoperator on the array field.- Parameters:
values- The values to set- Returns:
thisupdater to be used to complete the update operation
-
addAllValueSets
Add all of the given values to thevalueSetslist attribute.Corresponds to the MongoDB
$pushoperator with the$eachmodifier.- Parameters:
values- The values to add- Returns:
thisupdater to be used to complete the update operation
-
clearRequiredErrorText
Clear therequiredErrorTextmap attribute.Corresponds to the MongoDB
$setoperator, used to reset to empty object- Returns:
thisupdater to be used to complete the update operation
-
putRequiredErrorText
Put the given key and value into therequiredErrorTextmap attribute.Corresponds to the MongoDB
$setoperator for nested objects- Parameters:
key- The keyvalue- The value- Returns:
thisupdater to be used to complete the update operation
-
removeRequiredErrorText
Remove the key to value mapping from therequiredErrorTextmap attribute.Corresponds to MongoDB
$unsetoperator for nested objects- Parameters:
key- The key- Returns:
thisupdater 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()
-