Class TypedValueFacet

java.lang.Object
com.appiancorp.common.query.Facet<TypedValue>
com.appiancorp.common.query.TypedValueFacet
All Implemented Interfaces:
com.appiancorp.common.query.ReadOnlyFacet<TypedValue>

@GwtCompatible public final class TypedValueFacet extends Facet<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.

  • 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 applied
      isVisible - 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. See Facet.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 facet
      isVisible - is the facet visible at run time
      facetType - from FacetType enum (Right now we only know how to process DATE_RANGE)
      facetData - data fields specific to this type of facet
      sourceRef - 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

      public Long getId()
    • getOptions

      public List<FacetOption<TypedValue>> getOptions()
      Specified by:
      getOptions in class Facet<TypedValue>
      Returns:
      The options of this facet.
    • setOptions

      protected void setOptions(List<FacetOption<TypedValue>> options)
      Description copied from class: Facet
      Sets the options for this facet.
      Specified by:
      setOptions in class Facet<TypedValue>
      Parameters:
      options - the list of options
    • getFacetData

      public Object getFacetData()
    • setFacetData

      protected void setFacetData(Object facetData)
    • getAllowMultipleSelections

      public boolean getAllowMultipleSelections()
    • setAllowMultipleSelections

      protected void setAllowMultipleSelections(boolean allowMultipleSelections)