CFMongoDB

cfmongodb.core
Class MapReduceResult

WEB-INF.cftags.component
        extended by cfmongodb.core.MapReduceResult

public class MapReduceResult
extends WEB-INF.cftags.component

Constructor Summary
init([any dbCommand], [any commandResult], [any searchResult], [any mongoUtil])
          Initializes and the result object
 
Method Summary
 any GETCOMMANDRESULT()
 any GETDBCOMMAND()
 any GETSEARCHRESULT()
 void SETCOMMANDRESULT(any commandResult)
 void SETDBCOMMAND(any dbCommand)
 void SETSEARCHRESULT(any searchResult)
 any asArray()
          Converts all cursor elements into a ColdFusion structure and returns them as an array of structs
 any asCursor()
          The fastest return type
 any getMapReduceCollectionName()
          Returns the name of the resultant MapReduce collection
 any getQuery()
          The criteria used for the query
 any getSort()
          The sort used for the query
 any size()
          The number of elements in the current SearchResult, after limit and skip are applied
 any totalCount()
          The total number of elements in the SearchResult
 
Methods inherited from class WEB-INF.cftags.component
 

Constructor Detail

init

public init([any dbCommand], [any commandResult], [any searchResult], [any mongoUtil])
Initializes and the result object. Use getdbCommand() to see all the parameters passed to mapReduce Use getCommandResult() to see a struct representation of the mapReduce result. This includes counts and timing information

Parameters:
dbCommand
commandResult
searchResult
mongoUtil
Method Detail

GETCOMMANDRESULT

public any GETCOMMANDRESULT()


GETDBCOMMAND

public any GETDBCOMMAND()


GETSEARCHRESULT

public any GETSEARCHRESULT()


SETCOMMANDRESULT

public void SETCOMMANDRESULT(any commandResult)

Parameters:
commandResult

SETDBCOMMAND

public void SETDBCOMMAND(any dbCommand)

Parameters:
dbCommand

SETSEARCHRESULT

public void SETSEARCHRESULT(any searchResult)

Parameters:
searchResult

asArray

public any asArray()
Converts all cursor elements into a ColdFusion structure and returns them as an array of structs.


asCursor

public any asCursor()
The fastest return type... returns the case-sensitive cursor which you'd iterate over with while(cursor.hasNext()) {cursor.next();} Note: you can use the cursor object to get full access to the full API at http://api.mongodb.org/java


getMapReduceCollectionName

public any getMapReduceCollectionName()
Returns the name of the resultant MapReduce collection


getQuery

public any getQuery()
The criteria used for the query. Note that a query other than '{}' would only be returned when performing additional searches against the temporary MapReduce collection and setting that SeachResult into the MapReduceResult via mapReduceResult.setSearchResult( searchResult ); Use getQuery().toString() to get a copy/paste string for the Mongo shell


getSort

public any getSort()
The sort used for the query. Note that a sort other than '{}' would only be returned when performing additional searches against the temporary MapReduce collection and setting that SeachResult into the MapReduceResult via mapReduceResult.setSearchResult( searchResult ); Use getSort().toString() to get a copy/paste string for the Mongo shell


size

public any size()
The number of elements in the current SearchResult, after limit and skip are applied. Note that skip and limit would only be relevant when performing additional searches against the temporary MapReduce collection and setting that SeachResult into the MapReduceResult via mapReduceResult.setSearchResult( searchResult );


totalCount

public any totalCount()
The total number of elements in the SearchResult.


CFMongoDB