Class CreateViewOperation

    • Constructor Detail

      • CreateViewOperation

        public CreateViewOperation​(java.lang.String databaseName,
                                   java.lang.String viewName,
                                   java.lang.String viewOn,
                                   java.util.List<BsonDocument> pipeline,
                                   WriteConcern writeConcern)
        Deprecated.
        Construct a new instance.
        Parameters:
        databaseName - the name of the database for the operation, which may not be null
        viewName - the name of the collection to be created, which may not be null
        viewOn - the name of the collection or view that backs this view, which may not be null
        pipeline - the aggregation pipeline that defines the view, which may not be null
        writeConcern - the write concern, which may not be null
    • Method Detail

      • getDatabaseName

        public java.lang.String getDatabaseName()
        Deprecated.
        Gets the database name
        Returns:
        the database name
      • getViewName

        public java.lang.String getViewName()
        Deprecated.
        Gets the name of the view to create.
        Returns:
        the view name
      • getViewOn

        public java.lang.String getViewOn()
        Deprecated.
        Gets the name of the collection or view that backs this view.
        Returns:
        the name of the collection or view that backs this view
      • getPipeline

        public java.util.List<BsonDocument> getPipeline()
        Deprecated.
        Gets the pipeline that defines the view.
        Returns:
        the pipeline that defines the view
      • getWriteConcern

        public WriteConcern getWriteConcern()
        Deprecated.
        Gets the write concern.
        Returns:
        the write concern
      • getCollation

        public Collation getCollation()
        Deprecated.
        Gets the default collation for the view
        Returns:
        the collation, which may be null
      • collation

        public CreateViewOperation collation​(Collation collation)
        Deprecated.
        Sets the default collation for the view.
        Parameters:
        collation - the collation, which may be null
        Returns:
        this
      • execute

        public java.lang.Void execute​(WriteBinding binding)
        Deprecated.
        Description copied from interface: WriteOperation
        General execute which can return anything of type T
        Specified by:
        execute in interface WriteOperation<java.lang.Void>
        Parameters:
        binding - the binding to execute in the context of
        Returns:
        T, the result of the execution
      • executeAsync

        public void executeAsync​(AsyncWriteBinding binding,
                                 SingleResultCallback<java.lang.Void> callback)
        Deprecated.
        Description copied from interface: AsyncWriteOperation
        General execute which can return anything of type T
        Specified by:
        executeAsync in interface AsyncWriteOperation<java.lang.Void>
        Parameters:
        binding - the binding to execute in the context of
        callback - the callback to be called when the operation has been executed