Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id C7436200C5F for ; Sun, 23 Apr 2017 14:34:16 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id C5D46160BA6; Sun, 23 Apr 2017 12:34:16 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 190D0160B8E for ; Sun, 23 Apr 2017 14:34:15 +0200 (CEST) Received: (qmail 41479 invoked by uid 500); 23 Apr 2017 12:34:15 -0000 Mailing-List: contact dev-help@polygene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@polygene.apache.org Delivered-To: mailing list dev@polygene.apache.org Received: (qmail 41468 invoked by uid 99); 23 Apr 2017 12:34:15 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 23 Apr 2017 12:34:15 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id C68031A088F for ; Sun, 23 Apr 2017 12:34:14 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 0.252 X-Spam-Level: X-Spam-Status: No, score=0.252 tagged_above=-999 required=6.31 tests=[RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_SOFTFAIL=0.972] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id pkdk9PffcR1j for ; Sun, 23 Apr 2017 12:34:13 +0000 (UTC) Received: from relay4-d.mail.gandi.net (relay4-d.mail.gandi.net [217.70.183.196]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTPS id A05305F20C for ; Sun, 23 Apr 2017 12:34:13 +0000 (UTC) Received: from mfilter11-d.gandi.net (mfilter11-d.gandi.net [217.70.178.131]) by relay4-d.mail.gandi.net (Postfix) with ESMTP id E76AC1720A5 for ; Sun, 23 Apr 2017 14:34:01 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at mfilter11-d.gandi.net Received: from relay4-d.mail.gandi.net ([IPv6:::ffff:217.70.183.196]) by mfilter11-d.gandi.net (mfilter11-d.gandi.net [::ffff:10.0.15.180]) (amavisd-new, port 10024) with ESMTP id asdPo0YnH3Jt for ; Sun, 23 Apr 2017 14:34:00 +0200 (CEST) X-Originating-IP: 10.58.1.149 Received: from webmail.gandi.net (webmail9-d.mgt.gandi.net [10.58.1.149]) (Authenticated sender: paul@nosphere.org) by relay4-d.mail.gandi.net (Postfix) with ESMTPA id 8A24A17209B for ; Sun, 23 Apr 2017 14:33:59 +0200 (CEST) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Date: Sun, 23 Apr 2017 14:33:59 +0200 From: Paul Merlin To: dev@polygene.apache.org Subject: Re: What is a ValueComposite? In-Reply-To: References: Message-ID: <056269d29b0985e55ec214b3565c9142@nosphere.org> X-Sender: paulmerlin@apache.org User-Agent: Roundcube Webmail/1.1.2 archived-at: Sun, 23 Apr 2017 12:34:17 -0000 Le 2017-04-11 08:23, Niclas Hedhman a écrit : > Gang, > > I figured out what was going on with the ValueType not containing > ValueComposite.class for a ValueComposite in a Property of something > else. > > It was as I suggested a matter of only checking interfaces during the > building of the composite models, and hence not looking at any > registered > types. > > But this made me wonder.... > > module.values( List.class ).withMixins( MyList.class ); > > Property> nicknames(); > > Is nicknames now a ValueComposite or not? > > It is simply a matter of we have no strong definition when an interface > "becomes" a ValueComposite. > > > And I have no good answer either (mostly because of the sample above), > but > I think we need an answer "now". > > > And when does this matter; Well, at the moment I can only think of > indexing/query and deserialization of entities (again, should a HashMap > or > a MyList be attempted above?) > > > Cheers It's not a definitive answer at all but I would say that a type assembled as a value is a ValueComposite: module.values( SomeType.class, List.class ); They are required to be assembled as such to be used in state modeling, e.g.: Property someProperty(); Property> someOtherProperty(); The ValueTypeFactory would then provide a ValueType which is the thing used by consumers to take decisions. As of today, the two methods of ValueTypeFactory will return different things for List ... hum hum. Either a ValueCompositeType or a CollectionValueType. We clearly need to make this smarter once we know what to do.