Class UnionWith


  • public class UnionWith
    extends Stage
    Performs a union of two collections; i.e. $unionWith combines pipeline results from two collections into a single result set. The stage outputs the combined result set (including duplicates) to the next stage.
    Since:
    2.1
    • Constructor Detail

      • UnionWith

        @MorphiaInternal
        public UnionWith​(String collection,
                         List<Stage> stages)
        Creates the new stage
        Parameters:
        collection - the collection to process
        stages - the pipeline
        Developer note.
        This is an internal item. Its function and presence are subject to change without warning. Its use is highly discouraged.
      • UnionWith

        @MorphiaInternal
        public UnionWith​(Class<?> type,
                         List<Stage> stages)
        Creates the new stage
        Parameters:
        type - the type to process
        stages - the pipeline
        Developer note.
        This is an internal item. Its function and presence are subject to change without warning. Its use is highly discouraged.
    • Method Detail

      • getCollectionName

        @Nullable
        @MorphiaInternal
        public String getCollectionName()
        Returns:
        the collection name
        Developer note.
        This is an internal item. Its function and presence are subject to change without warning. Its use is highly discouraged.
      • getCollectionType

        @MorphiaInternal
        public Class<?> getCollectionType()
        Returns:
        the collection type
        Developer note.
        This is an internal item. Its function and presence are subject to change without warning. Its use is highly discouraged.
      • getStages

        @MorphiaInternal
        public List<Stage> getStages()
        Returns:
        the pipeline
        Developer note.
        This is an internal item. Its function and presence are subject to change without warning. Its use is highly discouraged.