Class DefaultContextQuery
- java.lang.Object
-
- com.hybris.cockpitng.core.config.impl.cache.DefaultContextQuery
-
- All Implemented Interfaces:
ContextQuery
public class DefaultContextQuery extends java.lang.Object implements ContextQuery
-
-
Constructor Summary
Constructors Constructor Description DefaultContextQuery(DefaultConfigurationCache cache, Config config, ContextAttributeComparator comparator)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Collection<Context>execute()Executes query on cached contextsContextQuerymatchesAny(java.lang.String name, java.util.Collection<java.lang.String> values)Extends query by adding filter for specified attribute.ContextQuerynotEmpty()Extends query by adding filter for context configuration.
-
-
-
Constructor Detail
-
DefaultContextQuery
public DefaultContextQuery(DefaultConfigurationCache cache, Config config, ContextAttributeComparator comparator)
-
-
Method Detail
-
notEmpty
public ContextQuery notEmpty()
Description copied from interface:ContextQueryExtends query by adding filter for context configuration. New filter passes only those contexts that contain any configuration.- Specified by:
notEmptyin interfaceContextQuery- Returns:
- extended query
-
matchesAny
public ContextQuery matchesAny(java.lang.String name, java.util.Collection<java.lang.String> values)
Description copied from interface:ContextQueryExtends query by adding filter for specified attribute. New filter passes only those contexts that contains an attribute with specified name and value is one of provided.- Specified by:
matchesAnyin interfaceContextQuery- Parameters:
name- name of attribute to matchvalues- collection of possible values- Returns:
- extended query
-
execute
public java.util.Collection<Context> execute()
Description copied from interface:ContextQueryExecutes query on cached contexts- Specified by:
executein interfaceContextQuery- Returns:
- collection of contexts that matches current query or
nullif no contexts are available in cache
-
-