Class TypedValueFacetOption

java.lang.Object
com.appiancorp.common.query.FacetOption<TypedValue>
com.appiancorp.common.query.TypedValueFacetOption
All Implemented Interfaces:
com.appiancorp.common.query.ReadOnlyFacetOption

@GwtCompatible public final class TypedValueFacetOption extends FacetOption<TypedValue>

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:

  • a "Color" facet could have the option "Black" which specifies a single filter: color = black
  • a "Closing Date" facet could have the option "1st Quarter" which specifies the filters: closingDate >= 2012-01-01 and closingDate < 2012-04-01
  • Constructor Details

    • TypedValueFacetOption

      public TypedValueFacetOption(String id, String name, List<Filter<TypedValue>> filters)
      Constructs a new facet option. The isApplied property is set to false, and the dataCount property is set to FacetOption.COUNT_NOT_AVAILABLE.
      Parameters:
      id - the id of this option
      name - the name of this option
      filters - the list of filters to add to a query when this option is selected
    • TypedValueFacetOption

      public TypedValueFacetOption(String id, String name, List<Filter<TypedValue>> filters, boolean isApplied, int dataCount)
      Constructs a new facet option.
      Parameters:
      id - the id of this option
      name - the name of this option
      filters - the list of filters to add to a query when this option is selected
      isApplied - whether this option is selected or not
      dataCount - the number of objects whose data matches the filters of this option
    • TypedValueFacetOption

      public TypedValueFacetOption(String name, List<Filter<TypedValue>> filters, boolean isApplied, int dataCount)
      This is for creating a facet using design time data (a facet that does not yet have an ID since it has not been persisted). This is necessary to show designers the performance of their record types using changes they have not yet saved.
      Parameters:
      name - the name of this option
      filters - the list of filters to add to a query when this option is selected
      isApplied - whether this option is selected or not
      dataCount - the number of objects whose data matches the filters of this option
  • Method Details