|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectfr.cnes.sitools.dataset.database.jdbc.SQLDatabaseRequest
fr.cnes.sitools.dataset.database.jdbc.SQLListIdDatabaseRequest
public class SQLListIdDatabaseRequest
Create a request SQL with prepared statement
Constructor Summary | |
---|---|
SQLListIdDatabaseRequest(DatabaseRequestParameters params,
java.lang.String[] idList)
Create a AbstractDatabaseRequest |
Method Summary | |
---|---|
int |
calculateTotalCountFromBase()
Compute from the database the number of Records in the current request |
void |
close()
Close the current JDBC 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 |
Record |
getRecord()
Return the current ResultSet in a Record object |
int |
getTotalCount()
get the number of records in the current request |
boolean |
isLastResult()
Deprecated. |
boolean |
nextResult()
Move the cursor on the next result. |
Methods inherited from class fr.cnes.sitools.dataset.database.jdbc.SQLDatabaseRequest |
---|
buildURI, checkRequest, getDistinctRequestAsString, getMaxResultsToSend, getPageSize, getPrimaryKeys, getRequestAsString, getSelectedPrimaryKey, getStartIndex, isCountDone, setAttributeValues |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SQLListIdDatabaseRequest(DatabaseRequestParameters params, java.lang.String[] idList)
AbstractDatabaseRequest
params
- the request parametersidList
- the list of idsMethod Detail |
---|
public final void createDistinctRequest() throws SitoolsException
DatabaseRequest
createDistinctRequest
in interface DatabaseRequest
createDistinctRequest
in class SQLDatabaseRequest
SitoolsException
- when occurspublic final void createRequest() throws SitoolsException
DatabaseRequest
createRequest
in interface DatabaseRequest
createRequest
in class SQLDatabaseRequest
SitoolsException
- when request failspublic final int getTotalCount()
DatabaseRequest
getTotalCount
in interface DatabaseRequest
getTotalCount
in class SQLDatabaseRequest
public final int getCount()
DatabaseRequest
getCount
in interface DatabaseRequest
getCount
in class SQLDatabaseRequest
public final boolean nextResult() throws SitoolsException
DatabaseRequest
nextResult
in interface DatabaseRequest
nextResult
in class SQLDatabaseRequest
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 set@Deprecated public final boolean isLastResult() throws SitoolsException
DatabaseRequest
ResultSet
object or is the last
ResultSet
to send.
isLastResult
in interface DatabaseRequest
isLastResult
in class SQLDatabaseRequest
true
if the cursor is on the last row or is the last row to send.; false
otherwise
SitoolsException
- if a database access error occurs or this method is called on a closed result setpublic final Record getRecord() throws SitoolsException
DatabaseRequest
ResultSet
in a Record
object
getRecord
in interface DatabaseRequest
getRecord
in class SQLDatabaseRequest
Record
of the current ResultSet
SitoolsException
- if a database access error occurs or this method is called on a closed result setpublic final void close() throws SitoolsException
SQLDatabaseRequest
close
in interface DatabaseRequest
close
in class SQLDatabaseRequest
SitoolsException
- if there is an error while closing the JDBC requestpublic int calculateTotalCountFromBase() throws SitoolsException
DatabaseRequest
calculateTotalCountFromBase
in interface DatabaseRequest
calculateTotalCountFromBase
in class SQLDatabaseRequest
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 |