blob: fa2304fa01e6d322cb9e9dffe7b68497039d534d (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.search.query.profile;
import com.yahoo.processing.request.CompoundName;
import com.yahoo.search.query.profile.types.FieldType;
import com.yahoo.search.query.properties.PropertyMap;
/**
* A map which stores all types which cannot be stored in a query profile
* that is rich model objects.
* <p>
* This map will deep copy not only the model object map, but also each
* clonable member in the map.
*
* @author bratseth
*/
public class ModelObjectMap extends PropertyMap {
/**
* Returns true if the class of the value is *not* acceptable as a query profile value,
* and therefore should be set in this.
*/
@Override
protected boolean shouldSet(CompoundName name, Object value) {
return value != null && ! FieldType.isLegalFieldValue(value);
}
}
|