Package com.mongodb.operation
Class CreateViewOperation
java.lang.Object
com.mongodb.operation.CreateViewOperation
- All Implemented Interfaces:
AsyncWriteOperation<Void>
,WriteOperation<Void>
@Deprecated
public class CreateViewOperation
extends Object
implements AsyncWriteOperation<Void>, WriteOperation<Void>
Deprecated.
An operation to create a view.
- Since:
- 3.4
-
Constructor Summary
ConstructorsConstructorDescriptionCreateViewOperation
(String databaseName, String viewName, String viewOn, List<BsonDocument> pipeline, WriteConcern writeConcern) Deprecated.Construct a new instance. -
Method Summary
Modifier and TypeMethodDescriptionDeprecated.Sets the default collation for the view.execute
(WriteBinding binding) Deprecated.General execute which can return anything of type Tvoid
executeAsync
(AsyncWriteBinding binding, SingleResultCallback<Void> callback) Deprecated.General execute which can return anything of type TDeprecated.Gets the default collation for the viewDeprecated.Gets the database nameDeprecated.Gets the pipeline that defines the view.Deprecated.Gets the name of the view to create.Deprecated.Gets the name of the collection or view that backs this view.Deprecated.Gets the write concern.
-
Constructor Details
-
CreateViewOperation
public CreateViewOperation(String databaseName, String viewName, String viewOn, List<BsonDocument> pipeline, WriteConcern writeConcern) Deprecated.Construct a new instance.- Parameters:
databaseName
- the name of the database for the operation, which may not be nullviewName
- the name of the collection to be created, which may not be nullviewOn
- the name of the collection or view that backs this view, which may not be nullpipeline
- the aggregation pipeline that defines the view, which may not be nullwriteConcern
- the write concern, which may not be null
-
-
Method Details
-
getDatabaseName
Deprecated.Gets the database name- Returns:
- the database name
-
getViewName
Deprecated.Gets the name of the view to create.- Returns:
- the view name
-
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
Deprecated.Gets the pipeline that defines the view.- Returns:
- the pipeline that defines the view
-
getWriteConcern
Deprecated.Gets the write concern.- Returns:
- the write concern
-
getCollation
Deprecated.Gets the default collation for the view- Returns:
- the collation, which may be null
-
collation
Deprecated.Sets the default collation for the view.- Parameters:
collation
- the collation, which may be null- Returns:
- this
-
execute
Deprecated.Description copied from interface:WriteOperation
General execute which can return anything of type T- Specified by:
execute
in interfaceWriteOperation<Void>
- Parameters:
binding
- the binding to execute in the context of- Returns:
- T, the result of the execution
-
executeAsync
Deprecated.Description copied from interface:AsyncWriteOperation
General execute which can return anything of type T- Specified by:
executeAsync
in interfaceAsyncWriteOperation<Void>
- Parameters:
binding
- the binding to execute in the context ofcallback
- the callback to be called when the operation has been executed
-