Package com.yahoo.search.query.profile
Class OverridableQueryProfile
- java.lang.Object
-
- com.yahoo.component.AbstractComponent
-
- com.yahoo.component.provider.FreezableSimpleComponent
-
- com.yahoo.search.query.profile.QueryProfile
-
- com.yahoo.search.query.profile.OverridableQueryProfile
-
- All Implemented Interfaces:
com.yahoo.component.Component
,com.yahoo.component.Deconstructable
,com.yahoo.component.provider.Freezable
,java.lang.Cloneable
,java.lang.Comparable<com.yahoo.component.Component>
- Direct Known Subclasses:
BackedOverridableQueryProfile
public class OverridableQueryProfile extends QueryProfile
A regular query profile which knows it is storing overrides (not configured profiles) and that implements override legality checking.- Author:
- bratseth
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
OverridableQueryProfile()
Creates an unbacked overridable query profileprotected
OverridableQueryProfile(java.lang.String sourceName)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.lang.Object
checkAndConvertAssignment(java.lang.String localName, java.lang.Object inputValue, QueryProfileRegistry registry)
Converts to the type of the receiving field, if possible and necessary.OverridableQueryProfile
clone()
Returns a clone of this which can be independently overriddenprotected QueryProfile
createSubProfile(java.lang.String name, DimensionBinding binding)
Looks up all inherited profiles and adds any that matches this name.java.lang.String
toString()
-
Methods inherited from class com.yahoo.search.query.profile.QueryProfile
accept, addInherited, addInherited, addInherited, compile, convertToSubstitutionString, declaredContent, freeze, get, get, get, get, get, get, get, getContent, getContent, getDimensions, getFieldDescription, getSource, getType, getValue, getVariants, inherited, isDeclaredOverridable, isExplicit, isLocalInstanceOverridable, listValues, listValues, listValues, listValues, listValues, localLookup, lookup, lookup, set, set, set, set, set, set, setDimensions, setLocalNode, setOverridable, setOverridable, setType, setValue, validateName, visitInherited, visitVariants
-
Methods inherited from class com.yahoo.component.provider.FreezableSimpleComponent
ensureNotFrozen, isFrozen
-
-
-
-
Method Detail
-
checkAndConvertAssignment
protected java.lang.Object checkAndConvertAssignment(java.lang.String localName, java.lang.Object inputValue, QueryProfileRegistry registry)
Description copied from class:QueryProfile
Converts to the type of the receiving field, if possible and necessary.- Overrides:
checkAndConvertAssignment
in classQueryProfile
- Returns:
- the value to be assigned: the original or a converted value
-
createSubProfile
protected QueryProfile createSubProfile(java.lang.String name, DimensionBinding binding)
Description copied from class:QueryProfile
Looks up all inherited profiles and adds any that matches this name. This default implementation returns an empty profile.- Overrides:
createSubProfile
in classQueryProfile
-
clone
public OverridableQueryProfile clone()
Returns a clone of this which can be independently overridden- Overrides:
clone
in classQueryProfile
-
toString
public java.lang.String toString()
- Overrides:
toString
in classQueryProfile
-
-