You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jaxme-dev@ws.apache.org by Chris Kirk <mr...@yahoo.co.uk> on 2004/01/31 15:38:02 UTC

Generating getFooByBar methods on to the generated Java beans

Reading the documentation, and code I cannot find the ability to generate getters on the data beans generated by the schema 'keys'.
 
For example, if an element had the following key:
 
<xs:key name="book-key">
  <xs:selector xpath="book"/>
  <xs:field xpath="@title"/>
  <xs:field xpath="@version"/>
</xs:key>
 
Then the CatalogueType java bean would be generated with the following extra method:
 
BookType getBookBy( BookKey bookKey )
 
Where BookKey is a pojo composite of String title and int version. The Book bean is then backed with a Map (instead of a List) for storing the books.
 
Something similar could also be done for key-ref which would compliment this by adding ways to navigate between beans that were not generated from nested tags.
 
 
My question is, does anything like this functionality exist in JaxMe and if not then is it planned?
 
 
Thanks,
 
- Chris.
 
 
 
 


---------------------------------
BT Yahoo! Broadband - Free modem offer, sign up online today and save £80