Package com.mongodb.operation
Class AggregateToCollectionOperation
- java.lang.Object
-
- com.mongodb.operation.AggregateToCollectionOperation
-
- All Implemented Interfaces:
AsyncWriteOperation<Void>,WriteOperation<Void>
@Deprecated public class AggregateToCollectionOperation extends Object implements AsyncWriteOperation<Void>, WriteOperation<Void>
Deprecated.An operation that executes an aggregation that writes its results to a collection (which is what makes this a write operation rather than a read operation).- Since:
- 3.0
- MongoDB documentation
- Aggregation
- Since server release
- 2.6
-
-
Constructor Summary
Constructors Constructor Description AggregateToCollectionOperation(MongoNamespace namespace, List<org.bson.BsonDocument> pipeline)Deprecated.AggregateToCollectionOperation(MongoNamespace namespace, List<org.bson.BsonDocument> pipeline, ReadConcern readConcern)Deprecated.Construct a new instance.AggregateToCollectionOperation(MongoNamespace namespace, List<org.bson.BsonDocument> pipeline, ReadConcern readConcern, WriteConcern writeConcern)Deprecated.Construct a new instance.AggregateToCollectionOperation(MongoNamespace namespace, List<org.bson.BsonDocument> pipeline, ReadConcern readConcern, WriteConcern writeConcern, AggregationLevel aggregationLevel)Deprecated.Construct a new instance.AggregateToCollectionOperation(MongoNamespace namespace, List<org.bson.BsonDocument> pipeline, WriteConcern writeConcern)Deprecated.Construct a new instance.AggregateToCollectionOperation(MongoNamespace namespace, List<org.bson.BsonDocument> pipeline, WriteConcern writeConcern, AggregationLevel aggregationLevel)Deprecated.Construct a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description AggregateToCollectionOperationallowDiskUse(Boolean allowDiskUse)Deprecated.Enables writing to temporary files.ReadOperation<org.bson.BsonDocument>asExplainableOperation(ExplainVerbosity explainVerbosity)Deprecated.Gets an operation whose execution explains this operation.AggregateToCollectionOperationbypassDocumentValidation(Boolean bypassDocumentValidation)Deprecated.Sets the bypass document level validation flag.AggregateToCollectionOperationcollation(Collation collation)Deprecated.Sets the collation optionsAggregateToCollectionOperationcomment(String comment)Deprecated.Sets the comment to the aggregation.Voidexecute(WriteBinding binding)Deprecated.General execute which can return anything of type TvoidexecuteAsync(AsyncWriteBinding binding, SingleResultCallback<Void> callback)Deprecated.General execute which can return anything of type TBooleangetAllowDiskUse()Deprecated.Whether writing to temporary files is enabled.BooleangetBypassDocumentValidation()Deprecated.Gets the bypass document level validation flagCollationgetCollation()Deprecated.Returns the collation optionsStringgetComment()Deprecated.Returns the comment to send with the aggregate.org.bson.BsonDocumentgetHint()Deprecated.Returns the hint for which index to use.longgetMaxTime(TimeUnit timeUnit)Deprecated.Gets the maximum execution time on the server for this operation.List<org.bson.BsonDocument>getPipeline()Deprecated.Gets the aggregation pipeline.ReadConcerngetReadConcern()Deprecated.Gets the read concern.WriteConcerngetWriteConcern()Deprecated.Gets the write concern.AggregateToCollectionOperationhint(org.bson.BsonDocument hint)Deprecated.Sets the hint for which index to use.AggregateToCollectionOperationmaxTime(long maxTime, TimeUnit timeUnit)Deprecated.Sets the maximum execution time on the server for this operation.
-
-
-
Constructor Detail
-
AggregateToCollectionOperation
@Deprecated public AggregateToCollectionOperation(MongoNamespace namespace, List<org.bson.BsonDocument> pipeline)
Deprecated.Construct a new instance.- Parameters:
namespace- the database and collection namespace for the operation.pipeline- the aggregation pipeline.
-
AggregateToCollectionOperation
public AggregateToCollectionOperation(MongoNamespace namespace, List<org.bson.BsonDocument> pipeline, WriteConcern writeConcern)
Deprecated.Construct a new instance.- Parameters:
namespace- the database and collection namespace for the operation.pipeline- the aggregation pipeline.writeConcern- the write concern to apply- Since:
- 3.4
-
AggregateToCollectionOperation
public AggregateToCollectionOperation(MongoNamespace namespace, List<org.bson.BsonDocument> pipeline, ReadConcern readConcern)
Deprecated.Construct a new instance.- Parameters:
namespace- the database and collection namespace for the operation.pipeline- the aggregation pipeline.readConcern- the read concern to apply- Since:
- 3.11
-
AggregateToCollectionOperation
public AggregateToCollectionOperation(MongoNamespace namespace, List<org.bson.BsonDocument> pipeline, ReadConcern readConcern, WriteConcern writeConcern)
Deprecated.Construct a new instance.- Parameters:
namespace- the database and collection namespace for the operation.pipeline- the aggregation pipeline.writeConcern- the write concern to applyreadConcern- the read concern to apply- Since:
- 3.11
-
AggregateToCollectionOperation
public AggregateToCollectionOperation(MongoNamespace namespace, List<org.bson.BsonDocument> pipeline, WriteConcern writeConcern, AggregationLevel aggregationLevel)
Deprecated.Construct a new instance.- Parameters:
namespace- the database and collection namespace for the operation.pipeline- the aggregation pipeline.writeConcern- the write concern to applyaggregationLevel- the aggregation level- Since:
- 3.10
-
AggregateToCollectionOperation
public AggregateToCollectionOperation(MongoNamespace namespace, List<org.bson.BsonDocument> pipeline, ReadConcern readConcern, WriteConcern writeConcern, AggregationLevel aggregationLevel)
Deprecated.Construct a new instance.- Parameters:
namespace- the database and collection namespace for the operation.pipeline- the aggregation pipeline.readConcern- the read concern to applywriteConcern- the write concern to applyaggregationLevel- the aggregation level- Since:
- 3.11
-
-
Method Detail
-
getPipeline
public List<org.bson.BsonDocument> getPipeline()
Deprecated.Gets the aggregation pipeline.- Returns:
- the pipeline
- MongoDB documentation
- Aggregation Pipeline
-
getReadConcern
public ReadConcern getReadConcern()
Deprecated.Gets the read concern.- Returns:
- the read concern, which may be null
- Since:
- 3.11
-
getWriteConcern
public WriteConcern getWriteConcern()
Deprecated.Gets the write concern.- Returns:
- the write concern, which may be null
- Since:
- 3.4
-
getAllowDiskUse
public Boolean getAllowDiskUse()
Deprecated.Whether writing to temporary files is enabled. A null value indicates that it's unspecified.- Returns:
- true if writing to temporary files is enabled
- MongoDB documentation
- Aggregation
- Since server release
- 2.6
-
allowDiskUse
public AggregateToCollectionOperation allowDiskUse(Boolean allowDiskUse)
Deprecated.Enables writing to temporary files. A null value indicates that it's unspecified.- Parameters:
allowDiskUse- true if writing to temporary files is enabled- Returns:
- this
- MongoDB documentation
- Aggregation
- Since server release
- 2.6
-
getMaxTime
public long getMaxTime(TimeUnit timeUnit)
Deprecated.Gets the maximum execution time on the server for this operation. The default is 0, which places no limit on the execution time.- Parameters:
timeUnit- the time unit to return the result in- Returns:
- the maximum execution time in the given time unit
- MongoDB documentation
- Max Time
-
maxTime
public AggregateToCollectionOperation maxTime(long maxTime, TimeUnit timeUnit)
Deprecated.Sets the maximum execution time on the server for this operation.- Parameters:
maxTime- the max timetimeUnit- the time unit, which may not be null- Returns:
- this
- MongoDB documentation
- Max Time
-
getBypassDocumentValidation
public Boolean getBypassDocumentValidation()
Deprecated.Gets the bypass document level validation flag- Returns:
- the bypass document level validation flag
- Since:
- 3.2
-
bypassDocumentValidation
public AggregateToCollectionOperation bypassDocumentValidation(Boolean bypassDocumentValidation)
Deprecated.Sets the bypass document level validation flag.Note: This only applies when an $out or $merge stage is specified
.- Parameters:
bypassDocumentValidation- If true, allows the write to opt-out of document level validation.- Returns:
- this
- Since:
- 3.2
- Since server release
- 3.2
-
getCollation
public Collation getCollation()
Deprecated.Returns the collation options- Returns:
- the collation options
- Since:
- 3.4
- Since server release
- 3.4
-
collation
public AggregateToCollectionOperation collation(Collation collation)
Deprecated.Sets the collation optionsA null value represents the server default.
- Parameters:
collation- the collation options to use- Returns:
- this
- Since:
- 3.4
- Since server release
- 3.4
-
getComment
public String getComment()
Deprecated.Returns the comment to send with the aggregate. The default is not to include a comment with the aggregation.- Returns:
- the comment
- Since:
- 3.6
- Since server release
- 3.6
-
comment
public AggregateToCollectionOperation comment(String comment)
Deprecated.Sets the comment to the aggregation. A null value means no comment is set.- Parameters:
comment- the comment- Returns:
- this
- Since:
- 3.6
- Since server release
- 3.6
-
getHint
public org.bson.BsonDocument getHint()
Deprecated.Returns the hint for which index to use. The default is not to set a hint.- Returns:
- the hint
- Since:
- 3.6
- Since server release
- 3.6
-
hint
public AggregateToCollectionOperation hint(org.bson.BsonDocument hint)
Deprecated.Sets the hint for which index to use. A null value means no hint is set.- Parameters:
hint- the hint- Returns:
- this
- Since:
- 3.6
- Since server release
- 3.6
-
asExplainableOperation
public ReadOperation<org.bson.BsonDocument> asExplainableOperation(ExplainVerbosity explainVerbosity)
Deprecated.Gets an operation whose execution explains this operation.- Parameters:
explainVerbosity- the explain verbosity- Returns:
- a read operation that when executed will explain this operation
-
execute
public Void execute(WriteBinding binding)
Deprecated.Description copied from interface:WriteOperationGeneral execute which can return anything of type T- Specified by:
executein interfaceWriteOperation<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<Void> callback)
Deprecated.Description copied from interface:AsyncWriteOperationGeneral execute which can return anything of type T- Specified by:
executeAsyncin interfaceAsyncWriteOperation<Void>- Parameters:
binding- the binding to execute in the context ofcallback- the callback to be called when the operation has been executed
-
-