Package com.yahoo.search.query
Class Properties
java.lang.Object
com.yahoo.processing.request.Properties
com.yahoo.search.query.Properties
- All Implemented Interfaces:
Cloneable
- Direct Known Subclasses:
DefaultProperties
,PropertyAliases
,PropertyMap
,QueryProfileProperties
,QueryProperties
,RankProfileInputProperties
,RequestContextProperties
,SubProperties
public abstract class Properties
extends com.yahoo.processing.request.Properties
Object properties keyed by name which can be looked up using default values and
with conversion to various primitive wrapper types.
Multiple property implementations can be chained to provide unified access to properties backed by multiple sources as a Chain of Responsibility.
For better performance, prefer CompoundName argument constants over Strings.
Properties can be cloned. Cloning a properties instance returns a new instance which chains new instances of all chained instances. The content within each instance is cloned to the extent determined appropriate by that implementation.
This base class simply passes all access on to the next in chain.
- Author:
- bratseth
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionchained()
clone()
Returns the query owning this property object.void
requireSettable
(com.yahoo.processing.request.CompoundName name, Object value, Map<String, String> context) Throws IllegalInputException if the given key cannot be set to the given value.void
setParentQuery
(Query query) Invoked during deep cloning of the parent query.Methods inherited from class com.yahoo.processing.request.Properties
asBoolean, asDouble, asInteger, asLong, asString, chain, clearAll, clearAll, clearAll, clearAll, clone, cloneMap, get, get, get, get, get, get, get, get, getBoolean, getBoolean, getBoolean, getBoolean, getDouble, getDouble, getDouble, getDouble, getInstance, getInteger, getInteger, getInteger, getInteger, getLong, getLong, getLong, getLong, getString, getString, getString, getString, listProperties, listProperties, listProperties, listProperties, listProperties, listProperties, listProperties, listProperties, set, set, set, set
-
Constructor Details
-
Properties
public Properties()
-
-
Method Details
-
chained
- Overrides:
chained
in classcom.yahoo.processing.request.Properties
-
clone
- Overrides:
clone
in classcom.yahoo.processing.request.Properties
-
getParentQuery
Returns the query owning this property object. Only guaranteed to work if this instance is accessible as query.properties() -
setParentQuery
Invoked during deep cloning of the parent query. -
requireSettable
public void requireSettable(com.yahoo.processing.request.CompoundName name, Object value, Map<String, String> context) Throws IllegalInputException if the given key cannot be set to the given value. This default implementation just passes to the chained properties, if any.
-