Class Facet



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

      Constructors 
      Constructor Description
      Facet​(java.lang.String name, java.util.List<? extends Bson> pipeline)  
      Facet​(java.lang.String name, Bson... pipeline)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object o)  
      java.lang.String getName​()  
      java.util.List<? extends Bson> getPipeline​()  
      int hashCode​()  
      java.lang.String toString​()  
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • Facet

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

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

      • getName

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

        public java.util.List<? extends Bson> getPipeline​()
        Returns:
        the pipeline definition
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode​()
        Overrides:
        hashCode in class java.lang.Object
      • toString

        public java.lang.String toString​()
        Overrides:
        toString in class java.lang.Object