views:

94

answers:

1

I have several lookup tables, some of which refer to or are relationships between others.

For instance, I have membership type included inventory which has Membership ID and Inventory Type ID and is the amount of each Inventory Type that one gets when one gets a specific type of membership.

When the user is reviewing an Inventory Type, I want them to see the amounts that go with each Membership Type; when the user is reviewing a Membership Type, I want them to see what inventory that membership would get.

Can I use a only one ArrayCollection for InvetoryType instances and only one ArrayCollection for MembershipType instances and somehow create filters to get different "views" of the data?

Each "view" would need its own cursor, sorting sequence, filter, etc.

Cheers

+1  A: 

You can use a single Array instance with multiple ArrayCollection instances. If you're just displaying data, or sorting and filtering using the methods/properties provided by ArrayCollection (rather than editing the Array directly), it should have no effect on the underlying shared Array.

joshtynjala
That's what I was hoping.If I make changes to the array, will it refresh all of the ArrayCollections automatically? If so, how can I batch changes to reduce thrashing?
Richard Haven
If you change the Array directly, the ArrayCollections will not automatically know about the change because the Array fires no event to which the collections can listen. I believe you can manually call refresh() on an ArrayCollection to notify it of changes (should only affect a single collection).
joshtynjala