logo       


RE: Update on a list of POJOs -- what's the best approach?: msg#00263

Subject: RE: Update on a list of POJOs -- what's the best approach?
Thank you.  One more vital question: How does one refer to a property of an
object in a list?  Is there simply some kind of dot notation for
dereferencing?  I have not found any examples of this.

-----Original Message-----
From: Clinton Begin [mailto:clinton.begin@xxxxxxxxx] 
Sent: Tuesday, December 28, 2004 12:44 PM
To: ibatis-user-java@xxxxxxxxxxxxxxxxxxxx
Subject: Re: Update on a list of POJOs -- what's the best approach?

Hi Karen,

> Is my best bet in writing the statement itself, to pass the list in as the
> parameter and then iterate over it to build a WHERE clause that uses IN
()? 

Yes, for sure.

> Also, I haven't seen one, but is there a way to pass multiple 
> parameters to a statement? 

No, not through an additional method parameter.  You can pass multiple
parameters as Map entries or JavaBeans properties (the latter is
preferred, but a few more lines of code).

Clinton


On Tue, 28 Dec 2004 11:51:46 -0600, Karen Koch <kmkoch@xxxxxxxxxxxxx> wrote:
>  
>  
> 
> I'm not quite certain how this problem is best approached using SQLMaps: 
> 
>   
> 
> I want to implement a sort of "mass update" feature by which the database
> records that correspond to objects in a java.util.List have 3 fields set. 
> All objects in the list will have the 3 fields set to the same 3 values. 
> 
>   
> 
> Is my best bet in writing the statement itself, to pass the list in as the
> parameter and then iterate over it to build a WHERE clause that uses IN
()? 
> 
>   
> 
> Also, I haven't seen one, but is there a way to pass multiple parameters
to
> a statement?  Ideally, I want to pass the list itself and also a single
> integer that will be used to update one of the three fields and look up
the
> values to update the other two fields.




Ruby Jobs
Java Jobs
Jobs in California
more...
what
job title, keywords
where
city, state, zip
jobs by job search
Search:
Java, servers, webhosting, windows, cisco ...
more...
<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
encryption.gpg....    ietf.rfc822/199...    freebsd.devel.i...    lang.haskell.li...    mail.squirrelma...    web.zope.plone....    yellowdog.gener...    text.xml.xalan....    recreation.phot...    kde.devel.educa...    hardware.bus.ca...    printing.ghosts...    voip.peering/20...    assembly/2006-0...    org.user-groups...    culture.interne...    network.i2p/200...    boot-loaders.ya...    xfree86.render/...    qnx.openqnx.dev...    jakarta.velocit...    user-groups.pal...   
Home | blog view | USPTO Patent Archive | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe