Package com.mongodb.client.model
Class DBCollectionCountOptions
- java.lang.Object
-
- com.mongodb.client.model.DBCollectionCountOptions
-
@Deprecated(since="2021-05-27") public class DBCollectionCountOptions extends java.lang.ObjectDeprecated.Usage of this API is not supported in AEM as a Cloud Service.The options for a count operation.- Since:
- 3.4
-
-
Constructor Summary
Constructors Constructor Description DBCollectionCountOptions()Deprecated.Construct a new instance
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description DBCollectionCountOptionscollation(Collation collation)Deprecated.Sets the collationCollationgetCollation()Deprecated.Returns the collation optionsDBObjectgetHint()Deprecated.Gets the hint to apply.java.lang.StringgetHintString()Deprecated.Gets the hint string to apply.intgetLimit()Deprecated.Gets the limit to apply.longgetMaxTime(java.util.concurrent.TimeUnit timeUnit)Deprecated.Gets the maximum execution time on the server for this operation.ReadConcerngetReadConcern()Deprecated.Returns the readConcernReadPreferencegetReadPreference()Deprecated.Returns the readPreferenceintgetSkip()Deprecated.Gets the number of documents to skip.DBCollectionCountOptionshint(DBObject hint)Deprecated.Sets the hint to apply.DBCollectionCountOptionshintString(java.lang.String hint)Deprecated.Sets the hint to apply.DBCollectionCountOptionslimit(int limit)Deprecated.Sets the limit to apply.DBCollectionCountOptionslimit(long limit)Deprecated.Sets the limit to apply.DBCollectionCountOptionsmaxTime(long maxTime, java.util.concurrent.TimeUnit timeUnit)Deprecated.Sets the maximum execution time on the server for this operation.DBCollectionCountOptionsreadConcern(ReadConcern readConcern)Deprecated.Sets the readConcernDBCollectionCountOptionsreadPreference(ReadPreference readPreference)Deprecated.Sets the readPreferenceDBCollectionCountOptionsskip(int skip)Deprecated.Sets the number of documents to skip.DBCollectionCountOptionsskip(long skip)Deprecated.Sets the number of documents to skip.
-
-
-
Method Detail
-
getHint
@Nullable public DBObject getHint()
Deprecated.Gets the hint to apply.- Returns:
- the hint, which should describe an existing
-
getHintString
@Nullable public java.lang.String getHintString()
Deprecated.Gets the hint string to apply.- Returns:
- the hint string, which should be the name of an existing index
-
hint
public DBCollectionCountOptions hint(@Nullable DBObject hint)
Deprecated.Sets the hint to apply.- Parameters:
hint- a document describing the index which should be used for this operation.- Returns:
- this
-
hintString
public DBCollectionCountOptions hintString(@Nullable java.lang.String hint)
Deprecated.Sets the hint to apply.- Parameters:
hint- the name of the index which should be used for the operation- Returns:
- this
-
getLimit
public int getLimit()
Deprecated.Gets the limit to apply. The default is 0, which means there is no limit.- Returns:
- the limit
-
limit
public DBCollectionCountOptions limit(int limit)
Deprecated.Sets the limit to apply.- Parameters:
limit- the limit- Returns:
- this
-
getSkip
public int getSkip()
Deprecated.Gets the number of documents to skip. The default is 0.- Returns:
- the number of documents to skip
-
skip
public DBCollectionCountOptions skip(int skip)
Deprecated.Sets the number of documents to skip.- Parameters:
skip- the number of documents to skip- Returns:
- this
-
limit
public DBCollectionCountOptions limit(long limit)
Deprecated.Sets the limit to apply.- Parameters:
limit- the limit- Returns:
- this
-
skip
public DBCollectionCountOptions skip(long skip)
Deprecated.Sets the number of documents to skip.- Parameters:
skip- the number of documents to skip- Returns:
- this
-
getMaxTime
public long getMaxTime(java.util.concurrent.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
-
maxTime
public DBCollectionCountOptions maxTime(long maxTime, java.util.concurrent.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
-
getReadPreference
@Nullable public ReadPreference getReadPreference()
Deprecated.Returns the readPreference- Returns:
- the readPreference
-
readPreference
public DBCollectionCountOptions readPreference(@Nullable ReadPreference readPreference)
Deprecated.Sets the readPreference- Parameters:
readPreference- the readPreference- Returns:
- this
-
getReadConcern
@Nullable public ReadConcern getReadConcern()
Deprecated.Returns the readConcern- Returns:
- the readConcern
-
readConcern
public DBCollectionCountOptions readConcern(@Nullable ReadConcern readConcern)
Deprecated.Sets the readConcern- Parameters:
readConcern- the readConcern- Returns:
- this
-
getCollation
@Nullable public Collation getCollation()
Deprecated.Returns the collation options- Returns:
- the collation options
-
collation
public DBCollectionCountOptions collation(@Nullable Collation collation)
Deprecated.Sets the collation- Parameters:
collation- the collation- Returns:
- this
-
-