Package com.mongodb.operation
Class CreateViewOperation
-
- com.mongodb.operation.CreateViewOperation
-
- All Implemented Interfaces:
>
,>
public class CreateViewOperation extends implements >, >
Deprecated.An operation to create a view.- Since:
- 3.4
- MongoDB documentation
- Since server release
-
-
Constructor Summary
Constructors Constructor Description databaseName, viewName, viewOn, <BsonDocument> pipeline, WriteConcern writeConcern)
Deprecated.Construct a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description CreateViewOperation
collation(Collation collation)
Deprecated.Sets the default collation for the view.execute(WriteBinding binding)
Deprecated.General execute which can return anything of type Tvoid
executeAsync(AsyncWriteBinding binding, > callback)
Deprecated.General execute which can return anything of type TCollation
getCollation()
Deprecated.Gets the default collation for the viewgetDatabaseName()
Deprecated.Gets the database name<BsonDocument>
getPipeline()
Deprecated.Gets the pipeline that defines the view.getViewName()
Deprecated.Gets the name of the view to create.getViewOn()
Deprecated.Gets the name of the collection or view that backs this view.WriteConcern
getWriteConcern()
Deprecated.Gets the write concern.
-
-
-
Constructor Detail
-
CreateViewOperation
public CreateViewOperation( databaseName, viewName, viewOn, <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 Detail
-
getDatabaseName
public getDatabaseName()
Deprecated.Gets the database name- Returns:
- the database name
-
getViewName
public getViewName()
Deprecated.Gets the name of the view to create.- Returns:
- the view name
-
getViewOn
public 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 <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 execute(WriteBinding binding)
Deprecated.Description copied from interface:WriteOperation
General execute which can return anything of type T- Specified by:
>
- Parameters:
binding
- the binding to execute in the context of- Returns:
- T, the result of the execution
-
executeAsync
public void executeAsync(AsyncWriteBinding binding, > callback)
Deprecated.Description copied from interface:AsyncWriteOperation
General execute which can return anything of type T- Specified by:
>
- Parameters:
binding
- the binding to execute in the context ofcallback
- the callback to be called when the operation has been executed
-
-