Andrus Adamchik created CAY-2029:
------------------------------------

             Summary: Allow out-of-order insertion into DI lists
                 Key: CAY-2029
                 URL: https://issues.apache.org/jira/browse/CAY-2029
             Project: Cayenne
          Issue Type: Task
            Reporter: Andrus Adamchik
            Assignee: Andrus Adamchik


We need that per CAY-2028. The API might look like this:

{noformat}
ListBuilder.add(label, object).after(label1);
ListBuilder.add(label, object).before(label2);
{noformat}

So each item can optionally have a String label. If no label is used on 
insertion (existing API), the label can be generated semi-randomly. Then later 
the label can be used to refer to a position in the list without knowing the 
position, just to specify relative ordering. 

The reason for using String labels instead of letting the caller to inspect the 
contents of the list directly is that the DI list contains mostly Providers, 
usually multiple Providers wrapping each other. So looking at that directly 
makes little sense.





--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to