As you say, this is classic stuff. Is there any way of making this available? Would be nice to start building up libraries of stuff like this.
On Feb 10, 2009, at 4:22 PM, Rickard Öberg wrote: > Niclas Hedhman wrote: >>> * I have set @UseDefaults on a List Property. This would imply >>> creating >>> an empty ArrayList as default value. >> >> Agree. > > Done, committing later (same for Set->empty HashSet,Collection->empty > ArrayList). > >>> * I have set @UseDefaults on an enum. This would imply setting it >>> to the >>> first value in the defined enum. >> >> Agree. > > Done, committing later. > >>> * EntityStores have to be able to store hierarchical ValueComposites >> >> See http://issues.ops4j.org/browse/QI-174 >> >>> * Indexing/querying for all of it. >> >> See http://issues.ops4j.org/browse/QI-175 > > Ok, good. > >>> That should be it. Does this seem like a good way to do it? >>> Viewing this >>> structure should be straightforward, but I can see that we'd >>> probably >>> need some way to easily modify the values, or it's going to be >>> rather >>> tricky... >> >> Yes, in principle ok. I think that perhaps the answer is to let the >> CompositeBuilder prototype to be populated with a value hierarchy >> in a >> single call. >> >> CompositeBuilder<Phone> builder = ...; >> PhoneState state = builder.stateFor( PhoneState.class, oldValue ); >> >> or something to such extent. > > Agree. I'm on it right now. Should be mostly copy/paste from other > builder code. > > At the same time I'm also refactoring out the internal management of > ValueComposites. You had it combined with regular composites before, > but > since we already have them separated at declaration time > (addComposites/addValues) we might as well separate them internally > too. > Again, mostly copy/paste coding. We can refactor later to share code > between all the different models. > > /Rickard > > _______________________________________________ > qi4j-dev mailing list > [email protected] > http://lists.ops4j.org/mailman/listinfo/qi4j-dev _______________________________________________ qi4j-dev mailing list [email protected] http://lists.ops4j.org/mailman/listinfo/qi4j-dev

