Package fr.gouv.vitam.common.database.builder.facet

# Class FacetHelper

java.lang.Object
fr.gouv.vitam.common.database.builder.facet.FacetHelper

Direct Known Subclasses:
  `FacetParserHelper`

public class FacetHelper extends Object
Facet helper

- ## Constructor Summary

  Constructors
  Modifier
  Constructor
  Description
  `protected`
  `FacetHelper()`
  Constructor

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static final Facet`
  `cardinality(String name, String field)`
  Create a cardinality facet
  `static final Facet`
  `cardinality(String name, String field, String nestdPath)`
  Create a cardinality facet
  `static final Facet`
  `count(String name, String field)`
  Create a count facet
  `static final Facet`
  `count(String name, String field, String nestdPath)`
  Create a count facet
  `static final Facet`
  `dateRange(String name, String field, String nestedPath, String dateFormat, List<RangeFacetValue> ranges)`
  Create a date range facet
  `static final Facet`
  `dateRange(String name, String field, String dateFormat, List<RangeFacetValue> ranges)`
  Create a date range facet
  `static final Facet`
  `filters(String name, Map<String,Query> filters)`
  Create a filters facet
  `static final Facet`
  `sum(String name, String field)`
  Create a SUM facet
  `static final Facet`
  `sum(String name, String field, String nestdPath)`
  Create a sum facet
  `static final Facet`
  `terms(String name, String field, Integer size, FacetOrder order)`
  Create a facet
  `static final Facet`
  `terms(String name, String field, String nestdPath, Integer size, FacetOrder order)`
  Create a facet

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### FacetHelper

    protected FacetHelper()
    Constructor

- ## Method Details

  - ### terms

    public static final Facet terms(String name, String field, String nestdPath, Integer size, FacetOrder order) throws InvalidCreateOperationException
    Create a facet
    Parameters:
      `name` - name of the facet
      `field` - field of facet data
      `nestdPath` - nested path of field of facet data
      `size` - size of the facet
      `order` - order of the facet
    Returns:
      a Facet
    Throws:
      `InvalidCreateOperationException` - when creating facet errors

  - ### terms

    public static final Facet terms(String name, String field, Integer size, FacetOrder order) throws InvalidCreateOperationException
    Create a facet
    Parameters:
      `name` - name of the facet
      `field` - field of facet data
      `size` - size of the facet
      `order` - order of the facet
    Returns:
      a Facet
    Throws:
      `InvalidCreateOperationException` - when creating facet errors

  - ### sum

    public static final Facet sum(String name, String field, String nestdPath) throws InvalidCreateOperationException
    Create a sum facet
    Parameters:
      `name` - name of the facet
      `field` - field of facet data
      `nestdPath` - nested path of field of facet data
    Returns:
      a Facet
    Throws:
      `InvalidCreateOperationException` - when creating facet errors

  - ### cardinality

    public static final Facet cardinality(String name, String field, String nestdPath) throws InvalidCreateOperationException
    Create a cardinality facet
    Parameters:
      `name` - name of the facet
      `field` - field of facet data
      `nestdPath` - nested path of field of facet data
    Returns:
      a Facet
    Throws:
      `InvalidCreateOperationException` - when creating facet errors

  - ### cardinality

    public static final Facet cardinality(String name, String field) throws InvalidCreateOperationException
    Create a cardinality facet
    Parameters:
      `name` - name of the facet
      `field` - field of facet data
    Returns:
      a Facet
    Throws:
      `InvalidCreateOperationException` - when creating facet errors

  - ### count

    public static final Facet count(String name, String field, String nestdPath) throws InvalidCreateOperationException
    Create a count facet
    Parameters:
      `name` - name of the facet
      `field` - field of facet data
      `nestdPath` - nested path of field of facet data
    Returns:
      a Facet
    Throws:
      `InvalidCreateOperationException` - when creating facet errors

  - ### count

    public static final Facet count(String name, String field) throws InvalidCreateOperationException
    Create a count facet
    Parameters:
      `name` - name of the facet
      `field` - field of facet data
    Returns:
      a SUM Facet
    Throws:
      `InvalidCreateOperationException` - when creating facet errors

  - ### sum

    public static final Facet sum(String name, String field) throws InvalidCreateOperationException
    Create a SUM facet
    Parameters:
      `name` - name of the facet
      `field` - field of facet data
    Returns:
      a SUM Facet
    Throws:
      `InvalidCreateOperationException` - when creating facet errors

  - ### dateRange

    public static final Facet dateRange(String name, String field, String nestedPath, String dateFormat, List<RangeFacetValue> ranges) throws InvalidCreateOperationException
    Create a date range facet
    Parameters:
      `name` - name of the facet
      `field` - field of facet data
      `nestedPath` - nested path of field of facet data
      `dateFormat` - the date format for the ranges of the facet
      `ranges` -
    Returns:
    Throws:
      `InvalidCreateOperationException`

  - ### dateRange

    public static final Facet dateRange(String name, String field, String dateFormat, List<RangeFacetValue> ranges) throws InvalidCreateOperationException
    Create a date range facet
    Parameters:
      `name` - name of the facet
      `field` - field of facet data
      `dateFormat` - the date format for the ranges of the facet
      `ranges` -
    Returns:
    Throws:
      `InvalidCreateOperationException`

  - ### filters

    public static final Facet filters(String name, Map<String,Query> filters) throws InvalidCreateOperationException
    Create a filters facet
    Parameters:
      `name` - name of the facet
      `filters` - map of named filer queries
    Returns:
      a Facet
    Throws:
      `InvalidCreateOperationException` - when creating facet errors