I have a Country class which needs to support national (or multi) language. The country names must be in different languages.
So I use a map. The key of the map is java.util.Locale, the value is a localized String containing the country name in different languages.
Please tell me, if these XDoclet tags are suitable for my requierements:
Code:
/**
* @hibernate.map
* lazy="true"
* cascade="all"
* @hibernate.collection-key
* column="key"
* @hibernate.collection-index
* column="index"
* type="java.util.Locale"
* @hibernate.collection-element
* column="nlNameElement"
* type="java.lang.String"
* length="1000"
* @return
*/
public Map getNlNames() {
return nlNames;
}
Is there a documentation about usage of XDoclet tags for Hibernate which covers everything? I mean one-to-one, many-to-one, one-to-many, Map, List, Set, Array, uni-directional, bi-directional and so on?