openlsd.database.session.LSDDbRequest Class Reference
List of all members.
Detailed Description
Class to handle request
- Author:
- Frederic Bregier LGPL
Constructor & Destructor Documentation
openlsd.database.session.LSDDbRequest.LSDDbRequest |
( |
LSDDbSession |
ls |
) |
|
Member Function Documentation
Statement openlsd.database.session.LSDDbRequest.createStatement |
( |
|
) |
throws SQLException [private] |
Create a statement with some particular options
- Exceptions:
-
- Returns:
- the new Statement
ResultSet openlsd.database.session.LSDDbRequest.select |
( |
String |
select |
) |
|
Execute a SELECT statement and returns the set of Result. The statement must not be an update/insert/delete, since it will return null, as if an error occurs. The previous statement and resultSet are closed.
- Parameters:
-
- Returns:
- the set of Result or null if an error occurs
ResultSet openlsd.database.session.LSDDbRequest.select |
( |
String |
select, |
|
|
int |
nbFetch | |
|
) |
| | |
Execute a SELECT statement and returns the set of Result. The statement must not be an update/insert/delete, since it will return null, as if an error occurs. The previous statement and resultSet are closed.
- Parameters:
-
| select | |
| nbFetch | the number of pre fetch rows |
- Returns:
- the set of Result or null if an error occurs
int openlsd.database.session.LSDDbRequest.query |
( |
String |
query |
) |
|
Execute a UPDATE/INSERT/DELETE statement and returns the number of row or -1 if an error occurs The previous statement and resultSet are closed.
- Parameters:
-
- Returns:
- the number of row in the query
void openlsd.database.session.LSDDbRequest.close |
( |
|
) |
|
Finished a Request (ready for a new one)
long openlsd.database.session.LSDDbRequest.getLastId |
( |
|
) |
|
Get the last ID autoincrement from the last request
- Returns:
- the long Id or LSDConstant.invalide_idx (Long.MIN_VALUE) if an error occurs.
static long openlsd.database.session.LSDDbRequest.getLastId |
( |
ResultSet |
resultSet |
) |
[static] |
Get the last ID autoincrement from the result
- Parameters:
-
- Returns:
- the long Id or LSDConstant.invalide_idx (Long.MIN_VALUE) if an error occurs.
static boolean openlsd.database.session.LSDDbRequest.getNext |
( |
ResultSet |
resultSet |
) |
[static] |
Move the cursor to the next result
- Parameters:
-
- Returns:
- True if there is a next result, else False
static String openlsd.database.session.LSDDbRequest.getIsNull |
( |
String |
value |
) |
[static] |
Test if value is null and create the string for insert/update
- Parameters:
-
- Returns:
- the string as result
Member Data Documentation
The documentation for this class was generated from the following file:
- OpenLSD/ClientSupport/openlsd/database/session/LSDDbRequest.java