db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Patrick Carl <patrick.c...@web.de>
Subject Re: Really Strange SQL Exception
Date Fri, 20 Apr 2007 06:33:33 GMT
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

Youngho Cho schrieb:
> Hello,
>             
>             if(list.isEmpty())
>             {
>                 throw new NoRowsException();
>             }
>             else if(list.size() > 1)
>             {
>                 throw new TooManyRowsException();
>             }
> 
Torque supports this kind of check, at least for a single instance
result, see
http://db.apache.org/torque/releases/torque-3.3/runtime/apidocs/org/apache/torque/util/Criteria.html#setSingleRecord(boolean)

Could be helpful for you.

Patrick

- --
Patrick Carl
mailto:patrick@carl.it                                http://carl.it
GnuPG-Fingerprint: 3599 02CF 0419 BCA6 6BAC 4B53 DB7C 1897 451C F498
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (MingW32)

iD8DBQFGKF6823wYl0Uc9JgRAiOBAJ969HF5U1xwvRz5YcMJdN8/jMr7PACfZota
rARwYklfQtlTT435T6ZYOP0=
=Wu/P
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
For additional commands, e-mail: torque-user-help@db.apache.org


Mime
View raw message