org.springframework.data.mongodb.core.aggregation

Class ReplaceRootOperation.ReplaceRootOperationBuilder

  • java.lang.Object
    • org.springframework.data.mongodb.core.aggregation.ReplaceRootOperation.ReplaceRootOperationBuilder
    • Constructor Detail

      • ReplaceRootOperationBuilder

        public ReplaceRootOperationBuilder()
    • Method Detail

      • withValueOf

        public ReplaceRootOperation withValueOf(String fieldName)
        Defines a root document replacement based on a fieldName that resolves to a document.
        Parameters:
        fieldName - must not be null or empty.
        Returns:
        the final ReplaceRootOperation.
      • withDocument

        public org.springframework.data.mongodb.core.aggregation.ReplaceRootOperation.ReplaceRootDocumentOperation withDocument()
        Defines a root document replacement based on a composable document that is empty initially.
        ReplaceRootOperation can be populated with individual entries and derive its values from other, existing documents.
        Returns:
        the ReplaceRootDocumentOperation.
      • withDocument

        public ReplaceRootOperation withDocument(org.bson.Document document)
        Defines a root document replacement based on a composable document given document.
        ReplaceRootOperation can be populated with individual entries and derive its values from other, existing documents.
        Parameters:
        document - must not be null.
        Returns:
        the final ReplaceRootOperation.