This project has retired. For details please refer to its Attic page.
ValueComposites Defined - www.qi4j.org

ValueComposites Defined

The Qi4j Core Team has finally gotten around to define and nail down ValueComposites, what they mean and how they are to be used.
hafskghwafibwqkhjvcbqajkbchvabcjvna
Since the beginning, Qi4j has supported Entities and Services as a primary concerns for the runtime to deal with. But although Values are just as important, they have not received as much attention as should have in the past. For the upcoming version 0.6 release (next week?), Qi4j finally sports ValueComposites as a explicit meta Composite type.

A ValueComposites is defined as;

  • Immutable.
  • Equals is defined by the values.
  • The generic type of Property must be one of; discrete type, serializable object or ValueComposite.
  • ValueComposite can not reference an Entity directly. Must do via QualifiedIdentity (perhaps to be renamed to EntityReference).
  • ValueComposites are queryable, unlike serializable objects in Properties.

Values also have built-in support for efficient mutation (via cloning), needed for instance for GUI editing, eliminating tedious shuffling of fields between DTOs and Entities.

In the same process as introducing ValueComposites, the Qi4j Core Team will also try to introduce a TransientComposite meta type for all other uses, and remove the ability to instantiate subtypes of Composite that don't subtype any of the Service, Entity, Value or Transient Composite meta types.

Stand-by for release announcement soon.


Qi4j and the Qi4j logo are trademarks of Richard Öberg, Niclas Hedhman and the members of the Qi4j Core Team. See Qi4j licensing for more information.
Powered by SiteVisionexternal link.