Package com.mongodb.connection
Class QueryResult<T>
- java.lang.Object
-
- com.mongodb.connection.QueryResult<T>
-
- Type Parameters:
T- the type of document to decode query results to
public class QueryResult<T> extends java.lang.ObjectA batch of query results.- Since:
- 3.0
-
-
Constructor Summary
Constructors Constructor Description QueryResult(MongoNamespace namespace, java.util.List<T> results, long cursorId, ServerAddress serverAddress)Construct an instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ServerAddressgetAddress()Gets the server address.ServerCursorgetCursor()Gets the cursor.MongoNamespacegetNamespace()Gets the namespace.java.util.List<T>getResults()Gets the results.
-
-
-
Constructor Detail
-
QueryResult
public QueryResult(MongoNamespace namespace, java.util.List<T> results, long cursorId, ServerAddress serverAddress)
Construct an instance.- Parameters:
namespace- the namespaceresults- the query resultscursorId- the cursor idserverAddress- the server address
-
-
Method Detail
-
getNamespace
public MongoNamespace getNamespace()
Gets the namespace.- Returns:
- the namespace
-
getCursor
public ServerCursor getCursor()
Gets the cursor.- Returns:
- the cursor, which may be null if it's been exhausted
-
getResults
public java.util.List<T> getResults()
Gets the results.- Returns:
- the results
-
getAddress
public ServerAddress getAddress()
Gets the server address.- Returns:
- the server address
-
-