[hibernate-issues] [Hibernate-JIRA] Commented: (HHH-88) Needed suport for generics on Query class.

Jesse Kuhnert (JIRA) noreply at atlassian.com
Mon Feb 22 10:22:47 EST 2010


    [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-88?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=35662#action_35662 ] 

Jesse Kuhnert commented on HHH-88:
----------------------------------

Session s = ...;

public Query createQuery(String query);

public Query<T> createQuery(String query, Class retType);

class QueryImpl ..
class GenericQueryImpl extends QueryImpl ..implements SomeInterface<T>{}

?

> Needed suport for generics on Query class.
> ------------------------------------------
>
>                 Key: HHH-88
>                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-88
>             Project: Hibernate Core
>          Issue Type: Improvement
>          Components: core
>    Affects Versions: 3.0 alpha, 3.0 beta 1, 3.0 beta 2, 3.1 rc3
>         Environment: Java 1.5 (this issue it's to work with generics).
>            Reporter: Marcio Wesley Borges
>            Priority: Trivial
>   Original Estimate: 2 hours
>  Remaining Estimate: 2 hours
>
> I'm using J2SE 1.5 and I'ld like so much if the Query.java class had support to generics. I did some tests and I believe that it's simple.
> I'm showing above a sample with the changes needed. Basicly you must add the interface Interable to the Query class and implement it. The Query class already have the method Query.interate that return the same required Interator of the method Iterable.iterator. So I sugest you to create another method with the name Query.iterator, just to implement the interface Iterable. After this I think the support to generic is ok.

-- 
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