Return-Path: Delivered-To: apmail-ibatis-user-java-archive@www.apache.org Received: (qmail 20374 invoked from network); 15 Sep 2006 14:12:59 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 15 Sep 2006 14:12:59 -0000 Received: (qmail 91309 invoked by uid 500); 15 Sep 2006 14:12:57 -0000 Delivered-To: apmail-ibatis-user-java-archive@ibatis.apache.org Received: (qmail 91289 invoked by uid 500); 15 Sep 2006 14:12:57 -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 91278 invoked by uid 99); 15 Sep 2006 14:12:57 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 15 Sep 2006 07:12:57 -0700 X-ASF-Spam-Status: No, hits=1.9 required=10.0 tests=DNS_FROM_RFC_ABUSE,DNS_FROM_RFC_POST,HTML_MESSAGE X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy includes SPF record at spf.trusted-forwarder.org) Received: from [68.142.225.204] (HELO smtp106.rog.mail.re2.yahoo.com) (68.142.225.204) by apache.org (qpsmtpd/0.29) with SMTP; Fri, 15 Sep 2006 07:12:45 -0700 Received: (qmail 41283 invoked from network); 15 Sep 2006 14:12:16 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=rogers.com; h=Received:Message-ID:From:To:Subject:Date:MIME-Version:Content-Type:X-Priority:X-MSMail-Priority:X-Mailer:X-MimeOLE; b=Cl6Q9Me2XSNbfS4N3bHEG6Q2WHQsh3amswtCSn5CChWqdngX+s4Li8Q209YWZaOTlLI6a5J9XCvFRHRYYx8x95H66CWSGRHjjDQTXy3mWGzidZggZ+099lbtOYPWp+YpvROnpQU7zrxR+YMjariM845WoZmdVzTStTVa32R0AOk= ; Received: from unknown (HELO RIGCISERVER) (serjann@rogers.com@72.61.44.214 with login) by smtp106.rog.mail.re2.yahoo.com with SMTP; 15 Sep 2006 14:12:16 -0000 Message-ID: <1a9701c6d8d0$ab1030c0$0601a8c0@RIGCISERVER> From: "Edwin Lukaweski" To: Subject: finding unique keys Date: Fri, 15 Sep 2006 10:10:15 -0400 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_1A94_01C6D8AF.23C09D60" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.2869 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2962 X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N This is a multi-part message in MIME format. ------=_NextPart_000_1A94_01C6D8AF.23C09D60 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi: I have a situation for which I need some advice while using iBatis. What I would like to do is: 1) generate a unique UUID style value in my Java program 2) lock a table, say tabxx 3) SELECT on the table to see if the UUID exists as a key 4) if so, add 1 to the key and go to step 3 5) if the key does NOT exist, insert the record 6) unlock the table Can anyone get me advice as to how to do this with iBatis? Thanks, very musch, in advance Edwin ------=_NextPart_000_1A94_01C6D8AF.23C09D60 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Hi:
 
    I have a situation = for which I=20 need some advice while using iBatis.
 
    What I would like to = do=20 is:
 
    1) generate a unique = UUID style=20 value in my Java program
 
    2) lock a table, say = tabxx
 
    3) SELECT on the = table to see if=20 the UUID exists as a key
 
    4) if so, add 1 to = the key and=20 go to step 3
 
    5) if the key does = NOT exist,=20 insert the record
 
    6) unlock the = table
 
    Can anyone get me = advice as to=20 how to do this with iBatis?
 
Thanks, very musch, in = advance
 
Edwin
 
------=_NextPart_000_1A94_01C6D8AF.23C09D60--