Package com.mongodb.client.model
Class ValidationOptions
- java.lang.Object
-
- com.mongodb.client.model.ValidationOptions
-
@Deprecated(since="2021-05-27") public final class ValidationOptions extends java.lang.Object
Deprecated.Usage of this API is not supported in AEM as a Cloud Service.Validation options for documents being inserted or updated in a collection- Since:
- 3.2
-
-
Constructor Summary
Constructors Constructor Description ValidationOptions()
Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description ValidationAction
getValidationAction()
Deprecated.Gets theValidationAction
.ValidationLevel
getValidationLevel()
Deprecated.Gets theValidationLevel
that determines how strictly MongoDB applies the validation rules to existing documents during an insert or update.Bson
getValidator()
Deprecated.Gets the validation rules if set or null.java.lang.String
toString()
Deprecated.ValidationOptions
validationAction(ValidationAction validationAction)
Deprecated.Sets theValidationAction
that determines whether to error on invalid documents or just warn about the violations but allow invalid documents.ValidationOptions
validationLevel(ValidationLevel validationLevel)
Deprecated.Sets the validation level that determines how strictly MongoDB applies the validation rules to existing documents during an insert or update.ValidationOptions
validator(Bson validator)
Deprecated.Sets the validation rules for all
-
-
-
Method Detail
-
getValidator
@Nullable public Bson getValidator()
Deprecated.Gets the validation rules if set or null.- Returns:
- the validation rules if set or null
-
validator
public ValidationOptions validator(@Nullable Bson validator)
Deprecated.Sets the validation rules for all- Parameters:
validator
- the validation rules- Returns:
- this
-
getValidationLevel
@Nullable public ValidationLevel getValidationLevel()
Deprecated.Gets theValidationLevel
that determines how strictly MongoDB applies the validation rules to existing documents during an insert or update.- Returns:
- the ValidationLevel.
-
validationLevel
public ValidationOptions validationLevel(@Nullable ValidationLevel validationLevel)
Deprecated.Sets the validation level that determines how strictly MongoDB applies the validation rules to existing documents during an insert or update.- Parameters:
validationLevel
- the validation level- Returns:
- this
-
getValidationAction
@Nullable public ValidationAction getValidationAction()
Deprecated.Gets theValidationAction
.- Returns:
- the ValidationAction.
-
validationAction
public ValidationOptions validationAction(@Nullable ValidationAction validationAction)
Deprecated.Sets theValidationAction
that determines whether to error on invalid documents or just warn about the violations but allow invalid documents.- Parameters:
validationAction
- the validation action- Returns:
- this
-
toString
public java.lang.String toString()
Deprecated.- Overrides:
toString
in classjava.lang.Object
-
-