Search in sources :

Example 1 with MappedFieldNameValidator

use of com.mongodb.internal.validator.MappedFieldNameValidator in project mongo-java-driver by mongodb.

the class FindAndReplaceOperation method getValidator.

private FieldNameValidator getValidator() {
    Map<String, FieldNameValidator> map = new HashMap<String, FieldNameValidator>();
    map.put("update", new CollectibleDocumentFieldNameValidator());
    return new MappedFieldNameValidator(new NoOpFieldNameValidator(), map);
}
Also used : NoOpFieldNameValidator(com.mongodb.internal.validator.NoOpFieldNameValidator) HashMap(java.util.HashMap) MappedFieldNameValidator(com.mongodb.internal.validator.MappedFieldNameValidator) BsonString(org.bson.BsonString) CollectibleDocumentFieldNameValidator(com.mongodb.internal.validator.CollectibleDocumentFieldNameValidator) NoOpFieldNameValidator(com.mongodb.internal.validator.NoOpFieldNameValidator) MappedFieldNameValidator(com.mongodb.internal.validator.MappedFieldNameValidator) FieldNameValidator(org.bson.FieldNameValidator) CollectibleDocumentFieldNameValidator(com.mongodb.internal.validator.CollectibleDocumentFieldNameValidator)

Example 2 with MappedFieldNameValidator

use of com.mongodb.internal.validator.MappedFieldNameValidator in project mongo-java-driver by mongodb.

the class UpdateCommandMessage method getFieldNameValidator.

@Override
protected FieldNameValidator getFieldNameValidator() {
    Map<String, FieldNameValidator> rootMap = new HashMap<String, FieldNameValidator>();
    rootMap.put("updates", new UpdatesValidator());
    return new MappedFieldNameValidator(new NoOpFieldNameValidator(), rootMap);
}
Also used : NoOpFieldNameValidator(com.mongodb.internal.validator.NoOpFieldNameValidator) HashMap(java.util.HashMap) MappedFieldNameValidator(com.mongodb.internal.validator.MappedFieldNameValidator) UpdateFieldNameValidator(com.mongodb.internal.validator.UpdateFieldNameValidator) CollectibleDocumentFieldNameValidator(com.mongodb.internal.validator.CollectibleDocumentFieldNameValidator) NoOpFieldNameValidator(com.mongodb.internal.validator.NoOpFieldNameValidator) MappedFieldNameValidator(com.mongodb.internal.validator.MappedFieldNameValidator) FieldNameValidator(org.bson.FieldNameValidator)

Example 3 with MappedFieldNameValidator

use of com.mongodb.internal.validator.MappedFieldNameValidator in project mongo-java-driver by mongodb.

the class FindAndUpdateOperation method getValidator.

private FieldNameValidator getValidator() {
    Map<String, FieldNameValidator> map = new HashMap<String, FieldNameValidator>();
    map.put("update", new UpdateFieldNameValidator());
    return new MappedFieldNameValidator(new NoOpFieldNameValidator(), map);
}
Also used : NoOpFieldNameValidator(com.mongodb.internal.validator.NoOpFieldNameValidator) HashMap(java.util.HashMap) MappedFieldNameValidator(com.mongodb.internal.validator.MappedFieldNameValidator) BsonString(org.bson.BsonString) NoOpFieldNameValidator(com.mongodb.internal.validator.NoOpFieldNameValidator) MappedFieldNameValidator(com.mongodb.internal.validator.MappedFieldNameValidator) FieldNameValidator(org.bson.FieldNameValidator) UpdateFieldNameValidator(com.mongodb.internal.validator.UpdateFieldNameValidator) UpdateFieldNameValidator(com.mongodb.internal.validator.UpdateFieldNameValidator)

Example 4 with MappedFieldNameValidator

use of com.mongodb.internal.validator.MappedFieldNameValidator in project mongo-java-driver by mongodb.

the class InsertCommandMessage method getFieldNameValidator.

@Override
protected FieldNameValidator getFieldNameValidator() {
    Map<String, FieldNameValidator> map = new HashMap<String, FieldNameValidator>();
    map.put("documents", new CollectibleDocumentFieldNameValidator());
    return new MappedFieldNameValidator(new NoOpFieldNameValidator(), map);
}
Also used : NoOpFieldNameValidator(com.mongodb.internal.validator.NoOpFieldNameValidator) HashMap(java.util.HashMap) MappedFieldNameValidator(com.mongodb.internal.validator.MappedFieldNameValidator) CollectibleDocumentFieldNameValidator(com.mongodb.internal.validator.CollectibleDocumentFieldNameValidator) NoOpFieldNameValidator(com.mongodb.internal.validator.NoOpFieldNameValidator) MappedFieldNameValidator(com.mongodb.internal.validator.MappedFieldNameValidator) FieldNameValidator(org.bson.FieldNameValidator) CollectibleDocumentFieldNameValidator(com.mongodb.internal.validator.CollectibleDocumentFieldNameValidator)

Aggregations

MappedFieldNameValidator (com.mongodb.internal.validator.MappedFieldNameValidator)4 NoOpFieldNameValidator (com.mongodb.internal.validator.NoOpFieldNameValidator)4 HashMap (java.util.HashMap)4 FieldNameValidator (org.bson.FieldNameValidator)4 CollectibleDocumentFieldNameValidator (com.mongodb.internal.validator.CollectibleDocumentFieldNameValidator)3 UpdateFieldNameValidator (com.mongodb.internal.validator.UpdateFieldNameValidator)2 BsonString (org.bson.BsonString)2