Package com.appiancorp.common.query
Class GenericFacet
- All Implemented Interfaces:
com.appiancorp.common.query.ReadOnlyFacet<Object>
This class holds the metadata for a facet and its options. For example, a Car record could have a Color facet with the options Black, White, Silver.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
A builder that will construct a GenericFacet with the correct parameters -
Field Summary
Fields inherited from class com.appiancorp.common.query.Facet
DEFAULT_OPTION, LOCAL_PART, QNAME, VISIBLE_BY_DEFAULT, XML_ROOT_ELEMENT
-
Constructor Summary
ConstructorDescriptionGenericFacet
(String name, boolean isVisible, String defaultOption, List<FacetOption<Object>> options, int numOmittedOptions, int omittedOptionsDataCount, boolean isExclusiveOptions) Constructs a new facet.GenericFacet
(String name, boolean isVisible, String defaultOption, List<FacetOption<Object>> options, int numOmittedOptions, int omittedOptionsDataCount, boolean isExclusiveOptions, String facetType, String sourceRef) -
Method Summary
Modifier and TypeMethodDescriptionprotected void
setOptions
(List<FacetOption<Object>> options) Sets the options for this facet.Methods inherited from class com.appiancorp.common.query.Facet
equalDataCheck, equals, findOptionById, findOptionById, findOptionByIdReadOnly, findOptionByIdReadOnly, getAppliedOptions, getDefaultOption, getFacetType, getName, getNumOmittedOptions, getOmittedOptionsDataCount, getOptionsReadOnly, getSourceRef, getTotalNumOptions, hashCode, isExclusiveOptions, isVisible, multilineToString, setAppliedOptions, setAppliedOptions, toString
-
Constructor Details
-
GenericFacet
public GenericFacet(String name, boolean isVisible, String defaultOption, List<FacetOption<Object>> options, int numOmittedOptions, int omittedOptionsDataCount, boolean isExclusiveOptions) Constructs a new facet.- Parameters:
name
- The name of the facet.options
- The list of options for this facet.defaultOption
- The name of the label of the option to be applied by defaultnumOmittedOptions
- The number of additional options that are available, but are not included in the provided list of options.omittedOptionsDataCount
- The number of objects that contain data matched by the omitted options. This allows the UI to present the generic option "Other" along with a count.isExclusiveOptions
- Whether this facet's options are exclusive or not. SeeFacet.isExclusiveOptions()
.
-
GenericFacet
-
-
Method Details
-
getOptions
- Specified by:
getOptions
in classFacet<Object>
- Returns:
- The options of this facet.
-
setOptions
Description copied from class:Facet
Sets the options for this facet.- Specified by:
setOptions
in classFacet<Object>
- Parameters:
options
- the list of options
-