|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface SqlMapExecutor
This interface declares all methods involved with executing statements and batches for an SQL Map.
SqlMapSession
,
SqlMapClient
Method Summary | |
---|---|
int |
delete(String id)
Executes a mapped SQL DELETE statement. |
int |
delete(String id,
Object parameterObject)
Executes a mapped SQL DELETE statement. |
int |
executeBatch()
Executes (flushes) all statements currently batched. |
List |
executeBatchDetailed()
Executes (flushes) all statements currently batched. |
Object |
insert(String id)
Executes a mapped SQL INSERT statement. |
Object |
insert(String id,
Object parameterObject)
Executes a mapped SQL INSERT statement. |
List |
queryForList(String id)
Executes a mapped SQL SELECT statement that returns data to populate a number of result objects. |
List |
queryForList(String id,
int skip,
int max)
Executes a mapped SQL SELECT statement that returns data to populate a number of result objects within a certain range. |
List |
queryForList(String id,
Object parameterObject)
Executes a mapped SQL SELECT statement that returns data to populate a number of result objects. |
List |
queryForList(String id,
Object parameterObject,
int skip,
int max)
Executes a mapped SQL SELECT statement that returns data to populate a number of result objects within a certain range. |
Map |
queryForMap(String id,
Object parameterObject,
String keyProp)
Executes a mapped SQL SELECT statement that returns data to populate a number of result objects that will be keyed into a Map. |
Map |
queryForMap(String id,
Object parameterObject,
String keyProp,
String valueProp)
Executes a mapped SQL SELECT statement that returns data to populate a number of result objects from which one property will be keyed into a Map. |
Object |
queryForObject(String id)
Executes a mapped SQL SELECT statement that returns data to populate a single object instance. |
Object |
queryForObject(String id,
Object parameterObject)
Executes a mapped SQL SELECT statement that returns data to populate a single object instance. |
Object |
queryForObject(String id,
Object parameterObject,
Object resultObject)
Executes a mapped SQL SELECT statement that returns data to populate the supplied result object. |
PaginatedList |
queryForPaginatedList(String id,
int pageSize)
Deprecated. All paginated list features have been deprecated |
PaginatedList |
queryForPaginatedList(String id,
Object parameterObject,
int pageSize)
Deprecated. All paginated list features have been deprecated |
void |
queryWithRowHandler(String id,
Object parameterObject,
RowHandler rowHandler)
Executes a mapped SQL SELECT statement that returns a number of result objects that will be handled one at a time by a RowHandler. |
void |
queryWithRowHandler(String id,
RowHandler rowHandler)
Executes a mapped SQL SELECT statement that returns a number of result objects that will be handled one at a time by a RowHandler. |
void |
startBatch()
Starts a batch in which update statements will be cached before being sent to the database all at once. |
int |
update(String id)
Executes a mapped SQL UPDATE statement. |
int |
update(String id,
Object parameterObject)
Executes a mapped SQL UPDATE statement. |
Method Detail |
---|
Object insert(String id, Object parameterObject) throws SQLException
id
- The name of the statement to execute.parameterObject
- The parameter object (e.g. JavaBean, Map, XML etc.).
SQLException
- If an error occurs.Object insert(String id) throws SQLException
id
- The name of the statement to execute.
SQLException
- If an error occurs.int update(String id, Object parameterObject) throws SQLException
id
- The name of the statement to execute.parameterObject
- The parameter object (e.g. JavaBean, Map, XML etc.).
SQLException
- If an error occurs.int update(String id) throws SQLException
id
- The name of the statement to execute.
SQLException
- If an error occurs.int delete(String id, Object parameterObject) throws SQLException
id
- The name of the statement to execute.parameterObject
- The parameter object (e.g. JavaBean, Map, XML etc.).
SQLException
- If an error occurs.int delete(String id) throws SQLException
id
- The name of the statement to execute.
SQLException
- If an error occurs.Object queryForObject(String id, Object parameterObject) throws SQLException
id
- The name of the statement to execute.parameterObject
- The parameter object (e.g. JavaBean, Map, XML etc.).
SQLException
- If more than one result was found, or if any other error occurs.Object queryForObject(String id) throws SQLException
id
- The name of the statement to execute.
SQLException
- If more than one result was found, or if any other error occurs.Object queryForObject(String id, Object parameterObject, Object resultObject) throws SQLException
id
- The name of the statement to execute.parameterObject
- The parameter object (e.g. JavaBean, Map, XML etc.).resultObject
- The result object instance that should be populated with result data.
SQLException
- If more than one result was found, or if any other error occurs.List queryForList(String id, Object parameterObject) throws SQLException
id
- The name of the statement to execute.parameterObject
- The parameter object (e.g. JavaBean, Map, XML etc.).
SQLException
- If an error occurs.List queryForList(String id) throws SQLException
id
- The name of the statement to execute.
SQLException
- If an error occurs.List queryForList(String id, Object parameterObject, int skip, int max) throws SQLException
id
- The name of the statement to execute.parameterObject
- The parameter object (e.g. JavaBean, Map, XML etc.).skip
- The number of results to ignore.max
- The maximum number of results to return.
SQLException
- If an error occurs.List queryForList(String id, int skip, int max) throws SQLException
id
- The name of the statement to execute.skip
- The number of results to ignore.max
- The maximum number of results to return.
SQLException
- If an error occurs.void queryWithRowHandler(String id, Object parameterObject, RowHandler rowHandler) throws SQLException
id
- The name of the statement to execute.parameterObject
- The parameter object (e.g. JavaBean, Map, XML etc.).rowHandler
- A RowHandler instance
SQLException
- If an error occurs.void queryWithRowHandler(String id, RowHandler rowHandler) throws SQLException
id
- The name of the statement to execute.rowHandler
- A RowHandler instance
SQLException
- If an error occurs.PaginatedList queryForPaginatedList(String id, Object parameterObject, int pageSize) throws SQLException
id
- The name of the statement to execute.parameterObject
- The parameter object (e.g. JavaBean, Map, XML etc.).pageSize
- The maximum number of result objects each page can hold.
SQLException
- If an error occurs.PaginatedList queryForPaginatedList(String id, int pageSize) throws SQLException
id
- The name of the statement to execute.pageSize
- The maximum number of result objects each page can hold.
SQLException
- If an error occurs.Map queryForMap(String id, Object parameterObject, String keyProp) throws SQLException
id
- The name of the statement to execute.parameterObject
- The parameter object (e.g. JavaBean, Map, XML etc.).keyProp
- The property to be used as the key in the Map.
SQLException
- If an error occurs.Map queryForMap(String id, Object parameterObject, String keyProp, String valueProp) throws SQLException
id
- The name of the statement to execute.parameterObject
- The parameter object (e.g. JavaBean, Map, XML etc.).keyProp
- The property to be used as the key in the Map.valueProp
- The property to be used as the value in the Map.
SQLException
- If an error occurs.void startBatch() throws SQLException
SQLException
- If the batch could not be started.int executeBatch() throws SQLException
SQLException
- If the batch could not be executed or if any of the statements
fails.List executeBatchDetailed() throws SQLException, BatchException
SQLException
- if a database access error occurs, or the drive
does not support batch statements
BatchException
- if the driver throws BatchUpdateExceptionBatchException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |