|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectfr.cnes.sitools.dataset.database.mongodb.MongoDBDatabaseRequest
fr.cnes.sitools.dataset.database.mongodb.MongoDBRangeDatabaseRequest
public class MongoDBRangeDatabaseRequest
Execute a request for some records specified by a List of ranges
Constructor Summary | |
---|---|
MongoDBRangeDatabaseRequest(DatabaseRequestParameters params)
Create a new SQLRangeDatabaseRequest with the given DatabaseRequestParameters |
Method Summary | |
---|---|
int |
calculateTotalCountFromBase()
Compute from the database the number of Records in the current request |
void |
createDistinctRequest()
Create a SQL Distinct request |
void |
createRequest()
Create a Request |
int |
getCount()
Get the number of results in the current request for pagination purpose |
int |
getTotalCount()
get the number of records in the current request |
boolean |
nextResult()
Move the cursor on the next result. |
Methods inherited from class fr.cnes.sitools.dataset.database.mongodb.MongoDBDatabaseRequest |
---|
buildURI, checkRequest, close, createMongoDBRequestModel, getDistinctRequestAsString, getKeysAsString, getMaxResultsToSend, getPageSize, getPrimaryKeys, getRecord, getRequestAsString, getSelectedPrimaryKey, getStartIndex, isCountDone, isLastResult, setAttributeValues |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MongoDBRangeDatabaseRequest(DatabaseRequestParameters params)
DatabaseRequestParameters
params
- the DatabaseRequestParameters
Method Detail |
---|
public final void createRequest() throws SitoolsException
DatabaseRequest
createRequest
in interface DatabaseRequest
createRequest
in class MongoDBDatabaseRequest
SitoolsException
- when request failspublic void createDistinctRequest() throws SitoolsException
DatabaseRequest
createDistinctRequest
in interface DatabaseRequest
createDistinctRequest
in class MongoDBDatabaseRequest
SitoolsException
- when occurspublic final boolean nextResult() throws SitoolsException
DatabaseRequest
nextResult
in interface DatabaseRequest
nextResult
in class MongoDBDatabaseRequest
true
if the new current row is valid; false
if there are no more rows
SitoolsException
- if a database access error occurs or this method is called on a closed result setpublic int getTotalCount()
DatabaseRequest
getTotalCount
in interface DatabaseRequest
getTotalCount
in class MongoDBDatabaseRequest
public int getCount()
DatabaseRequest
getCount
in interface DatabaseRequest
getCount
in class MongoDBDatabaseRequest
public int calculateTotalCountFromBase() throws SitoolsException
DatabaseRequest
calculateTotalCountFromBase
in interface DatabaseRequest
calculateTotalCountFromBase
in class MongoDBDatabaseRequest
SitoolsException
- if a database access error occurs or this method is called on a closed result set
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |