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 chaithanya ibatis <ch...@gmail.com> on 2006/07/11 10:00:07 UTC

HOW TO pass List of objects(a DTO) as single IN parameter to Stored Procedure

HI,
I've been working with Oracle DB and iBatis
Can anyone tell me how to passList of objects(a DTO) as single IN parameter
to Stored Procedure using iBatis
for example
java.util.List  list = new ArrayList();
SampleDTO obj1 = new SampleDTO();
SampleDTO obj2 = new SampleDTO();
list add(obj1);
list add(obj2);

i want to pass this list object as an IN parameter to procedure.
(mapping required in SQL map files of ibatis)
or any resources on this or code snippet

thanks,
Chaithanya

Re: HOW TO pass List of objects(a DTO) as single IN parameter to Stored Procedure

Posted by Debasish Dutta Roy <de...@gmail.com>.
Take a look at user defined types. When you use the stored procedure, you
need to define the parameter map. There you have the option of specifying
the types. I am still not sure, that you have a sp which takes a List as a
input parameter? and each element inside the list is again a user defined
object? Why???

The sp is then so specific to your application and your objects. Why would
you want to do something like that. Seems it is not designed properly.

On 7/11/06, chaithanya ibatis <ch...@gmail.com> wrote:
>
> not possible?????????////
> with or without ibatis
>
>
>
> On 7/11/06, Beemsterboer Software <hans@beemsterboer-software.nl > wrote:
> >
> >  Hi,
> >
> > Passing a list of objects using a single input parameter?
> > This is not even possible without iBatis.
> >
> > Greetings,
> > Hans.
> >
> >
> > chaithanya ibatis wrote:
> >
> > HI,
> > I've been working with Oracle DB and iBatis
> > Can anyone tell me how to passList of objects(a DTO) as single IN
> > parameter to Stored Procedure using iBatis
> > for example
> > java.util.List  list = new ArrayList();
> > SampleDTO obj1 = new SampleDTO();
> > SampleDTO obj2 = new SampleDTO();
> > list add(obj1);
> > list add(obj2);
> >
> > i want to pass this list object as an IN parameter to procedure.
> > (mapping required in SQL map files of ibatis)
> > or any resources on this or code snippet
> >
> > thanks,
> > Chaithanya
> >
> >
> >
>

Re: HOW TO pass List of objects(a DTO) as single IN parameter to Stored Procedure

Posted by chaithanya ibatis <ch...@gmail.com>.
not possible?????????////
with or without ibatis


On 7/11/06, Beemsterboer Software <ha...@beemsterboer-software.nl> wrote:
>
>  Hi,
>
> Passing a list of objects using a single input parameter?
> This is not even possible without iBatis.
>
> Greetings,
> Hans.
>
>
> chaithanya ibatis wrote:
>
> HI,
> I've been working with Oracle DB and iBatis
> Can anyone tell me how to passList of objects(a DTO) as single IN
> parameter to Stored Procedure using iBatis
> for example
> java.util.List  list = new ArrayList();
> SampleDTO obj1 = new SampleDTO();
> SampleDTO obj2 = new SampleDTO();
> list add(obj1);
> list add(obj2);
>
> i want to pass this list object as an IN parameter to procedure.
> (mapping required in SQL map files of ibatis)
> or any resources on this or code snippet
>
> thanks,
> Chaithanya
>
>
>

Re: HOW TO pass List of objects(a DTO) as single IN parameter to Stored Procedure

Posted by Beemsterboer Software <ha...@beemsterboer-software.nl>.
Hi,

Passing a list of objects using a single input parameter?
This is not even possible without iBatis.

Greetings,
Hans.

chaithanya ibatis wrote:
> HI,
> I've been working with Oracle DB and iBatis
> Can anyone tell me how to passList of objects(a DTO) as single IN 
> parameter to Stored Procedure using iBatis
> for example
> java.util.List  list = new ArrayList();
> SampleDTO obj1 = new SampleDTO();
> SampleDTO obj2 = new SampleDTO();
> list add(obj1);
> list add(obj2);
>
> i want to pass this list object as an IN parameter to procedure.
> (mapping required in SQL map files of ibatis)
> or any resources on this or code snippet
>
> thanks,
> Chaithanya