AUTO: Jasmin Mehta is out of the office. (returning 04/10/2009)

2009-04-06 Thread Jasmin Mehta
I am out of the office until 04/10/2009. I am in all day training from Apr 06 - Apr 09. I will have limited access to email. Please contact Carlton Gregory or Denise Flanagan for high priority issues. Note: This is an automated response to your message "Can I use Set instead of List?" sent on

Re: Can I use Set instead of List?

2009-04-06 Thread Larry Meadors
return new LinkedHashSet(queryForList(...)); Larry On Sun, Apr 5, 2009 at 10:53 PM, fer knjige wrote: > Hi, > > I have a simple query: > > select * from Products. > > I want to have results in Set not in List. How can I do it since > method 'queryForList' returns only List? > > Thanks in advanc

iBator generatedKey Element usage with a stored procedure

2009-04-06 Thread robertgloverjr
  Hi everybody.  I'm a big iBator fan but haven't used it in a while.  I can use iBator in my current project, but only if there is a way to use the generatedKey element (a sub-element of Table) to invoke a stored procedure that takes as input the tablename and the number of unique keys desired

Re: iBator generatedKey Element usage with a stored procedure

2009-04-06 Thread Jeff Butler
My best guess would be to try something like this: I don't know if this will work or not, but it would be worth trying. BTW - stored procedures work very well in iBATIS. Jeff Butler On Mon, Apr 6, 2009 at 11:08 AM, wrote: >   Hi everybody.  I'm a big iBator fan but haven't used it in a

Re: Can I use Set instead of List?

2009-04-06 Thread fer knjige
Unfortunately this doesn't work. It returns following error: Exception in thread "main" java.lang.ClassCastException: java.util.ArrayList. Solution? 2009/4/6 Larry Meadors > return new LinkedHashSet(queryForList(...)); > > Larry > > > On Sun, Apr 5, 2009 at 10:53 PM, fer knjige wrote: > > Hi,

Re: Can I use Set instead of List?

2009-04-06 Thread Nathan Maves
This is a fundamental java issue. You will never be able to cast a list to a set because a list allows duplicates whereas a set dose not. There is no way for java to know which of the duplicate elements it should use. If you guarantee that you have unique result from your DB(i.e. use the unique