ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kruba02 <krub...@ca.com>
Subject How to use @SelectProvider
Date Wed, 13 Jan 2010 18:37:36 GMT

Hi, 

I am trying to execute a dynamic/custom query using iBATIS (using
#SelectProvider) and am facing a couple of issues.

1. I have something like @SelectProvider(method = "selectTest", type =
"com.a.b.DynamicSQL") where method is the method-name and type is the name
of the class. I get an error here. Both the class and method exist.
selectTest looks like following. Any idea how I can remove the error?

public String selectTest(){
		BEGIN();
		SELECT("*");
		FROM("test");
		return SQL();
	}

2. The documentation says that @SelectProvider is a method annotation. If I
annotate a method say Foo() using the above @SelectProvider, what should the
method itself have?

3. Lastly, how do I invoke this select query? 

Your help is much appreciated. Sorry, I am just getting started with iBATIS.
Also, are there any other ways to execute queries which are constructed on
the fly?

Thanks in advance for your help.
KA
-- 
View this message in context: http://old.nabble.com/How-to-use-%40SelectProvider-tp27148804p27148804.html
Sent from the iBATIS - User - Java mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-java-unsubscribe@ibatis.apache.org
For additional commands, e-mail: user-java-help@ibatis.apache.org


Mime
View raw message