Community
Participate
Working Groups
>To aide in using Session and Project API with code that is already using generics - >we should update this the remaining Map and List instance variables to use generics - This will possibly involve a deprecation phase first Map descriptors; Map aliasDescriptors; - some of the API is already using generics Map<String, String> staticMetamodelClasses Map<Object, RelationalDescriptor> mappedSuperclassDescriptors; Map<String, List<String>> metamodelIdClassMap; - some generics change will be redundant if the key is Object for instance protected transient List<DatabaseQuery> queries = null; >Example: in the following CacheImpl JPA code we need to workaround the missing generic structure in AbstractSession and Project >before generics Iterator<ClassDescriptor> descriptorIterator = getSession().getDescriptors().values().iterator(); while(descriptorIterator.hasNext()) { ClassDescriptor candidateAssignableDescriptor = descriptorIterator.next(); >after generics for(ClassDescriptor candidateAssignableDescriptor : getSession().getDescriptors().values()) {
Created attachment 167705 [details] Example refactor of descriptor Map in Project via Session
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink