|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
This interface declares all methods involved with executing statements and batches for an SQL Map.
SqlMapSession
,
SqlMapClient
Method Summary | |
int |
delete(java.lang.String id)
Executes a mapped SQL DELETE statement. |
int |
delete(java.lang.String id,
java.lang.Object parameterObject)
Executes a mapped SQL DELETE statement. |
int |
executeBatch()
Executes (flushes) all statements currently batched. |
java.util.List |
executeBatchDetailed()
Executes (flushes) all statements currently batched. |
java.lang.Object |
insert(java.lang.String id)
Executes a mapped SQL INSERT statement. |
java.lang.Object |
insert(java.lang.String id,
java.lang.Object parameterObject)
Executes a mapped SQL INSERT statement. |
java.util.List |
queryForList(java.lang.String id)
Executes a mapped SQL SELECT statement that returns data to populate a number of result objects. |
java.util.List |
queryForList(java.lang.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. |
java.util.List |
queryForList(java.lang.String id,
java.lang.Object parameterObject)
Executes a mapped SQL SELECT statement that returns data to populate a number of result objects. |
java.util.List |
queryForList(java.lang.String id,
java.lang.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. |
java.util.Map |
queryForMap(java.lang.String id,
java.lang.Object parameterObject,
java.lang.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. |
java.util.Map |
queryForMap(java.lang.String id,
java.lang.Object parameterObject,
java.lang.String keyProp,
java.lang.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. |
java.lang.Object |
queryForObject(java.lang.String id)
Executes a mapped SQL SELECT statement that returns data to populate a single object instance. |
java.lang.Object |
queryForObject(java.lang.String id,
java.lang.Object parameterObject)
Executes a mapped SQL SELECT statement that returns data to populate a single object instance. |
java.lang.Object |
queryForObject(java.lang.String id,
java.lang.Object parameterObject,
java.lang.Object resultObject)
Executes a mapped SQL SELECT statement that returns data to populate the supplied result object. |
PaginatedList |
queryForPaginatedList(java.lang.String id,
int pageSize)
Executes a mapped SQL SELECT statement that returns data to populate a number of result objects a page at a time. |
PaginatedList |
queryForPaginatedList(java.lang.String id,
java.lang.Object parameterObject,
int pageSize)
Executes a mapped SQL SELECT statement that returns data to populate a number of result objects a page at a time. |
void |
queryWithRowHandler(java.lang.String id,
java.lang.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(java.lang.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(java.lang.String id)
Executes a mapped SQL UPDATE statement. |
int |
update(java.lang.String id,
java.lang.Object parameterObject)
Executes a mapped SQL UPDATE statement. |
Method Detail |
public java.lang.Object insert(java.lang.String id, java.lang.Object parameterObject) throws java.sql.SQLException
id
- The name of the statement to execute.parameterObject
- The parameter object (e.g. JavaBean, Map, XML etc.).
java.sql.SQLException
- If an error occurs.public java.lang.Object insert(java.lang.String id) throws java.sql.SQLException
id
- The name of the statement to execute.
java.sql.SQLException
- If an error occurs.public int update(java.lang.String id, java.lang.Object parameterObject) throws java.sql.SQLException
id
- The name of the statement to execute.parameterObject
- The parameter object (e.g. JavaBean, Map, XML etc.).
java.sql.SQLException
- If an error occurs.public int update(java.lang.String id) throws java.sql.SQLException
id
- The name of the statement to execute.
java.sql.SQLException
- If an error occurs.public int delete(java.lang.String id, java.lang.Object parameterObject) throws java.sql.SQLException
id
- The name of the statement to execute.parameterObject
- The parameter object (e.g. JavaBean, Map, XML etc.).
java.sql.SQLException
- If an error occurs.public int delete(java.lang.String id) throws java.sql.SQLException
id
- The name of the statement to execute.
java.sql.SQLException
- If an error occurs.public java.lang.Object queryForObject(java.lang.String id, java.lang.Object parameterObject) throws java.sql.SQLException
id
- The name of the statement to execute.parameterObject
- The parameter object (e.g. JavaBean, Map, XML etc.).
java.sql.SQLException
- If more than one result was found, or if any other error occurs.public java.lang.Object queryForObject(java.lang.String id) throws java.sql.SQLException
id
- The name of the statement to execute.
java.sql.SQLException
- If more than one result was found, or if any other error occurs.public java.lang.Object queryForObject(java.lang.String id, java.lang.Object parameterObject, java.lang.Object resultObject) throws java.sql.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.
java.sql.SQLException
- If more than one result was found, or if any other error occurs.public java.util.List queryForList(java.lang.String id, java.lang.Object parameterObject) throws java.sql.SQLException
id
- The name of the statement to execute.parameterObject
- The parameter object (e.g. JavaBean, Map, XML etc.).
java.sql.SQLException
- If an error occurs.public java.util.List queryForList(java.lang.String id) throws java.sql.SQLException
id
- The name of the statement to execute.
java.sql.SQLException
- If an error occurs.public java.util.List queryForList(java.lang.String id, java.lang.Object parameterObject, int skip, int max) throws java.sql.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.
java.sql.SQLException
- If an error occurs.public java.util.List queryForList(java.lang.String id, int skip, int max) throws java.sql.SQLException
id
- The name of the statement to execute.skip
- The number of results to ignore.max
- The maximum number of results to return.
java.sql.SQLException
- If an error occurs.public void queryWithRowHandler(java.lang.String id, java.lang.Object parameterObject, RowHandler rowHandler) throws java.sql.SQLException
id
- The name of the statement to execute.parameterObject
- The parameter object (e.g. JavaBean, Map, XML etc.).rowHandler
- A RowHandler instance
java.sql.SQLException
- If an error occurs.public void queryWithRowHandler(java.lang.String id, RowHandler rowHandler) throws java.sql.SQLException
id
- The name of the statement to execute.rowHandler
- A RowHandler instance
java.sql.SQLException
- If an error occurs.public PaginatedList queryForPaginatedList(java.lang.String id, java.lang.Object parameterObject, int pageSize) throws java.sql.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.
java.sql.SQLException
- If an error occurs.public PaginatedList queryForPaginatedList(java.lang.String id, int pageSize) throws java.sql.SQLException
id
- The name of the statement to execute.pageSize
- The maximum number of result objects each page can hold.
java.sql.SQLException
- If an error occurs.public java.util.Map queryForMap(java.lang.String id, java.lang.Object parameterObject, java.lang.String keyProp) throws java.sql.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.
java.sql.SQLException
- If an error occurs.public java.util.Map queryForMap(java.lang.String id, java.lang.Object parameterObject, java.lang.String keyProp, java.lang.String valueProp) throws java.sql.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.
java.sql.SQLException
- If an error occurs.public void startBatch() throws java.sql.SQLException
java.sql.SQLException
- If the batch could not be started.public int executeBatch() throws java.sql.SQLException
java.sql.SQLException
- If the batch could not be executed or if any of the statements
fails.public java.util.List executeBatchDetailed() throws java.sql.SQLException, BatchException
java.sql.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 |