Ibatis sql question

2009-07-24 Thread Odelya YomTov
Hi! I would like to get a parameter in my sql and by that to decide if to use prepend=OR or prepend=AND isNotEqual prepend=here to write the parameter of the query property=maxprice compareValue=0 price BETWEEN #price# AND

problem with removing item from a paginated list

2009-07-24 Thread Odelya YomTov
Hi! After deleting an item, I thought to delete it from my paginated list like this: yalkutService.deleteProduct(workingItemId); ProductData tmpData; for (int i = 0; i productsList.size(); i++) { tmpData = (ProductData) productsList.get(i); if

Re: problem with removing item from a paginated list

2009-07-24 Thread Jon Moores
Hi, I dont think you should be removing from the list while iterating at the same time. Create a separate list (deleteProductList) and replace the productList.remove() call with deleteProductList.add(tmpData). After you finish iterating productList iterate over deleteProductList calling the

Re: Ibatis sql question

2009-07-24 Thread Sergey Livanov
isNotEqual prepend=#parameter# property=maxprice compareValue=1 price BETWEEN #price# AND #maxprice# /isNotEqual isNotEqual prepend=#parameter# property=maxprice compareValue=0 price =#price# OR price=#maxprice# /isNotEqual 2009/7/24 Odelya YomTov ode...@jpost.com Hi! I would

RE: Ibatis sql question

2009-07-24 Thread Andrey Rogov
isEqual prepend=#parameter# property=maxprice compareValue=0 price =#price# OR price=#maxprice# /isEqual isEqual prepend=#parameter# property=maxprice compareValue=1 price BETWEEN #price# AND #maxprice# /isEqual That's better _ From: Sergey Livanov

RE: problem with removing item from a paginated list

2009-07-24 Thread Odelya YomTov
Hi! I tried your advice, but with no solution to my problem.. I problem is when writing the paginated list to the jsp, not in the JAVA code. Thanks! From: Jon Moores [mailto:jonathan.moo...@gmail.com] Sent: Friday, July 24, 2009 1:59 PM To: user-java@ibatis.apache.org Subject: Re:

RE: Ibatis sql question

2009-07-24 Thread Andrey Rogov
Sorry. isEqual prepend=and property=maxprice compareValue=1 price BETWEEN #price# AND #maxprice# /isEqual isEqual prepend=and property=maxprice compareValue=0 price =#price# OR price=#maxprice# /isEqual _ From: Sergey Livanov [mailto:sergey.liva...@gmail.com] Sent:

Re: problem with removing item from a paginated list

2009-07-24 Thread Brandon Goodin
Don't use the PaginatedList. It's deprecated. You should just use the queryForList with the max and skip parameters. You get back a basic list. Then you can do what you want with it. If your jsp problem still exists at that point then it is something other than iBATIS. Brandon On Fri, Jul 24,

Re: Questions regd ibatis best practices - need some help here

2009-07-24 Thread Jeff Butler
iBATIS 3 is in development and is not formally released yet. However, I can vouch that it is nearly function complete and pretty stable. You can check it out from Subversion and build it with Maven if you're interested in trying it. Here's the SVN link:

Inserting Japanese characters in database using ibatis

2009-07-24 Thread Ashish Kulkarni
HiHas anyone noticed issue with inserting japanese characters in database using ibatis, i am having some issues here, i have debugged my program and found that the class which is passed to ibatis as input parameter has correct japanese characters, but in database they are not, Is there any special

RE: Questions regd ibatis best practices - need some help here

2009-07-24 Thread Andrey Rogov
Jeff, If Map parameter will be deprecated, how we can run stored procedures in 3x version ? -Original Message- From: Jeff Butler [mailto:jeffgbut...@gmail.com] Sent: Friday, July 24, 2009 7:05 PM To: user-java@ibatis.apache.org Subject: Re: Questions regd ibatis best practices - need

Re: Questions regd ibatis best practices - need some help here

2009-07-24 Thread Jeff Butler
You don't need a parameter map for procedures in iBATIS2. This is from the developers guide, page 30: procedure id=“callProcedure” parameterClass=”com.mydomain.MyParameter” {call MyProcedure (#parm1,jdbcType=INTEGER,mode=IN#, #parm2,jdbcType=INTEGER,mode=IN#,

Pagination by objects

2009-07-24 Thread John Seer
Hello, I am using in one of my projects ibatis and have a problem with pagination. For example I want to select 100 objects at a time and skip first 100 of them. I didn't find any good way of doing it and nothing exciting about scrolling too. Any suggestion how to achieve/solve my problem?

Re: Pagination by objects

2009-07-24 Thread Clinton Begin
You could start with the documentation...or even just your IDE code completion... :-) Look up the queryForList method signatures.. Clinton On Fri, Jul 24, 2009 at 4:39 PM, John Seer pulsph...@yahoo.com wrote: Hello, I am using in one of my projects ibatis and have a problem with

Re: Inserting Japanese characters in database using ibatis

2009-07-24 Thread Stephen Boyd
Ibatis is most likely not the problem. The database needs to be configured to accept unicode characters. What database are you using? On Fri, Jul 24, 2009 at 12:22 PM, Ashish Kulkarni ashish.kulkarn...@gmail.com wrote: HiHas anyone noticed issue with inserting japanese characters in database