Zaid,

Yes, there's no reason that the FIRST entity attribute couldn't be set
on the cluster children as well. It would save a level of indirection,
and we can always keep the atrribute on the cluster as well. If nobody
objects, I'll change it.

Andrew.
--
-- andrew kennedy ? cloud engineer : http://blog.abstractvisitorpattern.co.uk/ ;


On 29 September 2014 14:31, Zaid Mohsin <[email protected]> wrote:
> Hi Dev,
> I’ve been using the new attributes in DynamicCluster that reference the first 
> member entity and sets a boolean attribute (cluster.first) on each group 
> member to indicate if that is the first member of the cluster. I think it 
> would be more useful to add an additional attribute that references the first 
> node to the other non-first members (non-first has attribute of type Entity 
> that references the first member). Is that feasible? Bad or good design?
>
> Currently to access the first node attributes I’m doing this:
>
> entity.getAttribute(DynamicCluster.CLUSTER).getAttribute(DynamicCluster.FIRST).getAttribute(MY_ATTRIBUTE);
>
> where if we include the first entity reference it would look something like 
> this
>
> entity.getAttribute(DynamicCluster.FIRST).getAttribute(MY_ATTRIBUTE);
>
> Regards

Reply via email to