Package com.mongodb.client.model
Class Facet
- java.lang.Object
-
- com.mongodb.client.model.Facet
-
public class Facet extends java.lang.Object
Defines a Facet for use in $facet pipeline stages.- Since:
- 3.4
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getName()
java.util.List<? extends Bson>
getPipeline()
java.lang.String
toString()
-
-
-
Constructor Detail
-
Facet
public Facet(java.lang.String name, java.util.List<? extends Bson> pipeline)
- Parameters:
name
- the name of this facetpipeline
- the facet definition pipeline
-
Facet
public Facet(java.lang.String name, Bson... pipeline)
- Parameters:
name
- the name of this facetpipeline
- 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
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-