Lets leave it for a while so maybe people have better names, or maybe they like the on/to.
Alin On Tue, Jun 17, 2008 at 9:40 AM, Michael Hunger <[EMAIL PROTECTED]> wrote: > Hi Alin, > for is a reserved word. > > the to() reads much better when you add metainfo. > > module.on( Storable.class ).infoFor(config).to().depth().set(0.0); > > But its a simple rename so feel free to change to a more fluent language. > > Michael > > Alin Dreghiciu schrieb: >> I like the fluent API approach but the method names seems pretty >> confusing , resulting in a non readable statement as fluent api is >> supposed to provide. >> >> e.g. module.on( Storable.class ).to().depth().set(0.0); If I would not >> know what is suppose to do I will be very confused. >> >> We should find some different names for the methods. Maybe, >> module.for( Storable.class ).onProperty().depth().set(0.0); >> >> Alin >> >> On Mon, Jun 16, 2008 at 7:36 PM, Michael Hunger <[EMAIL PROTECTED]> wrote: >>> Unset is only used during the construction period of immutable properties. >>> It should not be there afterwards. >>> I fixed one bug locally that the unset value after persisting and rereading >>> from the memory store was not longer == >>> equal with the constant string (using an enum there helps). >>> >>> Another problem regarding default values. In my test a entity created by an >>> entitybuilder did not use the default >>> values? A entity created by a uow contained the correct default values. >>> >>> >>> Regarding default values. I just did a reimplement the configuration of >>> meta info and default values as the current >>> implementation (and its use afterwards in constructing the entities) seemed >>> a bit to complicated. >>> I implemented a little DSL for configuration of entities and their default >>> values. >>> This also allows the extraction of the Entity related config in a local >>> variable and removes the need for repeated. >>> addProperty().withAccessor() ... calls. >>> >>> New Syntax. >>> >>> module.on(Nameable.class). >>> infoFor( new DisplayInfo( "Name", "Name of something", "The >>> name" ) ). // Add UI info >>> infoFor( new RdfInfo( "label", >>> "http://www.w3.org/1999/02/22-rdf-syntax-ns#" ) ). // Add persistence info >>> to().name(). // Select accessor >>> set( "Hello World" ); // Set default value >>> >>> >>> I just submit that stuff so you can have a look on it. >>> >>> WDTY ? >>> >>> Michael >>> >>> >>> Niclas Hedhman schrieb: >>>> Gang, >>>> >>>> I think we have a problem when it comes to Default Values vs UNSET for >>>> Property instances. >>>> >>>> I have always assumed that Default Value is the value that should be >>>> set if not set explicitly. But apparently not here, so I am trying to >>>> twist my head around what does default value really mean. My >>>> conclusion is that the subject has not been thought thru properly. >>>> >>>> So, am I right that an unset Property should return the default value >>>> from its PropertyModel ??? >>>> >>>> >>>> Cheers >>>> Niclas >>>> >>>> _______________________________________________ >>>> qi4j-dev mailing list >>>> [email protected] >>>> http://lists.ops4j.org/mailman/listinfo/qi4j-dev >>> >>> -- >>> Michael Hunger >>> Independent Consultant >>> >>> Web: http://www.jexp.de >>> Email: [EMAIL PROTECTED] >>> >>> Enthusiastic Evangelist for Better Software Development >>> >>> Don't stop where you are: http://creating.passionate-developers.org >>> We support Software Engineering Radio (www.se-radio.net) >>> >>> _______________________________________________ >>> 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 > -- Alin Dreghiciu http://www.ops4j.org - New Energy for OSS Communities - Open Participation Software. http://www.qi4j.org - New Energy for Java - Domain Driven Development. http://malaysia.jayway.net - New Energy for Projects - Great People working on Great Projects at Great Places _______________________________________________ qi4j-dev mailing list [email protected] http://lists.ops4j.org/mailman/listinfo/qi4j-dev

