You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user-java@ibatis.apache.org by ra...@axa.com.au on 2007/04/13 04:14:34 UTC
how to find SQL Query based on StatementID
Iam using Spring with iBatis framework
I have the following requirement. I have to implement Batch execute
function
which takes the list of statementId and Parame Object and it has to
identify which operation it has to perform, and call the corresponding
method.
The statementId might refer to any of the update/insert or delete . So i
have to findout the whether the underlying SQL is update or insert or
delete from the statementID. Is it possible programatically?
to be precise
public void executeBatch(DatabaseServiceVO databaseServiceVO) throws
ApplicationRuntimeException {
getSqlMapClientTemplate().execute(new SqlMapClientCallback() {
public Object doInSqlMapClient(SqlMapExecutor executor) throws
SQLException {
executor.startBatch();
String statementId = databaseServiceVO.getStatementID();
/************************************************** *****/
Here i want to identify whether it is insert/update/delete
based on the statementId. Is it possible.? if possible how to do
that? so that based on that i will call
executor.insert or executor.delete or executor.update
/************************************************** *****/
executor.executeBatch();
}
});
}
When i posted this query to Spring forum they directed me to ask Ibatis
forum.
http://forum.springframework.org/showthread.php?p=111346#post111346
Can you please provide me help on this.
Thanks and regards,
Ravi
Consultant for AXA,
AXA Towers
Off : +61-3-9618-4677
Mob : +61-0411-44-5298
AXA and AllianceBernstein: Winner of 'Morningstar Fund Manager of the Year
2006 - Australia'.
*********************************************************************************
Important Note
This email (including any attachments) contains information which is
confidential and may be subject to legal privilege. If you are not
the intended recipient you must not use, distribute or copy this
email. If you have received this email in error please notify the
sender immediately and delete this email. Any views expressed in this
email are not necessarily the views of AXA. Thank you.
**********************************************************************************