Class BackedOverridableQueryProfile

  • All Implemented Interfaces:,, java.lang.Cloneable, java.lang.Comparable<>

    public class BackedOverridableQueryProfile
    extends OverridableQueryProfile
    implements java.lang.Cloneable

    A wrapper of a query profile where overrides to the values in the referenced profile can be set.

    This is used to allow configured overrides (in a particular referencing profile) of a referenced query profile.

    Properties which are defined as not overridable in the type (if any) of the referenced query profile cannot be set.

    • Constructor Detail

      • BackedOverridableQueryProfile

        public BackedOverridableQueryProfile​(QueryProfile backingProfile)
        Creates an overridable profile from the given backing profile. The backing profile will never be written to.
        backingProfile - the backing profile, which is assumed read only, never null
    • Method Detail

      • freeze

        public void freeze()
        Description copied from class: QueryProfile
        Switches this from write-only to read-only mode. This profile can never be modified again after this method returns. Calling this on an already frozen profile has no effect.

        Calling this will also freeze any profiles inherited and referenced by this.

        Specified by:
        freeze in interface
        freeze in class QueryProfile
      • localLookup

        protected java.lang.Object localLookup​(java.lang.String localName,
                                               DimensionBinding dimensionBinding)
        Description copied from class: QueryProfile
        Do a variant-aware content lookup in this
        localLookup in class QueryProfile
      • getBacking

        public QueryProfile getBacking()
        Returns the query profile backing this
      • addInherited

        public void addInherited​(QueryProfile inherited)
        Description copied from class: QueryProfile
        Adds a profile to the end of the inherited list of this. Throws an exception if this is frozen.
        addInherited in class QueryProfile
      • visitVariants

        protected void visitVariants​(boolean allowContent,
                                     DimensionBinding dimensionBinding)
        visitVariants in class QueryProfile
      • getContent

        protected java.lang.Object getContent​(java.lang.String localKey)
        Returns a value from the content of this: The value in this, or the value from the backing if not set in this
        getContent in class QueryProfile
      • getContent

        protected java.util.Map<java.lang.String,​java.lang.Object> getContent()
        Returns all the content from this: All the values in this, and all values in the backing where an overriding value is not set in this
        getContent in class QueryProfile
      • getDimensions

        public java.util.List<java.lang.String> getDimensions()
        Description copied from class: QueryProfile
        Returns the variant dimensions to be used in this - an unmodifiable list of dimension names
        getDimensions in class QueryProfile