Since parsing is done using JAXB, I think we still need to use a Collection (Set is
alright, although it does not take advantage of any uniqueness feature of
PropertyMetaData). Maps would be mapping somehow differently in JAXB, and AFAICT you
can't actually use a HashMap per se as the mapped property, much less so a
LinkedHashMap.
I would rather think of using a set for JAXB and a map internally, something like this:
| ...
| @XmlTransient
| private Map<Object, PropertyMetaData> propertyMetaData = ;
|
|
| public void setPropertyMetaData(Set<PropertyMetaData> parsedProperties) {
| this.propertyMetaData = new LinkedHashMap();
| <add all the elements of parsedProperties into the Map>
| }
|
|
| @XmlElement("property")
| public Set<PropertyMetaData> getPropertyMetaData() {
| return new HashSet<PropertyMetaData>(this.propertyMetaData.values();
| }
|
View the original post :
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4247038#...
Reply to the post :
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&a...