[
http://opensource.atlassian.com/projects/hibernate/browse/ANN-480?page=co...
]
Emmanuel Bernard commented on ANN-480:
--------------------------------------
I had a look at your framework.
The idea is interesting but from your example, I don't see how writing this extra
class + annotated its properties is a tremendous simplification or dev speed up compared
to the equivalent code in your existing DAO using the regular QBE API with Person as a
parameter. And if you need to inject the ability to play with regular QBC criterions and
define everything through annotations. I'm concerned about the verbosity.
WDYT?
Query by Example in annotation form
-----------------------------------
Key: ANN-480
URL:
http://opensource.atlassian.com/projects/hibernate/browse/ANN-480
Project: Hibernate Annotations
Type: New Feature
Environment: jdk >= 1.5, hibernate >= 3, ant > 1.5
Reporter: M N G
Priority: Minor
Attachments: searchable.tar.gz
Interested in adsorbing this framework I built?
Takes all the work out of creating a Criteria. Similar to how Query by Example, this
small framework I wrote builds Criteria from annotated pojos.
A pojo is annotated to map hibernate bean mappings to methods. The annotated pojo's
class is registered in the Registry, which uses reflecting to define the signatures to
create the Criteria for the pojo. The values to search for are set in the pojo and the
pojo is passed to the Builder. The Builder uses the registry to create the Criteria
delimited by the values in the annotated pojo.
Not entirely mature yet (does not support all Criteria Restrictions) and the handling of
sorting results is a bit unwieldy. It works tho.
Attached is a copy of the framework. It includes a unit test that kick starts a HSQL
database to demostrate the framework.
--
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....
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira