Postby sai » Tue Apr 10, 2012 9:01 pm
When I said 'type' it does not mean type but let us say a key identifier of the Map.
I am trying to store some additional information to the orderItem, would like to store that in multiple categories.
For example:
Map<String, OrderITemAttribute>
KEY Name , Value
ShoeAttribute ---> <LEATHER1D, LeatherName>
custMeasurementProfile --> <profileId, profileName>
I thought this is how the above Map would let me store the information and I will be able to access Map key 'ShoeAttribute' and I can use name and value pair. I need to store the dynamic data selections in the attributes table with ID and Name and I need to somehow associate them together. With the current way I can probably store one set of functional aspect data only. When I store the data everything is good, but when I retrieve the data I donot know the attribute is shoe related or customer related, in an order item.
Just a thought that the below approach might help more in further categorizing the attributes in more manageable form to store multiple different aspects and having the Map key and the OrderItemAttribute Name separate can be more flexible. It is little bit confusing at this moment when I see it take the Map key and Name value pair in OrderItemAttribute.
Map<String, List<OrderITemAttribute>>
KEY Name , Value
ShoeAttribute ---> <leatherColor, blue>
<leatherType, xxx>
<etc:etc>
custMeasurementProfile --> <profile, 1>
<flexible, y>
<etc, etc>
But I understand now that Map key is same as Name in OrderItemAttribute.
Thank you for the clarification Brian.