I'm fine with adding:
- Database.getNamedQuery(String)
- Database.getNativeQuery(String, Class)
I also share the view that:
- Database.getNativeQuery(String)
- Database.getNativeQuery(String, ResultSetMappings)
should be added later. I don't see a reason for:
- Database.getNativeNamedQuery(String)
as EBQL and native queries are similar from the perspective of the user of the database interface. Both types of queries are defined at different tags in mapping so there is a way to find out of which type a query is. It may also cause problems if a user decides to change a named query from EBQL to native in mapping as he needs to remember that he also needs to change all calls of getNamedQuery() to getNativeNamedQuery().
How about adding additional methods:
-Database.defineQuery(String, String);
-Database.defineNativeQuery(String, String, Class);
With the current implementation we do not use the additional benifit of being able to prepare the named queries. This would give users of named queries an additional performance improvement.
If you prefer to add the native support with a seperate issue, that's okay for me.
Based upon some conversation ealier today, I'd like to see the following files being attached and the following changes being implemented: