Return-Path: X-Original-To: apmail-cayenne-commits-archive@www.apache.org Delivered-To: apmail-cayenne-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 7962B7525 for ; Fri, 19 Aug 2011 10:02:59 +0000 (UTC) Received: (qmail 98445 invoked by uid 500); 19 Aug 2011 10:02:59 -0000 Delivered-To: apmail-cayenne-commits-archive@cayenne.apache.org Received: (qmail 98408 invoked by uid 500); 19 Aug 2011 10:02:54 -0000 Mailing-List: contact commits-help@cayenne.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cayenne.apache.org Delivered-To: mailing list commits@cayenne.apache.org Received: (qmail 98385 invoked by uid 99); 19 Aug 2011 10:02:51 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 19 Aug 2011 10:02:51 +0000 X-ASF-Spam-Status: No, hits=-2001.1 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; Fri, 19 Aug 2011 10:02:48 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id 40B7EC4130 for ; Fri, 19 Aug 2011 10:02:27 +0000 (UTC) Date: Fri, 19 Aug 2011 10:02:27 +0000 (UTC) From: "Dzmitry Kazimirchyk (JIRA)" To: commits@cayenne.apache.org Message-ID: <2082592775.52505.1313748147261.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <388998617.52494.1313746947155.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Updated] (CAY-1603) Improve custom ExtendedType registration API MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/CAY-1603?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Dzmitry Kazimirchyk updated CAY-1603: ------------------------------------- Attachment: (was: extended-types.patch) > Improve custom ExtendedType registration API > -------------------------------------------- > > Key: CAY-1603 > URL: https://issues.apache.org/jira/browse/CAY-1603 > Project: Cayenne > Issue Type: Improvement > Components: Core Library > Affects Versions: 3.1M2 > Reporter: Dzmitry Kazimirchyk > Attachments: extended-types.patch > > > Cayenne's present custom ExtendedTypes registration seems a little bit uncomfortable: > // Find DataNode > DataDomain domain = runtime.getDataDomain(); > // replace 'node_name' with the name of the DataNode you've entered in the Modeler. > DataNode node = domain.getNode("node_name"); > // install ExtendedType > node.getAdapter().getExtendedTypes().registerType(customType); > It will be good to have some more friendly API, which allows custom type registration without getting DataNode and DataDomain. Suppose this can be implemented with a help of DI. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira