ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ben Shory" <be...@sapiens.com>
Subject RE: SQL selector
Date Mon, 12 Jan 2009 09:19:41 GMT
It might be better to write a plugin that manipulates the generated

-----Original Message-----
From: Ben Shory [mailto:ben.s@sapiens.com] 
Sent: Monday, January 12, 2009 11:13 AM
To: user-java@ibatis.apache.org
Subject: SQL selector

Before any statement execution, I would like to first check if it has a
vendor specific implementation and execute it if so or the default one
if not.
My DAOs are generated as spring dao with ibator.
I thought of doing something like -

	String stmtId = "table"+spec_postfix+".countByExample";
	if(!statementExists(stmtId)) {
		stmtId = "table.countByExample";
	Integer count = (Integer)
	return count;

Is this a good approach?
Would I have to override SpringDAOTemplae?

View raw message