@GwtCompatible public final class GenericFacetOption extends FacetOption<java.lang.Object>
This class holds the metadata for an individual option for a facet
. The key piece of
metadata of a facet option is the filters that should be applied when that facet is selected. For
example:
color = black
closingDate >= 2012-01-01
and closingDate < 2012-04-01
COUNT_NOT_AVAILABLE, LOCAL_PART, QNAME, XML_ROOT_ELEMENT
Constructor and Description |
---|
GenericFacetOption(java.lang.String id,
java.lang.String name,
java.util.List<Filter<java.lang.Object>> filters)
Constructs a new facet option.
|
GenericFacetOption(java.lang.String id,
java.lang.String name,
java.util.List<Filter<java.lang.Object>> filters,
boolean isApplied,
int dataCount)
Constructs a new facet option.
|
Modifier and Type | Method and Description |
---|---|
java.util.List<Filter<java.lang.Object>> |
getFilters() |
Criteria |
getFiltersAsCriteria() |
protected void |
setFilters(java.util.List<Filter<java.lang.Object>> filters)
Sets the list of filters to add to a query when this option is selected.
|
equalDataCheck, equals, getAppliedOptions, getDataCount, getFiltersReadOnly, getId, getName, hashCode, isApplied, isAppliedPredicate, setApplied, setDataCount, toString
public GenericFacetOption(java.lang.String id, java.lang.String name, java.util.List<Filter<java.lang.Object>> filters)
isApplied
property is set to
false
, and the dataCount
property is set to FacetOption.COUNT_NOT_AVAILABLE
.id
- the id of this optionname
- the name of this optionfilters
- the list of filters to add to a query when this option is selectedpublic GenericFacetOption(java.lang.String id, java.lang.String name, java.util.List<Filter<java.lang.Object>> filters, boolean isApplied, int dataCount)
id
- the id of this optionname
- the name of this optionfilters
- the list of filters to add to a query when this option is selectedisApplied
- whether this option is selected or notdataCount
- the number of objects whose data matches the filters of this optionpublic java.util.List<Filter<java.lang.Object>> getFilters()
getFilters
in class FacetOption<java.lang.Object>
protected void setFilters(java.util.List<Filter<java.lang.Object>> filters)
FacetOption
setFilters
in class FacetOption<java.lang.Object>
filters
- the list of filterspublic Criteria getFiltersAsCriteria()
getFiltersAsCriteria
in interface com.appiancorp.common.query.ReadOnlyFacetOption
getFiltersAsCriteria
in class FacetOption<java.lang.Object>
Copyright © 2003-2024 Appian Corporation. All Rights Reserved.