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

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
     
     
    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
    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

    Methods inherited from class java.lang.Object

    equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • Properties

      public Properties()
  • Method Details

    • chained

      public Properties chained()
      Overrides:
      chained in class com.yahoo.processing.request.Properties
    • clone

      public Properties clone()
      Overrides:
      clone in class com.yahoo.processing.request.Properties
    • getParentQuery

      public Query getParentQuery()
      Returns the query owning this property object. Only guaranteed to work if this instance is accessible as query.properties()
    • setParentQuery

      public void setParentQuery(Query query)
      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.