Class FacetHelper
java.lang.Object
fr.gouv.vitam.common.database.builder.facet.FacetHelper
- Direct Known Subclasses:
FacetParserHelper
Facet helper
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic final Facet
dateRange
(String name, String field, String nestedPath, String dateFormat, List<RangeFacetValue> ranges) Create a date range facetstatic final Facet
Create a date range facetstatic final Facet
Create a filters facetstatic final Facet
terms
(String name, String field, Integer size, FacetOrder order) Create a facetstatic final Facet
Create a facet
-
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 facetfield
- field of facet datanestdPath
- nested path of field of facet datasize
- size of the facetorder
- 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 facetfield
- field of facet datasize
- size of the facetorder
- order of the facet- Returns:
- a 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 facetfield
- field of facet datanestedPath
- nested path of field of facet datadateFormat
- the date format for the ranges of the facetranges
-- 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 facetfield
- field of facet datadateFormat
- the date format for the ranges of the facetranges
-- Returns:
- Throws:
InvalidCreateOperationException
-
filters
public static final Facet filters(String name, Map<String, Query> filters) throws InvalidCreateOperationExceptionCreate a filters facet- Parameters:
name
- name of the facetfilters
- map of named filer queries- Returns:
- a Facet
- Throws:
InvalidCreateOperationException
- when creating facet errors
-