Class Facet



  • public class Facet
    extends Object
    Defines a Facet for use in $facet pipeline stages.
    Since:
    3.4
    MongoDB documentation
    $facet
    Since server release
    3.4
    • Constructor Detail

      • Facet

        public Facet​(String name,
                     List<? extends Bson> pipeline)
        Parameters:
        name - the name of this facet
        pipeline - the facet definition pipeline
      • Facet

        public Facet​(String name,
                     Bson... pipeline)
        Parameters:
        name - the name of this facet
        pipeline - the facet definition pipeline
    • Method Detail

      • getName

        public String getName​()
        Returns:
        the facet name
      • getPipeline

        public List<? extends Bson> getPipeline​()
        Returns:
        the pipeline definition