[hibernate-issues] [Hibernate-JIRA] Created: (ANN-480) Query by Example in annotation form

M N G (JIRA) noreply at atlassian.com
Sun Oct 29 01:33:04 EDT 2006


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.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira




More information about the hibernate-issues mailing list