Actually, one key part of a lightweight SOA - 2T + 1 I call it. But that is blog material.
-----Original Message-----
From: Morone, Bill [mailto:[EMAIL PROTECTED]
Sent: Friday, July 21, 2006 8:19 AM
To: [email protected]
Subject: RE: lists as parameterClass

Brandon,
 
Thanks for the quick reply. It works like a charm. I had one lexical error (oh, to be human) and a few bogus column names.
 
I salute all the fine developers of iBatis SQLMaps. I am one of the select few "straight to xml" guys (just a select statement) -- I rigged up a nice little method that translates the result of  individual xml docs (each with an xml prolog) into one big doc. I later translate that. A very lightweight SOA.
 
Thanks,
Bill Morone
 
 
 
 
-----Original Message-----
From: Brandon Goodin [mailto:[EMAIL PROTECTED]
Sent: Friday, July 21, 2006 12:40 AM
To: [email protected]
Subject: Re: lists as parameterClass

I'm assuming the list is in your map parameter class.

<statement id="getPolicyList" parameterClass= "java.util.Map" resultClass="xml" xmlResultName="policy">

select acct.acct_id as policyid

from acct, client_acct

where

client_acct.client_id = #clientId#

and acct.acct_id = client_acct.acct_id

and client_acct.client_acct_role_cd in

<iterate open="(" close=")" conjunction="," property="clientRoles">

#clientRoles[]#

</iterate>

</statement>

Brandon

On 7/20/06, Morone, Bill <[EMAIL PROTECTED] > wrote:
How about this one? Please forgiv the "straight-to-xml"
 

<statement id="getPolicyList" parameterClass= "java.util.Map" resultClass="xml" xmlResultName="policy">

select acct.acct_id as policyid

from acct, client_acct

where

client_acct.client_id = #clientId#

and acct.acct_id = client_acct.acct_id

and client_acct.client_acct_role_cd in

<iterate open="(" close=")" conjunction=",">

#clientRoles[]#

</iterate>

</statement>

-----Original Message-----
From: Brandon Goodin [mailto:[EMAIL PROTECTED]]
Sent: Thursday, July 20, 2006 8:35 AM
To: [email protected]
Subject: Re: lists as parameterClass

Yes, this should work.

<select parameterClass="list">
select * from odm_product where id IN
    <iterate
      open=" ("
     close=")" conjunction=",">
      #[]#
    </iterate>

</select>

Brandon Goodin

On 7/20/06, Thomas Karl Schwaerzler < [EMAIL PROTECTED] > wrote:

hello,

i'd like to do a query that looks like:

select * from odm_product where id IN (1,2);


where i'd like to pass over a list of long values
as parameter ( java.lang.Long[] )

is there something like this posssible with ibatis?

greets
t.

This message, including any attachments, is intended only for the recipient(s) 
named above. It may contain confidential and privileged information. If you have
received this communication in error, please notify the sender immediately and
destroy or delete the original message. Also, please be aware that if you are not
the intended recipient, any review, disclosure, copying, distribution or any
action or reliance based on this message is prohibited by law.


This message, including any attachments, is intended only for the recipient(s) 
named above. It may contain confidential and privileged information. If you have 
received this communication in error, please notify the sender immediately and 
destroy or delete the original message. Also, please be aware that if you are not 
the intended recipient, any review, disclosure, copying, distribution or any 
action or reliance based on this message is prohibited by law.  

This message, including any attachments, is intended only for the recipient(s) 
named above. It may contain confidential and privileged information. If you have 
received this communication in error, please notify the sender immediately and 
destroy or delete the original message. Also, please be aware that if you are not 
the intended recipient, any review, disclosure, copying, distribution or any 
action or reliance based on this message is prohibited by law.  


Reply via email to