Return-Path: X-Original-To: apmail-commons-issues-archive@minotaur.apache.org Delivered-To: apmail-commons-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id BBE899CC1 for ; Sun, 23 Oct 2011 05:22:01 +0000 (UTC) Received: (qmail 87065 invoked by uid 500); 23 Oct 2011 05:21:58 -0000 Delivered-To: apmail-commons-issues-archive@commons.apache.org Received: (qmail 86586 invoked by uid 500); 23 Oct 2011 05:21:57 -0000 Mailing-List: contact issues-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: issues@commons.apache.org Delivered-To: mailing list issues@commons.apache.org Received: (qmail 86556 invoked by uid 99); 23 Oct 2011 05:21:53 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 23 Oct 2011 05:21:53 +0000 X-ASF-Spam-Status: No, hits=-2000.5 required=5.0 tests=ALL_TRUSTED,RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 23 Oct 2011 05:21:51 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id 40A9F317982 for ; Sun, 23 Oct 2011 05:19:32 +0000 (UTC) Date: Sun, 23 Oct 2011 05:19:32 +0000 (UTC) From: "Kenshi Toriumi (Created) (JIRA)" To: issues@commons.apache.org Message-ID: <1330859836.6271.1319347172266.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Created] (DBUTILS-82) Change BeanListHandler to be able to handle to list of the bean's super class or interface MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 Change BeanListHandler to be able to handle to list of the bean's super class or interface ------------------------------------------------------------------------------------------ Key: DBUTILS-82 URL: https://issues.apache.org/jira/browse/DBUTILS-82 Project: Commons DbUtils Issue Type: Improvement Affects Versions: 1.3 Reporter: Kenshi Toriumi Priority: Minor BeanListHandler handles to list of the bean class itself only. If want list of the bean's base class or interface, two steps of cast are needed. {code:borderStyle=solid} // Bean is super class or interface of BeanImpl BeanListHandler blh = new BeanListHandler(BeanImpl.class); List beanImplList = queryRunner.query(sql, blh); List beanList = (List) ((List) beanImplList); {code} I want to change BeanListHandler to be able to handle to list of the bean's super class or interface; {code:borderStyle=solid} // Bean is super class or interface of BeanImpl BeanListHandler blh = new BeanListHandler(BeanImpl.class); List beanList = queryRunner.query(sql, blh); for (Bean bean : beanList) { } {code} -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira