From graffito-dev-return-1390-apmail-incubator-graffito-dev-archive=www.apache.org@incubator.apache.org Thu Sep 21 21:12:06 2006 Return-Path: Delivered-To: apmail-incubator-graffito-dev-archive@www.apache.org Received: (qmail 41980 invoked from network); 21 Sep 2006 21:12:06 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 21 Sep 2006 21:12:06 -0000 Received: (qmail 86793 invoked by uid 500); 21 Sep 2006 21:12:05 -0000 Mailing-List: contact graffito-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: graffito-dev@incubator.apache.org Delivered-To: mailing list graffito-dev@incubator.apache.org Received: (qmail 86781 invoked by uid 99); 21 Sep 2006 21:12:05 -0000 Received: from idunn.apache.osuosl.org (HELO idunn.apache.osuosl.org) (140.211.166.84) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 21 Sep 2006 14:12:05 -0700 X-ASF-Spam-Status: No, hits=0.0 required=5.0 tests= Received: from [209.237.227.198] ([209.237.227.198:56078] helo=brutus.apache.org) by idunn.apache.osuosl.org (ecelerity 2.1.1.8 r(12930)) with ESMTP id 9A/25-03726-42003154 for ; Thu, 21 Sep 2006 14:12:04 -0700 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 4DF817142D5 for ; Thu, 21 Sep 2006 21:08:25 +0000 (GMT) Message-ID: <13515209.1158872905316.JavaMail.jira@brutus> Date: Thu, 21 Sep 2006 14:08:25 -0700 (PDT) From: "Christophe Lombart (JIRA)" To: graffito-dev@incubator.apache.org Subject: [jira] Commented: (GRFT-99) ManageableCollectionUtil should not throw "unsupported" JcrMapping exception In-Reply-To: <2722539.1157393482358.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N [ http://issues.apache.org/jira/browse/GRFT-99?page=comments#action_12436643 ] Christophe Lombart commented on GRFT-99: ---------------------------------------- Dan, I'm sorry but I forget some details on this issue. If I understand, you want a generic implementation for the interface ManageableCollection (based on the java collection). > ManageableCollectionUtil should not throw "unsupported" JcrMapping exception > ---------------------------------------------------------------------------- > > Key: GRFT-99 > URL: http://issues.apache.org/jira/browse/GRFT-99 > Project: Graffito > Issue Type: Improvement > Components: JCR-Mapping > Affects Versions: 1.0-a1-dev > Environment: All > Reporter: Dan Connelly > > Many times, the object model'd code cannot be altered for ocm. > To avoid the "unsupported" exception in almost all such cases, use a delegating wrapper class to encapsulate a Collection. The wrapper class implements MaangeableCollection. > Since delegation is a performance hit, make the test below the last resort for *object* conversion in the method: > public static ManageableCollection getManageableCollection(Object object) > Proposed "catchall" test and program action: > if (object instanceof Collection) { > return new ManageableCollectionImpl((Collection)object); > } -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira