Package com.appiancorp.common.query
Class TypedValueFacet
- All Implemented Interfaces:
com.appiancorp.common.query.ReadOnlyFacet<TypedValue>
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 TypedValueFacet 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
ConstructorDescriptionTypedValueFacet
(com.appiancorp.type.cdt.UserDtoFacetOptionGroup dtoFacet) TypedValueFacet
(Long id, String name, boolean isVisible, String defaultOption, List<FacetOption<TypedValue>> options, int numOmittedOptions, int omittedOptionsDataCount, boolean isExclusiveOptions, boolean allowMultipleSelections, String facetType, Object facetData, String sourceRef) TypedValueFacet
(String name, boolean isVisible, String facetType, Object facetData, String sourceRef) Constructs a new date range facet (Assuming the DATE_RANGE "facetType" is passed in)TypedValueFacet
(String name, boolean isVisible, String defaultOption, List<FacetOption<TypedValue>> options, int numOmittedOptions, int omittedOptionsDataCount, boolean isExclusiveOptions) Constructs a new selection/dropdown facet.TypedValueFacet
(String name, boolean isVisible, String defaultOption, List<FacetOption<TypedValue>> options, int numOmittedOptions, int omittedOptionsDataCount, boolean isExclusiveOptions, boolean allowMultipleSelections, String facetType, Object facetData, String sourceRef) -
Method Summary
Modifier and TypeMethodDescriptionboolean
getId()
protected void
setAllowMultipleSelections
(boolean allowMultipleSelections) protected void
setFacetData
(Object facetData) protected void
setOptions
(List<FacetOption<TypedValue>> 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
-
TypedValueFacet
public TypedValueFacet(String name, boolean isVisible, String defaultOption, List<FacetOption<TypedValue>> options, int numOmittedOptions, int omittedOptionsDataCount, boolean isExclusiveOptions) Constructs a new selection/dropdown facet.- Parameters:
name
- The name of the facet.options
- The list of options for this facet.defaultOption
- The label name of the option to be appliedisVisible
- is the facet visible at run time to the user.numOmittedOptions
- 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()
.
-
TypedValueFacet
public TypedValueFacet(String name, boolean isVisible, String facetType, Object facetData, String sourceRef) Constructs a new date range facet (Assuming the DATE_RANGE "facetType" is passed in)- Parameters:
name
- The name of the facetisVisible
- is the facet visible at run timefacetType
- from FacetType enum (Right now we only know how to process DATE_RANGE)facetData
- data fields specific to this type of facetsourceRef
- name of the field (record list is bring filtered on)
-
TypedValueFacet
public TypedValueFacet(String name, boolean isVisible, String defaultOption, List<FacetOption<TypedValue>> options, int numOmittedOptions, int omittedOptionsDataCount, boolean isExclusiveOptions, boolean allowMultipleSelections, String facetType, Object facetData, String sourceRef) -
TypedValueFacet
public TypedValueFacet(Long id, String name, boolean isVisible, String defaultOption, List<FacetOption<TypedValue>> options, int numOmittedOptions, int omittedOptionsDataCount, boolean isExclusiveOptions, boolean allowMultipleSelections, String facetType, Object facetData, String sourceRef) -
TypedValueFacet
public TypedValueFacet(com.appiancorp.type.cdt.UserDtoFacetOptionGroup dtoFacet)
-
-
Method Details
-
getId
-
getOptions
- Specified by:
getOptions
in classFacet<TypedValue>
- Returns:
- The options of this facet.
-
setOptions
Description copied from class:Facet
Sets the options for this facet.- Specified by:
setOptions
in classFacet<TypedValue>
- Parameters:
options
- the list of options
-
getFacetData
-
setFacetData
-
getAllowMultipleSelections
public boolean getAllowMultipleSelections() -
setAllowMultipleSelections
protected void setAllowMultipleSelections(boolean allowMultipleSelections)
-