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>
Giventhe criteria updater describes how to perform update operations on sets of documents.
-
-
Field Summary
Fields Modifier and Type Field Description protected org.immutables.mongo.repository.internal.Constraints.ConstraintaddToSetFieldsprotected org.immutables.mongo.repository.internal.Constraints.ConstraintHostcriteriaprotected org.immutables.mongo.repository.internal.Constraints.ConstraintincrementFieldsprotected org.immutables.mongo.repository.internal.Constraints.ConstraintpullFieldsprotected org.immutables.mongo.repository.internal.Constraints.ConstraintpushFieldsprotected org.immutables.mongo.repository.Repositories.Repository<T>repositoryprotected org.immutables.mongo.repository.internal.Constraints.ConstraintsetFieldsprotected org.immutables.mongo.repository.internal.Constraints.ConstraintsetOnInsertFieldsprotected org.immutables.mongo.repository.internal.Constraints.ConstraintunsetFields
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description FormRepository.UpdateraddAllValueSets(Iterable<? extends FormValueSet> values)Add all of the given values to thevalueSetslist attribute.FormRepository.UpdateraddAllVariables(Iterable<? extends Variable> values)Add all of the given values to thevariableslist attribute.FormRepository.UpdateraddValueSets(FormValueSet value)Add a value to thevalueSetslist attribute.FormRepository.UpdateraddVariables(Variable value)Add a value to thevariableslist attribute.FormRepository.UpdaterclearData()Clear thedatamap attribute.FormRepository.UpdaterclearNamespaces()Clear thenamespacesmap attribute.FormRepository.UpdaterclearRequiredErrorText()Clear therequiredErrorTextmap attribute.FormRepository.UpdaterclearValueSets()Clear thevalueSetslist attribute.FormRepository.UpdaterclearVariables()Clear thevariableslist attribute.protected org.immutables.mongo.repository.internal.Constraints.ConstraintcollectRequiredUpdate()protected org.immutables.mongo.repository.internal.Constraints.ConstraintcollectUpdate()FormRepository.UpdaterinitId(String value)Specify an initial value for theidattribute.FormRepository.UpdaterinitMetadata(Form.Metadata value)Specify an initial value for themetadataattribute.FormRepository.UpdaterinitName(String value)Specify an initial value for thenameattribute.FormRepository.UpdaterinitRev(String value)Specify an initial value for therevattribute.FormRepository.UpdaterputData(String key, FormItem value)Put the given key and value into thedatamap attribute.FormRepository.UpdaterputNamespaces(String key, Form value)Put the given key and value into thenamespacesmap attribute.FormRepository.UpdaterputRequiredErrorText(String key, String value)Put the given key and value into therequiredErrorTextmap attribute.FormRepository.UpdaterremoveData(String key)Remove the key to value mapping from thedatamap attribute.FormRepository.UpdaterremoveNamespaces(String key)Remove the key to value mapping from thenamespacesmap attribute.FormRepository.UpdaterremoveRequiredErrorText(String key)Remove the key to value mapping from therequiredErrorTextmap attribute.FormRepository.UpdaterremoveValueSets(FormValueSet value)Remove a value from thevalueSetslist attribute.FormRepository.UpdaterremoveVariables(Variable value)Remove a value from thevariableslist attribute.FormRepository.UpdatersetId(String value)Specify a new value for theidattribute.FormRepository.UpdatersetMetadata(Form.Metadata value)Specify a new value for themetadataattribute.FormRepository.UpdatersetName(String value)Specify a new value for thenameattribute.FormRepository.UpdatersetRev(String value)Specify a new value for therevattribute.FormRepository.UpdatersetValueSets(Iterable<? extends FormValueSet> values)Override all values ofvalueSetslist attribute.FormRepository.UpdatersetVariables(Iterable<? extends Variable> values)Override all values ofvariableslist attribute.
-
-
-
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 FormRepository.Updater setId(String value)
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
public FormRepository.Updater initId(String value)
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
public FormRepository.Updater setRev(String value)
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
public FormRepository.Updater initRev(String value)
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
public FormRepository.Updater setName(String value)
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
public FormRepository.Updater initName(String value)
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
public FormRepository.Updater 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
public FormRepository.Updater putData(String key, FormItem value)
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
public FormRepository.Updater removeData(String key)
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
public FormRepository.Updater setMetadata(Form.Metadata value)
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
public FormRepository.Updater initMetadata(Form.Metadata value)
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
public FormRepository.Updater clearVariables()
Clear thevariableslist attribute.Corresponds to the MongoDB
$unsetoperator- Returns:
thisupdater to be used to complete the update operation
-
removeVariables
public FormRepository.Updater removeVariables(Variable value)
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
public FormRepository.Updater addVariables(Variable value)
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
public FormRepository.Updater setVariables(Iterable<? extends Variable> values)
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
public FormRepository.Updater addAllVariables(Iterable<? extends Variable> values)
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
public FormRepository.Updater 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
public FormRepository.Updater putNamespaces(String key, Form value)
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
public FormRepository.Updater removeNamespaces(String key)
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
public FormRepository.Updater clearValueSets()
Clear thevalueSetslist attribute.Corresponds to the MongoDB
$unsetoperator- Returns:
thisupdater to be used to complete the update operation
-
removeValueSets
public FormRepository.Updater removeValueSets(FormValueSet value)
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
public FormRepository.Updater addValueSets(FormValueSet value)
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
public FormRepository.Updater setValueSets(Iterable<? extends FormValueSet> values)
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
public FormRepository.Updater addAllValueSets(Iterable<? extends FormValueSet> values)
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
public FormRepository.Updater 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
public FormRepository.Updater putRequiredErrorText(String key, String value)
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
public FormRepository.Updater removeRequiredErrorText(String key)
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()
-
-