On Fri, Oct 24, 2008 at 10:20 AM, Edward Yakop <[EMAIL PROTECTED]>wrote:
> > 1) Do you really need the @AssociationField in the CargoMixin? Seems > like > > you already have all the information you need available already. > > How do I differentiate between origin and destination? Both of them > are Location associations. > If we could figure out a mechanism that doesn't require magic String. > That would be wonderful. Ah I see what you're getting at. But even in your original suggestion, what do you do if you need to have the origin and destination injected into the mixin, likely for some kind of calculation? > > > > 2) I'm not in love with the builder methods. Maybe something like > > > > EntityBuilder<Cargo> builder = ...; > > Cargo cargoTemplate = builder.template(); > > builder.set( cargoTemplate.origin() ).to( origin ); > > builder.set( cargoTemplate.destination() ).to( destination ); > > How about? > builder.set( cargoTemplate.origin() ).with( origin ); > That works too. It was the builder.initialize() part that struck me as odd. Rich
_______________________________________________ qi4j-dev mailing list [email protected] http://lists.ops4j.org/mailman/listinfo/qi4j-dev

