Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 345456 - Add API to CDOQuery to get the result without specifying a class literal
Summary: Add API to CDOQuery to get the result without specifying a class literal
Status: CLOSED FIXED
Alias: None
Product: EMF
Classification: Modeling
Component: cdo.core (show other bugs)
Version: 4.0   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Eike Stepper CLA
QA Contact: Eike Stepper CLA
URL:
Whiteboard:
Keywords: noteworthy
Depends on:
Blocks: 344695
  Show dependency tree
 
Reported: 2011-05-11 11:57 EDT by Eike Stepper CLA
Modified: 2011-06-23 03:42 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Eike Stepper CLA 2011-05-11 11:57:20 EDT
CDOQuery.getResultAsync(Class<T>) and CDOQuery.getResult(Class<T>) require the specification of a class literal to determine the return type parameterization. That's not possible if the desired return type is itself parameterized (because it's not possible to create class literals of generic types in Java).

Often it's possible to infer that type from the call context, e.g. the type of the local variable that's supposed to recewive the return value. I propose two new overloaded methods like CDOQuery.getResultAsync() and CDOQuery.getResult() for this purpose.
Comment 1 Eike Stepper CLA 2011-05-11 11:59:30 EDT
Committed revision 7676
Comment 2 Eike Stepper CLA 2011-06-23 03:42:22 EDT
Available in R20110608-1407