Return-Path: Delivered-To: apmail-ibatis-user-java-archive@www.apache.org Received: (qmail 91387 invoked from network); 18 Oct 2008 08:02:21 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 18 Oct 2008 08:02:21 -0000 Received: (qmail 49395 invoked by uid 500); 18 Oct 2008 08:02:22 -0000 Delivered-To: apmail-ibatis-user-java-archive@ibatis.apache.org Received: (qmail 48715 invoked by uid 500); 18 Oct 2008 08:02:21 -0000 Mailing-List: contact user-java-help@ibatis.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user-java@ibatis.apache.org Delivered-To: mailing list user-java@ibatis.apache.org Received: (qmail 48704 invoked by uid 99); 18 Oct 2008 08:02:21 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 18 Oct 2008 01:02:21 -0700 X-ASF-Spam-Status: No, hits=3.2 required=10.0 tests=HTML_MESSAGE,SPF_HELO_PASS,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [212.227.126.186] (HELO moutng.kundenserver.de) (212.227.126.186) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 18 Oct 2008 08:01:10 +0000 Received: from d820 (p57B4E6FB.dip.t-dialin.net [87.180.230.251]) by mrelayeu.kundenserver.de (node=mrelayeu7) with ESMTP (Nemesis) id 0ML2xA-1Kr6kL2eET-0000Pg; Sat, 18 Oct 2008 10:01:14 +0200 From: "Zsolt Koppany" To: Subject: RE: 2.3.4.726 and XmlConverter Date: Sat, 18 Oct 2008 10:01:12 +0200 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_036C_01C93108.742215A0" X-Mailer: Microsoft Office Outlook, Build 11.0.5510 In-Reply-To: <50CA25BD6EEA954FA592C097399942E319CF4EA9@CM1.wis.local> Thread-Index: Ackv/XfOSX4QGGNYSk2rBSZRAIoVdAAFK9RwAATOvoAANIE3wA== X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579 Message-Id: <0ML2xA-1Kr6kL2eET-0000Pg@mrelayeu.kundenserver.de> X-Provags-ID: V01U2FsdGVkX1+TSLBryVh3sXKI3xZBvPcQNpds2wXjSDBA/jr FYc7sE3iQo/L7s+TQ8fakWQ/j9JzJrXFsEg36a2AGI8rCxOlrV onDsOA2/ZGrovBsIcjdUvxT9pgDt7wSJSe9JBbb8PI= X-Virus-Checked: Checked by ClamAV on apache.org This is a multi-part message in MIME format. ------=_NextPart_000_036C_01C93108.742215A0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Neils, as I described it in a previous email we know this option with properties, but that would me that we should modify a lot of classes additionally where we pass a class as property we cannot set properties. Zsolt _____ From: Niels Beekman [mailto:n.beekman@wis.nl] Sent: Friday, October 17, 2008 8:57 AM To: user-java@ibatis.apache.org Subject: RE: 2.3.4.726 and XmlConverter You could easily do this with properties, unless you are connecting to databases on the fly. Search the archives for some examples of this. We use this for purposes similar like yours. Niels _____ From: Zsolt Koppany [mailto:zkoppanylist@intland.com] Sent: Friday, October 17, 2008 6:41 AM To: user-java@ibatis.apache.org Subject: RE: 2.3.4.726 and XmlConverter I'm not sure whether my problem is clear. Please check the code below (just an example). The expression ${INT_NULL_FIELD_VALUE} has different value on different database thus during the xml file is read we transfer the expression into a database dependent string. I understand that we could do that setting the property from Dao but in this case the Dao would be database dependent what we don't like. Zsolt Zsolt _____ From: Clinton Begin [mailto:clinton.begin@gmail.com] Sent: Friday, October 17, 2008 4:09 AM To: user-java@ibatis.apache.org Subject: Re: 2.3.4.726 and XmlConverter I don't think Zsolt is talking about the XML results/parameters support in iBATIS. XMLConverter was a class used to literally translate iBATIS 1.x mapping files into iBATIS 2.x mapping files using XSLT. It allowed either runtime conversion or batch conversion. Zsolt could use the old version to do the one-time conversion of all of his files if he wants, but it sounds like he is extending the class for some reason, in which case he could just grab the code and make it his own. Clinton On Thu, Oct 16, 2008 at 5:02 PM, wrote: As a suggestion Zsolt, iBatis does OR mapping extremely well. What you are looking for is something that will map Objects into XML extremely well. Why not take a look at XStream by thoughtworks. I'm using their library for several projects pertaining to Object -> XML and it handles them exceptionally well. And by utilizing a library like this it will give you a clean separation of concern as well as better control over the XML that you want to generate. http://xstream.codehaus.org/ "Clinton Begin" 10/16/2008 03:42 PM Please respond to user-java@ibatis.apache.org To user-java@ibatis.apache.org cc Subject Re: 2.3.4.726 and XmlConverter Zsolt, This feature is really old and was only there to support 1.x clients during the transition to 2.x. If you're still have 1.x maps, it might be a good time to move them. Otherwise, consider it a deprecated feature. Thus, the long-term solution is for you to either adopt the code as your own, or migrate your SQL mapping files. cheers Clinton On Thu, Oct 16, 2008 at 2:56 PM, Zsolt Koppany wrote: Larry, are there better options that will work long term? What is the recommended way today? Zsolt > -----Original Message----- > From: Larry Meadors [mailto:larry.meadors@gmail.com] > Sent: Thursday, October 16, 2008 3:55 PM > To: user-java@ibatis.apache.org > Subject: Re: 2.3.4.726 and XmlConverter > > Two options: > > - stick with the older version of ibatis that has all the parts you need > - extract the parts you need from the older version of ibatis and use > them alongside the new release > > Larry ------=_NextPart_000_036C_01C93108.742215A0 Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

Neils,

 

as I described = it in a previous email we know this option with properties, but that would me = that we should modify a lot of classes additionally where we pass a class as = property we cannot set properties.

 =

Zsolt


From: Niels = Beekman [mailto:n.beekman@wis.nl]
Sent: Friday, October 17, = 2008 8:57 AM
To: = user-java@ibatis.apache.org
Subject: RE: 2.3.4.726 = and XmlConverter

 

You could easily = do this with properties, unless you are connecting to databases on the fly. = Search the archives for some examples of this. We use this for purposes similar = like yours.

 =

Niels<= /span>


From: Zsolt Koppany [mailto:zkoppanylist@intland.com]
Sent: Friday, October 17, = 2008 6:41 AM
To: = user-java@ibatis.apache.org
Subject: RE: 2.3.4.726 = and XmlConverter

 

I’m not = sure whether my problem is clear. Please check the code below (just an = example). The expression ${INT_NULL_FIELD_VALUE} has different value on different = database thus during the xml file is read we transfer the expression into a = database dependent string.

 =

I understand = that we could do that setting the property from Dao but in this case the Dao = would be database dependent what we don’t = like.

 =

Zsolt<= /span>

 =

   = ;         <select id=3D"loadBlob" = parameterClass=3D"java.util.Map" resultMap=3D"inputStreamResult" = >

   = ;            =           SELECT $queryParams.fileNameField$ as = fileName,

   = ;            =             &= nbsp;         <isEqual property=3D"fetchBlob" = compareValue=3D"true">

   = ;            =             &= nbsp;           &n= bsp;         LENGTH($queryParams.blobFieldName$) AS = length,

   = ;            =             &= nbsp;           &n= bsp;         $blobFetchStmt$ AS blobData

   = ;            =             &= nbsp;         </isEqual>

   = ;            =             &= nbsp;         <!-- even when no need to fetch blob, still have to select a null = value, to get the resultmaps satisfied -->

   = ;            =             &= nbsp;         <isEqual property=3D"fetchBlob" = compareValue=3D"false">

   = ;            =             &= nbsp;           &n= bsp;         ${INT_NULL_FIELD_VALUE} AS length,

   = ;            =             &= nbsp;           &n= bsp;         NULL AS blobData

   = ;            =             &= nbsp;         </isEqual>

   = ;            =             FROM $queryParams.tableName$

   = ;            =            WHERE = $queryParams.idFieldName$=3D#id#

   = ;         </select>

 =

Zsolt


From: = Clinton Begin [mailto:clinton.begin@gmail.com]
Sent: Friday, October 17, = 2008 4:09 AM
To: = user-java@ibatis.apache.org
Subject: Re: 2.3.4.726 = and XmlConverter

 

I don't think Zsolt is talking about the XML results/parameters = support in iBATIS.  XMLConverter was a class used to literally translate = iBATIS 1.x mapping files into iBATIS 2.x mapping files using XSLT. It allowed = either runtime conversion or batch conversion.  =

 

Zsolt could use the old version to do the one-time conversion of = all of his files if he wants, but it sounds like he is extending the class for = some reason, in which case he could just grab the code and make it his = own.

 

Clinton

On Thu, Oct 16, 2008 at 5:02 PM, <Christopher.Mathrusse@sy= base.com> wrote:


As a suggestion Zsolt, iBatis does OR mapping = extremely well. What you are looking for is something that will map Objects into = XML extremely well. Why not take a look at XStream by thoughtworks. I'm = using their library for several projects pertaining to Object -> XML and it = handles them exceptionally well. And by utilizing a library like this it will give = you a clean separation of concern as well as better control over the XML that = you want to generate.

http://xstream.codehaus.org/

"Clinton Begin" <clinton.begin@gmail.com> =

10/16/2008 03:42 PM

Please respond to

To

cc

 

Subject

Re: 2.3.4.726 and = XmlConverter

 

 

 

 

 

 




Zsolt,

This feature is really old and was only there to support 1.x clients = during the transition to 2.x.  If you're still have 1.x maps, it might be a = good time to move them.  Otherwise, consider it a deprecated feature. =  Thus, the long-term solution is for you to either adopt the code as your own, = or migrate your SQL mapping files.

cheers
Clinton

On Thu, Oct 16, 2008 at 2:56 PM, Zsolt Koppany <zkoppanylist@intland.com> wrote:
Larry,

are there better options that will work long term?

What is the recommended way today?

Zsolt


> -----Original Message-----
> From: Larry Meadors [mailto:larry.meadors@gmail.com]
> Sent: Thursday, October 16, 2008 3:55 PM
> To: user-java@ibatis.apache.org
> Subject: Re: 2.3.4.726 and XmlConverter
>
> Two options:
>
>  - stick with the older version of ibatis that has all the = parts you need
>  - extract the parts you need from the older version of ibatis = and use
> them alongside the new release
>
> Larry

 

------=_NextPart_000_036C_01C93108.742215A0--