From: Nigel W. (JIRA) <no...@at...> - 2006-07-14 07:51:58
|
ClassMetadata new method: List<Annotation> getPropertyAnnotations(String propName) ---------------------------------------------------------------------------------- Key: HHH-1908 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1908 Project: Hibernate3 Type: New Feature Environment: All Reporter: Nigel White I'm beginning to use org.hibernate.metadata.ClassMetadata It's very useful having all the information about a persistent class available. There is still quite a lot of information locked up in the class that isn't accessible through ClassMetadata. Of course I have my own introspection utilities which examine our persistent classes, so that we can do a lot of automated stuff, but it would be good if we didn't need to - if we could rely on Hibernate's metedata. So what I'm thinking of is a way of returning all the annotations that were applied either to a Field, or that Field's getter. [code] List<Annotation> getPropertyAnnotations(String propName); List<Annotation>[] getPropertiesAnnotations(); [/code] For instance, we have an annotation against a Field that says that Field is the description for that entity (eg, country name, customer name etc) that would be displayed in a combobox/select. We have other annotations too, so we use our own introspection scheme. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |