Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 345456

Summary: Add API to CDOQuery to get the result without specifying a class literal
Product: [Modeling] EMF Reporter: Eike Stepper <stepper>
Component: cdo.coreAssignee: Eike Stepper <stepper>
Status: CLOSED FIXED QA Contact: Eike Stepper <stepper>
Severity: enhancement    
Priority: P3 Keywords: noteworthy
Version: 4.0   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:
Bug Depends on:    
Bug Blocks: 344695    

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